Commit 0907ea8d authored by Alex Chau's avatar Alex Chau Committed by Commit Bot

Modify DeviceInfo proto for migrating Sharing data over

- Committing proto change ahead of main CL, so we can export proto change
  to Sync server earlier

Bug: 991971
Change-Id: I11807960d5f7486cc1c16def63da4956834ac326
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1806861
Commit-Queue: Alex Chau <alexchau@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697167}
parent 6fb47e8b
......@@ -56,6 +56,9 @@ message DeviceInfoSpecifics {
// can not be derived from the other fields in the proto and are not general
// enough to be used by another feature.
optional FeatureSpecificFields feature_fields = 9;
// Device specific information for Sharing feature.
optional SharingSpecificFields sharing_fields = 10;
}
// Feature specific information about the device that is running a sync-enabled
......@@ -68,3 +71,26 @@ message FeatureSpecificFields {
// feature
optional bool send_tab_to_self_receiving_enabled = 1;
}
// Device specific information for Sharing feature. Used to send end-to-end
// encrypted message through FCM to other devices.
message SharingSpecificFields {
// FCM registration token of device for sending SharingMessage.
optional string fcm_token = 1;
// Subscription public key required for message encryption [RFC8291].
optional bytes p256dh = 2;
// Auth secret key required for message encryption [RFC8291].
optional bytes auth_secret = 3;
// Enum defining available Sharing features.
enum EnabledFeatures {
UNKNOWN = 0;
CLICK_TO_CALL = 1;
SHARED_CLIPBOARD = 2;
}
// A list of enabled Sharing features.
repeated EnabledFeatures enabled_features = 4;
}
......@@ -340,12 +340,20 @@ VISIT_PROTO_FIELDS(const sync_pb::DeviceInfoSpecifics& proto) {
VISIT(signin_scoped_device_id);
VISIT(last_updated_timestamp);
VISIT(feature_fields);
VISIT(sharing_fields);
}
VISIT_PROTO_FIELDS(const sync_pb::FeatureSpecificFields& proto) {
VISIT(send_tab_to_self_receiving_enabled);
}
VISIT_PROTO_FIELDS(const sync_pb::SharingSpecificFields& proto) {
VISIT(fcm_token);
VISIT_BYTES(p256dh);
VISIT_BYTES(auth_secret);
VISIT_REP(enabled_features);
}
VISIT_PROTO_FIELDS(const sync_pb::DictionarySpecifics& proto) {
VISIT(word);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment