Port Brave Sync server to Rust
Use SQLite for persistence and generate Rust protobuf bindings at build time. Add Docker image support for containerized deployment. Co-Authored-By: codex <[email protected]>
This commit is contained in:
commit
28826af88d
93 files changed
+11666
No files matched your search
@@ -0,0 +1,103 @@
|
||||
// Copyright 2012 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
//
|
||||
// Sync protocol datatype extension for apps.
|
||||
|
||||
// If you change or add any fields in this file, update proto_visitors.h and
|
||||
// potentially proto_enum_conversions.{h, cc}.
|
||||
|
||||
syntax = "proto2";
|
||||
|
||||
option go_package = "./sync_pb";
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "org.chromium.components.sync.protocol";
|
||||
|
||||
option optimize_for = LITE_RUNTIME;
|
||||
|
||||
package sync_pb;
|
||||
|
||||
import "extension_specifics.proto";
|
||||
|
||||
// Settings related to push notifications for apps.
|
||||
message AppNotificationSettings {
|
||||
// DEPRECATED: Use oauth_client_id below.
|
||||
// Whether or not the user has setup notifications at least once.
|
||||
// The value for this field will start out false and will be set
|
||||
// to true when the user accepts receiving notifications for the
|
||||
// first time and then it will always remain true.
|
||||
optional bool initial_setup_done = 1 [deprecated = true];
|
||||
|
||||
// Whether or not the user has disabled notifications.
|
||||
optional bool disabled = 2;
|
||||
|
||||
// OAuth2 client id to which the user granted the notification permission.
|
||||
// This field will start out empty.
|
||||
// It will be set when the user accepts receiving notifications.
|
||||
// This field is used when the user revokes the notifications permission.
|
||||
// Note that it is never cleared after it was set once. Hence, the presence
|
||||
// of this field can be used to determine if the user has setup notifications
|
||||
// at least once for the given app.
|
||||
optional string oauth_client_id = 3;
|
||||
}
|
||||
|
||||
// Information about a linked app icon.
|
||||
message LinkedAppIconInfo {
|
||||
// The URL of the app icon.
|
||||
optional string url = 1;
|
||||
|
||||
// The size of the app icon in DIPs.
|
||||
optional uint32 size = 2;
|
||||
}
|
||||
|
||||
// Properties of app sync objects.
|
||||
//
|
||||
// For now, an app is just an extension. We keep the two data types
|
||||
// separate for future-proofing purposes.
|
||||
message AppSpecifics {
|
||||
// Extension data.
|
||||
optional ExtensionSpecifics extension = 1;
|
||||
|
||||
// Notification settings.
|
||||
optional AppNotificationSettings notification_settings = 2;
|
||||
|
||||
// This controls where on a page this application icon will appear.
|
||||
optional string app_launch_ordinal = 3;
|
||||
|
||||
// This specifics which page the application icon will appear on in the NTP.
|
||||
// This values only provide the order within the application pages, not within
|
||||
// all of the panels in the NTP.
|
||||
optional string page_ordinal = 4;
|
||||
|
||||
// The possible launch types for an app.
|
||||
// This enum should be kept in sync with extensions::LaunchType.
|
||||
enum LaunchType {
|
||||
PINNED = 0;
|
||||
REGULAR = 1;
|
||||
FULLSCREEN = 2;
|
||||
WINDOW = 3;
|
||||
}
|
||||
|
||||
// This describes how the extension should be launched.
|
||||
optional LaunchType launch_type = 5;
|
||||
|
||||
// DEPRECATED. See https://crbug.com/1233303.
|
||||
optional string bookmark_app_url = 6 [deprecated = true];
|
||||
|
||||
// DEPRECATED. See https://crbug.com/1233303.
|
||||
optional string bookmark_app_description = 7 [deprecated = true];
|
||||
|
||||
// DEPRECATED. See https://crbug.com/1233303.
|
||||
optional string bookmark_app_icon_color = 8 [deprecated = true];
|
||||
|
||||
// This is information about linked icons (that is, icons that are downloaded
|
||||
// from outside the app's bundle of files.
|
||||
repeated LinkedAppIconInfo linked_app_icons = 9;
|
||||
|
||||
// DEPRECATED. See https://crbug.com/1233303.
|
||||
optional string bookmark_app_scope = 10 [deprecated = true];
|
||||
|
||||
// DEPRECATED. See https://crbug.com/1233303.
|
||||
optional uint32 bookmark_app_theme_color = 11 [deprecated = true];
|
||||
}
|
||||
Reference in new issue
Block a user