| Index: chrome/browser/sync/engine/syncer_proto_util.cc
|
| diff --git a/chrome/browser/sync/engine/syncer_proto_util.cc b/chrome/browser/sync/engine/syncer_proto_util.cc
|
| index b54362cdc254d68f67ee779e291083140f051f25..76e163af7032d04bf91b09ba94e1c0bc89b94035 100644
|
| --- a/chrome/browser/sync/engine/syncer_proto_util.cc
|
| +++ b/chrome/browser/sync/engine/syncer_proto_util.cc
|
| @@ -119,11 +119,11 @@ void SyncerProtoUtil::AddRequestBirthday(syncable::Directory* dir,
|
| // static
|
| bool SyncerProtoUtil::PostAndProcessHeaders(ServerConnectionManager* scm,
|
| AuthWatcher* auth_watcher,
|
| - ClientToServerMessage* msg,
|
| + const ClientToServerMessage& msg,
|
| ClientToServerResponse* response) {
|
|
|
| std::string tx, rx;
|
| - msg->SerializeToString(&tx);
|
| + msg.SerializeToString(&tx);
|
|
|
| HttpResponse http_response;
|
| ServerConnectionManager::PostBufferParams params = {
|
| @@ -165,10 +165,16 @@ bool SyncerProtoUtil::PostAndProcessHeaders(ServerConnectionManager* scm,
|
| }
|
|
|
| // static
|
| -bool SyncerProtoUtil::PostClientToServerMessage(ClientToServerMessage* msg,
|
| - ClientToServerResponse* response, SyncSession* session) {
|
| +bool SyncerProtoUtil::PostClientToServerMessage(
|
| + const ClientToServerMessage& msg,
|
| + ClientToServerResponse* response,
|
| + SyncSession* session) {
|
|
|
| CHECK(response);
|
| + DCHECK(msg.has_store_birthday() || (msg.has_get_updates() &&
|
| + msg.get_updates().has_from_timestamp() &&
|
| + msg.get_updates().from_timestamp() == 0))
|
| + << "Must call AddRequestBirthday to set birthday.";
|
|
|
| ScopedDirLookup dir(session->context()->directory_manager(),
|
| session->context()->account_name());
|
| @@ -176,8 +182,6 @@ bool SyncerProtoUtil::PostClientToServerMessage(ClientToServerMessage* msg,
|
| return false;
|
| }
|
|
|
| - AddRequestBirthday(dir, msg);
|
| -
|
| if (!PostAndProcessHeaders(session->context()->connection_manager(),
|
| session->context()->auth_watcher(),
|
| msg,
|
| @@ -287,10 +291,10 @@ void SyncerProtoUtil::CopyBlobIntoProtoBytes(const syncable::Blob& blob,
|
|
|
| // static
|
| const std::string& SyncerProtoUtil::NameFromSyncEntity(
|
| - const SyncEntity& entry) {
|
| + const sync_pb::SyncEntity& entry) {
|
|
|
| if (entry.has_non_unique_name()) {
|
| - return entry.non_unique_name();
|
| + return entry.non_unique_name();
|
| }
|
|
|
| return entry.name();
|
|
|