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

Unified Diff: sync/internal_api/sync_manager_impl.cc

Issue 19309002: sync: Add pre-commit update avoidance mode + flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nits Created 7 years, 5 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
Index: sync/internal_api/sync_manager_impl.cc
diff --git a/sync/internal_api/sync_manager_impl.cc b/sync/internal_api/sync_manager_impl.cc
index e9eeea183217b5458ca3b7da67176eb376c24dbf..3d6158d8a15dc8506a635ad8041dbf9c031cdbb4 100644
--- a/sync/internal_api/sync_manager_impl.cc
+++ b/sync/internal_api/sync_manager_impl.cc
@@ -1295,6 +1295,17 @@ bool SyncManagerImpl::ReceivedExperiment(Experiments* experiments) {
found_experiment = true;
}
+ ReadNode pre_commit_update_avoidance_node(&trans);
+ if (pre_commit_update_avoidance_node.InitByClientTagLookup(
+ syncer::EXPERIMENTS,
+ syncer::kPreCommitUpdateAvoidanceTag) == BaseNode::INIT_OK) {
+ session_context_->set_server_enabled_pre_commit_update_avoidance(
+ pre_commit_update_avoidance_node.GetExperimentsSpecifics().
+ pre_commit_update_avoidance().enabled());
+ // We don't bother setting found_experiment. The frontend doesn't need to
+ // know about this.
+ }
+
return found_experiment;
}
« no previous file with comments | « sync/internal_api/public/util/experiments.h ('k') | sync/internal_api/test/test_internal_components_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698