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

Unified Diff: sync/engine/sync_scheduler.cc

Issue 10559104: sync: Process 'control' data separately (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename, cleanup, fix tests Created 8 years, 6 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/resolve_conflicts_command.cc ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/sync_scheduler.cc
diff --git a/sync/engine/sync_scheduler.cc b/sync/engine/sync_scheduler.cc
index 199c5079062d10ab801f10973437022011fdd3c6..d06edc283d9ff61755ce0f6ac728cbe83bd7f8e7 100644
--- a/sync/engine/sync_scheduler.cc
+++ b/sync/engine/sync_scheduler.cc
@@ -550,6 +550,7 @@ void GetModelSafeParamsForTypes(ModelTypeSet types,
ModelSafeRoutingInfo* result_routes,
std::vector<ModelSafeWorker*>* result_workers) {
bool passive_group_added = false;
+ bool control_group_added = false;
typedef std::vector<ModelSafeWorker*>::const_iterator iter;
for (ModelTypeSet::Iterator it = types.First();
@@ -571,6 +572,8 @@ void GetModelSafeParamsForTypes(ModelTypeSet types,
if (group == GROUP_PASSIVE)
passive_group_added = true;
+ if (group == GROUP_CONTROL)
+ control_group_added = true;
} else {
NOTREACHED();
}
@@ -585,6 +588,14 @@ void GetModelSafeParamsForTypes(ModelTypeSet types,
else
NOTREACHED();
}
+ if (control_group_added == false) {
+ iter it = std::find_if(current_workers.begin(), current_workers.end(),
+ ModelSafeWorkerGroupIs(GROUP_CONTROL));
+ if (it != current_workers.end())
+ result_workers->push_back(*it);
+ else
+ NOTREACHED();
+ }
}
void SyncScheduler::ScheduleConfiguration(
« no previous file with comments | « sync/engine/resolve_conflicts_command.cc ('k') | sync/engine/sync_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698