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

Unified Diff: sync/engine/syncer_unittest.cc

Issue 93433006: sync: Introduce ModelTypeRegistry and helpers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More review fixes Created 6 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
Index: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 19aff7c3b115dd63a34d50cfb9bb53e03360d0f5..797d1748155b2f343a02f77e1bae5a3f1b0aed56 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -225,15 +225,18 @@ class SyncerTest : public testing::Test,
GetModelSafeRoutingInfo(&routing_info);
GetWorkers(&workers);
+ model_type_registry_.reset(new ModelTypeRegistry(workers, directory()));
+
context_.reset(
new SyncSessionContext(
- mock_server_.get(), directory(), workers,
+ mock_server_.get(), directory(),
extensions_activity_,
listeners, debug_info_getter_.get(), &traffic_recorder_,
+ model_type_registry_.get(),
true, // enable keystore encryption
false, // force enable pre-commit GU avoidance experiment
"fake_invalidator_client_id"));
- context_->set_routing_info(routing_info);
+ context_->SetRoutingInfo(routing_info);
syncer_ = new Syncer(&cancelation_signal_);
syncable::ReadTransaction trans(FROM_HERE, directory());
@@ -442,7 +445,7 @@ class SyncerTest : public testing::Test,
GetModelSafeRoutingInfo(&routing_info);
if (context_) {
- context_->set_routing_info(routing_info);
+ context_->SetRoutingInfo(routing_info);
}
mock_server_->ExpectGetUpdatesRequestTypes(enabled_datatypes_);
@@ -455,7 +458,7 @@ class SyncerTest : public testing::Test,
GetModelSafeRoutingInfo(&routing_info);
if (context_) {
- context_->set_routing_info(routing_info);
+ context_->SetRoutingInfo(routing_info);
}
mock_server_->ExpectGetUpdatesRequestTypes(enabled_datatypes_);
@@ -498,6 +501,7 @@ class SyncerTest : public testing::Test,
Syncer* syncer_;
scoped_ptr<SyncSession> session_;
+ scoped_ptr<ModelTypeRegistry> model_type_registry_;
scoped_ptr<SyncSessionContext> context_;
bool saw_syncer_event_;
base::TimeDelta last_short_poll_interval_received_;

Powered by Google App Engine
This is Rietveld 408576698