Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Unified Diff: sync/engine/syncer.cc

Issue 10909160: sync: Process client commands on commit response (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Inline client command processing Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sync/engine/syncer.h ('k') | sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer.cc
diff --git a/sync/engine/syncer.cc b/sync/engine/syncer.cc
index d8d2ce3a8e80f69c5336f355ff5219c17f020af3..d2b4fef69a69a2166e3d52fb9c3afd708a2ebf2c 100644
--- a/sync/engine/syncer.cc
+++ b/sync/engine/syncer.cc
@@ -54,7 +54,6 @@ const char* SyncerStepToString(const SyncerStep step)
switch (step) {
ENUM_CASE(SYNCER_BEGIN);
ENUM_CASE(DOWNLOAD_UPDATES);
- ENUM_CASE(PROCESS_CLIENT_COMMAND);
ENUM_CASE(VERIFY_UPDATES);
ENUM_CASE(PROCESS_UPDATES);
ENUM_CASE(STORE_TIMESTAMPS);
@@ -118,11 +117,6 @@ void Syncer::SyncShare(sessions::SyncSession* session,
DownloadUpdatesCommand download_updates(kCreateMobileBookmarksFolder);
session->mutable_status_controller()->set_last_download_updates_result(
download_updates.Execute(session));
- next_step = PROCESS_CLIENT_COMMAND;
- break;
- }
- case PROCESS_CLIENT_COMMAND: {
- ProcessClientCommand(session);
next_step = VERIFY_UPDATES;
break;
}
@@ -238,33 +232,6 @@ void Syncer::SyncShare(sessions::SyncSession* session,
}
}
-void Syncer::ProcessClientCommand(sessions::SyncSession* session) {
- const sync_pb::ClientToServerResponse& response =
- session->status_controller().updates_response();
- if (!response.has_client_command())
- return;
- const ClientCommand& command = response.client_command();
-
- // The server limits the number of items a client can commit in one batch.
- if (command.has_max_commit_batch_size()) {
- session->context()->set_max_commit_batch_size(
- command.max_commit_batch_size());
- }
- if (command.has_set_sync_long_poll_interval()) {
- session->delegate()->OnReceivedLongPollIntervalUpdate(
- TimeDelta::FromSeconds(command.set_sync_long_poll_interval()));
- }
- if (command.has_set_sync_poll_interval()) {
- session->delegate()->OnReceivedShortPollIntervalUpdate(
- TimeDelta::FromSeconds(command.set_sync_poll_interval()));
- }
-
- if (command.has_sessions_commit_delay_seconds()) {
- session->delegate()->OnReceivedSessionsCommitDelay(
- TimeDelta::FromSeconds(command.sessions_commit_delay_seconds()));
- }
-}
-
void CopyServerFields(syncable::Entry* src, syncable::MutableEntry* dest) {
dest->Put(SERVER_NON_UNIQUE_NAME, src->Get(SERVER_NON_UNIQUE_NAME));
dest->Put(SERVER_PARENT_ID, src->Get(SERVER_PARENT_ID));
« no previous file with comments | « sync/engine/syncer.h ('k') | sync/engine/syncer_proto_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698