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

Unified Diff: sync/engine/sync_scheduler_unittest.cc

Issue 130193002: sync: Consistently refcount ModelSafeWorkers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix standalone sync client 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 | « chrome/browser/sync/glue/sync_backend_registrar_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..97d9ab8d6f703e48d85c6c93116d2cbb4b523984 100644
--- a/sync/engine/sync_scheduler_unittest.cc
+++ b/sync/engine/sync_scheduler_unittest.cc
@@ -125,17 +125,11 @@ class SyncSchedulerTest : public testing::Test {
workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_DB)));
workers_.push_back(make_scoped_refptr(new FakeModelWorker(GROUP_PASSIVE)));
- std::vector<ModelSafeWorker*> workers;
- for (std::vector<scoped_refptr<FakeModelWorker> >::iterator it =
- workers_.begin(); it != workers_.end(); ++it) {
- workers.push_back(it->get());
- }
-
connection_.reset(new MockConnectionManager(directory(),
&cancelation_signal_));
connection_->SetServerReachable();
context_.reset(new SyncSessionContext(
- connection_.get(), directory(), workers,
+ connection_.get(), directory(), workers_,
extensions_activity_.get(),
std::vector<SyncEngineEventListener*>(), NULL, NULL,
true, // enable keystore encryption
@@ -229,7 +223,7 @@ class SyncSchedulerTest : public testing::Test {
scoped_ptr<SyncSchedulerImpl> scheduler_;
MockSyncer* syncer_;
MockDelayProvider* delay_;
- std::vector<scoped_refptr<FakeModelWorker> > workers_;
+ std::vector<scoped_refptr<ModelSafeWorker> > workers_;
scoped_refptr<ExtensionsActivity> extensions_activity_;
ModelSafeRoutingInfo routing_info_;
base::WeakPtrFactory<SyncSchedulerTest> weak_ptr_factory_;
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar_unittest.cc ('k') | sync/engine/syncer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698