Commit 70644e48 authored by vitaliii's avatar vitaliii Committed by Commit Bot

[Sync:Sharing] Make server configuration opaque to the client.

I.e. take it as bytes instead of actual proto.

Bug: 1045883
Change-Id: Id1ebc09799d69d833c49cd5dd0f36bc2ecc2ea1a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2020946
Commit-Queue: vitaliii <vitaliii@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Reviewed-by: default avatarAlex Chau <alexchau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735464}
parent a63120ca
......@@ -37,8 +37,10 @@ enum MessageType {
}
// Message for sending between devices in Sharing.
// Next tag: 15
// Next tag: 16
message SharingMessage {
reserved 12;
// Identifier of sender. required except for AckMessage.
string sender_guid = 1;
......@@ -62,9 +64,9 @@ message SharingMessage {
// message. optional.
FCMChannelConfiguration fcm_channel_configuration = 6;
// Server channel configuration. Ack message will be delivered through
// server channel. optional.
ServerChannelConfiguration server_channel_configuration = 12;
// Opaque server channel configuration. Ack message will be delivered
// through server channel. optional.
bytes server_channel_configuration = 15;
}
// The name of the device sending this message. optional.
......@@ -119,16 +121,6 @@ message FCMChannelConfiguration {
bytes sender_id_auth_secret = 6;
}
// Server channel configuration. Message will be delivered through server
// channel.
message ServerChannelConfiguration {
// Where to send the message to. required.
string channel_id = 1;
// Optional cookie set on the original request. optional.
bytes session_cookie = 2;
}
// Request for Sharing Discovery.
message DiscoveryRequest {
// required
......
......@@ -800,13 +800,6 @@ VISIT_PROTO_FIELDS(const sync_pb::SharingMessageSpecifics& proto) {
VISIT_BYTES(payload);
}
VISIT_PROTO_FIELDS(
const sync_pb::SharingMessageSpecifics::ChannelConfiguration::
ServerChannelConfiguration& proto) {
VISIT(channel_id);
VISIT_BYTES(session_cookie);
}
VISIT_PROTO_FIELDS(const sync_pb::SharingMessageSpecifics::
ChannelConfiguration::FCMChannelConfiguration& proto) {
VISIT(token);
......@@ -817,7 +810,7 @@ VISIT_PROTO_FIELDS(const sync_pb::SharingMessageSpecifics::
VISIT_PROTO_FIELDS(
const sync_pb::SharingMessageSpecifics::ChannelConfiguration& proto) {
VISIT(fcm);
VISIT(server);
VISIT_BYTES(server);
}
VISIT_PROTO_FIELDS(const sync_pb::SyncCycleCompletedEventInfo& proto) {
......
......@@ -21,13 +21,6 @@ message SharingMessageSpecifics {
optional string message_id = 1;
message ChannelConfiguration {
message ServerChannelConfiguration {
// Where to send the message to.
optional string channel_id = 1;
// Optional cookie set on the original request.
optional bytes session_cookie = 2;
}
message FCMChannelConfiguration {
// FCM registration token of target device.
optional string token = 1;
......@@ -44,9 +37,9 @@ message SharingMessageSpecifics {
// FCM channel configuration. Message will be delivered as a FCM message.
FCMChannelConfiguration fcm = 1;
// Server channel configuration. Message will be delivered through server
// channel.
ServerChannelConfiguration server = 2;
// Opaque server channel configuration. Message will be delivered through
// server channel.
bytes server = 2;
}
}
......
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