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

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: Fix memory leak in tests 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
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/internal_api/internal_components_factory_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sync/engine/syncer_unittest.cc
diff --git a/sync/engine/syncer_unittest.cc b/sync/engine/syncer_unittest.cc
index 119deb1d2c2dc75c2b868e1a5890496a431a7c6a..a8e7c02227ce7baafcd4966c7d4c1ab9cd81dce2 100644
--- a/sync/engine/syncer_unittest.cc
+++ b/sync/engine/syncer_unittest.cc
@@ -220,15 +220,18 @@ class SyncerTest : public testing::Test,
ModelSafeRoutingInfo routing_info;
GetModelSafeRoutingInfo(&routing_info);
+ 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());
@@ -437,7 +440,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_);
@@ -450,7 +453,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_);
@@ -493,6 +496,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_;
« no previous file with comments | « sync/engine/syncer.cc ('k') | sync/internal_api/internal_components_factory_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698