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

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: 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 0825317b7770abd9c46451618e56b2538ee5cffb..342fdd308c7c0db6dfc4f7073cbdc2f43b026d87 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_pre_commit_update_avoidance_experiment_enabled(
+ 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;
}

Powered by Google App Engine
This is Rietveld 408576698