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

Unified Diff: sync/sessions/sync_session.cc

Issue 10909160: sync: Process client commands on commit response (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor formatting improvement 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/sessions/sync_session.h ('k') | sync/test/engine/mock_connection_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/sessions/sync_session.cc
diff --git a/sync/sessions/sync_session.cc b/sync/sessions/sync_session.cc
index b7bb5ca3c7f40bcf4410fb6e657d87304ad42cc1..ef940dbdd2f0898f56d396ab637de65c1424c6d7 100644
--- a/sync/sessions/sync_session.cc
+++ b/sync/sessions/sync_session.cc
@@ -152,6 +152,24 @@ void SyncSession::PrepareForAnotherSyncCycle() {
status_controller_.reset(new StatusController(routing_info_));
}
+void SyncSession::ProcessClientCommand(const sync_pb::ClientCommand& command) {
tim (not reviewing) 2012/09/11 20:08:55 We have a few "do on every request/response" actio
rlarocque 2012/09/11 20:28:55 Done, sort of. I moved the call to this function
+ if (command.has_max_commit_batch_size()) {
+ context()->set_max_commit_batch_size(command.max_commit_batch_size());
+ }
+ if (command.has_set_sync_long_poll_interval()) {
+ delegate()->OnReceivedLongPollIntervalUpdate(
+ base::TimeDelta::FromSeconds(command.set_sync_long_poll_interval()));
+ }
+ if (command.has_set_sync_poll_interval()) {
+ delegate()->OnReceivedShortPollIntervalUpdate(
+ base::TimeDelta::FromSeconds(command.set_sync_poll_interval()));
+ }
+ if (command.has_sessions_commit_delay_seconds()) {
+ delegate()->OnReceivedSessionsCommitDelay(
+ base::TimeDelta::FromSeconds(command.sessions_commit_delay_seconds()));
+ }
+}
+
SyncSessionSnapshot SyncSession::TakeSnapshot() const {
syncable::Directory* dir = context_->directory();
« no previous file with comments | « sync/sessions/sync_session.h ('k') | sync/test/engine/mock_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698