summaryrefslogtreecommitdiffstats
path: root/sync/protocol
diff options
context:
space:
mode:
authormaniscalco <maniscalco@chromium.org>2015-07-08 08:43:55 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-08 15:44:33 +0000
commitc48c05afc620ffa8d00eea2d6e3fa4059e7f88ab (patch)
tree33a18287a9c9cfef42809670626eb492e2b639ef /sync/protocol
parentc927a561cbc64db0326d02f770307663bce83447 (diff)
downloadchromium_src-c48c05afc620ffa8d00eea2d6e3fa4059e7f88ab.zip
chromium_src-c48c05afc620ffa8d00eea2d6e3fa4059e7f88ab.tar.gz
chromium_src-c48c05afc620ffa8d00eea2d6e3fa4059e7f88ab.tar.bz2
[Sync] Add ClearServerData RPC
Add a new message type (ClearServerData) to the sync protocol. Add infrastructure necessary to call the new RPC, but don't actually call it. Calling it will happen in a future CL. Update FakeServer to receive and process the new message type. BUG=490836 Review URL: https://codereview.chromium.org/1213623015 Cr-Commit-Position: refs/heads/master@{#337824}
Diffstat (limited to 'sync/protocol')
-rw-r--r--sync/protocol/sync.proto29
1 files changed, 29 insertions, 0 deletions
diff --git a/sync/protocol/sync.proto b/sync/protocol/sync.proto
index ed97399..f3cbbe5 100644
--- a/sync/protocol/sync.proto
+++ b/sync/protocol/sync.proto
@@ -665,6 +665,22 @@ message AuthenticateMessage {
required string auth_token = 1;
};
+// Message from a client asking the server to clear its data.
+//
+// A client makes a ClearServerData request when it transitions to passphrase
+// encryption to ensure the server deletes any plaintext data that may have been
+// synced previously.
+message ClearServerDataMessage {
+ // No arguments needed as the store birthday and user identifier are part of
+ // an enclosing message.
+};
+
+// Response to a ClearServerData request.
+message ClearServerDataResponse {
+ // No result fields necessary. Success/failure is indicated in
+ // ClientToServerResponse.
+};
+
message DeprecatedMessage1 {
};
@@ -721,8 +737,13 @@ message ClientToServerMessage {
GET_UPDATES = 2;
AUTHENTICATE = 3;
DEPRECATED_4 = 4;
+ CLEAR_SERVER_DATA = 5;
}
+ // Each ClientToServerMessage contains one request defined by the
+ // message_contents. Each type has a corresponding message field that will be
+ // present iff the message is of that type. E.g. a commit message will have a
+ // message_contents of COMMIT and its commit field will be present.
required Contents message_contents = 3;
optional CommitMessage commit = 4;
optional GetUpdatesMessage get_updates = 5;
@@ -756,6 +777,10 @@ message ClientToServerMessage {
// Sending the ID here allows the server to not send notifications of our own
// changes to our invalidator.
optional string invalidator_client_id = 14;
+
+ // Identifies this ClientToServerMessage as a clear server data request. This
+ // field is present when message_contents is CLEAR_SERVER_DATA.
+ optional ClearServerDataMessage clear_server_data = 15;
};
// This request allows the client to convert a specific crash identifier
@@ -978,6 +1003,10 @@ message ClientToServerResponse {
// The new per-client state for this client. If set, should be persisted and
// sent with any subsequent ClientToServerMessages.
optional ChipBag new_bag_of_chips = 14;
+
+ // Present if this ClientToServerResponse is in response to a ClearServerData
+ // request.
+ optional ClearServerDataResponse clear_server_data = 15;
};
// A message to notify the server of certain sync events. Idempotent. Send these