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

Unified Diff: sync/engine/sync_scheduler_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/sync_scheduler_unittest.cc
diff --git a/sync/engine/sync_scheduler_unittest.cc b/sync/engine/sync_scheduler_unittest.cc
index e5876554e81a53bdc4f95d95c8bac398f93bc835..2d861c761a00d47e272dc2565293f05093b6ce91 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -130,18 +130,20 @@ class SyncSchedulerTest : public testing::Test {
workers_.begin(); it != workers_.end(); ++it) {
workers.push_back(it->get());
}
+ model_type_registry_.reset(new ModelTypeRegistry(workers, directory()));
connection_.reset(new MockConnectionManager(directory(),
&cancelation_signal_));
connection_->SetServerReachable();
context_.reset(new SyncSessionContext(
- connection_.get(), directory(), workers,
+ connection_.get(), directory(),
extensions_activity_.get(),
std::vector<SyncEngineEventListener*>(), NULL, NULL,
+ model_type_registry_.get(),
true, // enable keystore encryption
false, // force enable pre-commit GU avoidance
"fake_invalidator_client_id"));
- context_->set_routing_info(routing_info_);
+ context_->SetRoutingInfo(routing_info_);
context_->set_notifications_enabled(true);
context_->set_account_name("Test");
scheduler_.reset(
@@ -225,6 +227,7 @@ class SyncSchedulerTest : public testing::Test {
TestDirectorySetterUpper dir_maker_;
CancelationSignal cancelation_signal_;
scoped_ptr<MockConnectionManager> connection_;
+ scoped_ptr<ModelTypeRegistry> model_type_registry_;
scoped_ptr<SyncSessionContext> context_;
scoped_ptr<SyncSchedulerImpl> scheduler_;
MockSyncer* syncer_;
@@ -890,7 +893,7 @@ TEST_F(SyncSchedulerTest, ConfigurationMode) {
// TODO(tim): Figure out how to remove this dangerous need to reset
// routing info between mode switches.
- context()->set_routing_info(routing_info());
+ context()->SetRoutingInfo(routing_info());
StartSyncScheduler(SyncScheduler::NORMAL_MODE);
RunLoop();

Powered by Google App Engine
This is Rietveld 408576698