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

Unified Diff: components/sync/tools/sync_client.cc

Issue 2644373003: Revert of [Sync] Make directory types registration explicit in ModelTypeRegistry (Closed)
Patch Set: Created 3 years, 11 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 | « components/sync/engine_impl/syncer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/tools/sync_client.cc
diff --git a/components/sync/tools/sync_client.cc b/components/sync/tools/sync_client.cc
index 2056aea1db9ea043ea9643189c1ce19b3deb50d9..69954bca77b5c59e113ce9f4b7da26a9cf52c4b1 100644
--- a/components/sync/tools/sync_client.cc
+++ b/components/sync/tools/sync_client.cc
@@ -378,6 +378,10 @@
model_types.Put(FAVICON_IMAGES);
model_types.Put(FAVICON_TRACKING);
+ ModelSafeRoutingInfo routing_info;
+ for (ModelTypeSet::Iterator it = model_types.First(); it.Good(); it.Inc()) {
+ routing_info[it.Get()] = GROUP_PASSIVE;
+ }
scoped_refptr<PassiveModelWorker> passive_model_safe_worker =
new PassiveModelWorker();
std::vector<scoped_refptr<ModelSafeWorker>> workers;
@@ -438,13 +442,7 @@
invalidator->RegisterHandler(shim.get());
CHECK(invalidator->UpdateRegisteredIds(
shim.get(), ModelTypeSetToObjectIdSet(model_types)));
- ModelTypeConnector* model_type_connector =
- sync_manager->GetModelTypeConnector();
- for (ModelTypeSet::Iterator it = model_types.First(); it.Good(); it.Inc()) {
- model_type_connector->RegisterDirectoryType(it.Get(), GROUP_PASSIVE);
- }
-
- sync_manager->StartSyncingNormally(base::Time());
+ sync_manager->StartSyncingNormally(routing_info, base::Time());
base::RunLoop().Run();
« no previous file with comments | « components/sync/engine_impl/syncer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698