Commit 8961a1e1 authored by Marc Treib's avatar Marc Treib Committed by Commit Bot

Sync protocol cleanup: Remove AUTHENTICATE message

This was another type of protocol message next to GET_UPDATES and
COMMIT, which hadn't been used in a long time. This CL removes the
corresponding protos.

Bug: 960755
Change-Id: Iabfafd349f1eac4acc453fe8f668667028ce2341
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1820799Reviewed-by: default avatarJan Krcal <jkrcal@chromium.org>
Commit-Queue: Marc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699296}
parent be035065
...@@ -700,15 +700,7 @@ message GetUpdatesMessage { ...@@ -700,15 +700,7 @@ message GetUpdatesMessage {
reserved "requested_types"; reserved "requested_types";
}; };
message AuthenticateMessage {
required string auth_token = 1;
};
// Message from a client asking the server to clear its data. // 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 { message ClearServerDataMessage {
// No arguments needed as the store birthday and user identifier are part of // No arguments needed as the store birthday and user identifier are part of
// an enclosing message. // an enclosing message.
...@@ -775,7 +767,7 @@ message ClientToServerMessage { ...@@ -775,7 +767,7 @@ message ClientToServerMessage {
enum Contents { enum Contents {
COMMIT = 1; COMMIT = 1;
GET_UPDATES = 2; GET_UPDATES = 2;
AUTHENTICATE = 3; DEPRECATED_3 = 3;
DEPRECATED_4 = 4; DEPRECATED_4 = 4;
CLEAR_SERVER_DATA = 5; CLEAR_SERVER_DATA = 5;
} }
...@@ -787,7 +779,8 @@ message ClientToServerMessage { ...@@ -787,7 +779,8 @@ message ClientToServerMessage {
required Contents message_contents = 3; required Contents message_contents = 3;
optional CommitMessage commit = 4; optional CommitMessage commit = 4;
optional GetUpdatesMessage get_updates = 5; optional GetUpdatesMessage get_updates = 5;
optional AuthenticateMessage authenticate = 6; reserved 6;
reserved "authenticate";
optional DeprecatedMessage deprecated_field_9 = 9 [deprecated = true]; optional DeprecatedMessage deprecated_field_9 = 9 [deprecated = true];
...@@ -965,25 +958,11 @@ message GetUpdatesStreamingResponse { ...@@ -965,25 +958,11 @@ message GetUpdatesStreamingResponse {
repeated SyncEntity entries = 1; repeated SyncEntity entries = 1;
}; };
// A user-identifying struct. For a given Google account the email and display
// name can change, but obfuscated_id should be constant.
// The obfuscated id is optional because at least one planned use of the proto
// (sharing) does not require it.
message UserIdentification {
required string email = 1; // the user's full primary email address.
optional string display_name = 2; // the user's display name.
optional string obfuscated_id = 3; // an obfuscated, opaque user id.
};
message AuthenticateResponse {
// Optional only for backward compatibility.
optional UserIdentification user = 1;
};
message ClientToServerResponse { message ClientToServerResponse {
optional CommitResponse commit = 1; optional CommitResponse commit = 1;
optional GetUpdatesResponse get_updates = 2; optional GetUpdatesResponse get_updates = 2;
optional AuthenticateResponse authenticate = 3; reserved 3;
reserved "authenticate";
// Up until protocol_version 24, the default was SUCCESS which made it // Up until protocol_version 24, the default was SUCCESS which made it
// impossible to add new enum values since older clients would parse any // impossible to add new enum values since older clients would parse any
......
...@@ -146,7 +146,6 @@ bool MockConnectionManager::PostBufferToPath(PostBufferParams* params, ...@@ -146,7 +146,6 @@ bool MockConnectionManager::PostBufferToPath(PostBufferParams* params,
} }
bool result = true; bool result = true;
EXPECT_TRUE(!store_birthday_sent_ || post.has_store_birthday() || EXPECT_TRUE(!store_birthday_sent_ || post.has_store_birthday() ||
post.message_contents() == ClientToServerMessage::AUTHENTICATE ||
post.message_contents() == post.message_contents() ==
ClientToServerMessage::CLEAR_SERVER_DATA); ClientToServerMessage::CLEAR_SERVER_DATA);
store_birthday_sent_ = true; store_birthday_sent_ = true;
......
...@@ -371,11 +371,6 @@ class MockConnectionManager : public ServerConnectionManager { ...@@ -371,11 +371,6 @@ class MockConnectionManager : public ServerConnectionManager {
// The keystore key we return for a GetUpdates with need_encryption_key set. // The keystore key we return for a GetUpdates with need_encryption_key set.
std::string keystore_key_; std::string keystore_key_;
// The AUTHENTICATE response we'll return for auth requests.
sync_pb::AuthenticateResponse auth_response_;
// What we use to determine if we should return SUCCESS or BAD_AUTH_TOKEN.
std::string valid_access_token_;
// Whether we are faking a server mandating clients to throttle requests. // Whether we are faking a server mandating clients to throttle requests.
// Protected by |response_code_override_lock_|. // Protected by |response_code_override_lock_|.
bool throttling_; bool throttling_;
......
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