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,70 @@
|
||||
// Copyright 2024 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 shared tab groups and tabs.
|
||||
|
||||
// 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 "unique_position.proto";
|
||||
|
||||
message SharedTabGroupDataSpecifics {
|
||||
// Unique identifier for this entity.
|
||||
optional string guid = 1;
|
||||
|
||||
// TODO(b/319521964): consider to rename and add a comment to clarify the
|
||||
// content.
|
||||
optional string last_modification_author = 2;
|
||||
|
||||
oneof entity {
|
||||
SharedTabGroup tab_group = 3;
|
||||
SharedTab tab = 4;
|
||||
}
|
||||
}
|
||||
|
||||
message SharedTabGroup {
|
||||
// The displayed title of the group, shown on the tab group.
|
||||
optional string title = 1;
|
||||
|
||||
// These colors map to tab_groups::TabGroupColorId. They DO NOT match the enum
|
||||
// integer values due to "kGrey" being in the "Unspecified" field.
|
||||
enum Color {
|
||||
UNSPECIFIED = 0;
|
||||
GREY = 1;
|
||||
BLUE = 2;
|
||||
RED = 3;
|
||||
YELLOW = 4;
|
||||
GREEN = 5;
|
||||
PINK = 6;
|
||||
PURPLE = 7;
|
||||
CYAN = 8;
|
||||
ORANGE = 9;
|
||||
}
|
||||
// The color of the tab group, mapped to tab_groups::TabGroupColorId.
|
||||
optional Color color = 2;
|
||||
}
|
||||
|
||||
message SharedTab {
|
||||
// The URL of the page.
|
||||
optional string url = 1;
|
||||
// The title of the page.
|
||||
optional string title = 2;
|
||||
// The URL to the favicon of the page.
|
||||
optional string favicon_url = 3;
|
||||
// The GUID of the SharedTabGroup this is a member of.
|
||||
optional string shared_tab_group_guid = 4;
|
||||
// The UniquePosition within a SharedTabGroup.
|
||||
optional UniquePosition unique_position = 5;
|
||||
}
|
||||
Reference in new issue
Block a user