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

Unified Diff: components/sync/engine_impl/model_type_worker_unittest.cc

Issue 2412193002: [Sync] Move SharedModelTypeProcessor to model_impl/. (Closed)
Patch Set: Address comment from Sky. Created 4 years, 2 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/driver/sync_client.h ('k') | components/sync/model/model_type_change_processor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/model_type_worker_unittest.cc
diff --git a/components/sync/engine_impl/model_type_worker_unittest.cc b/components/sync/engine_impl/model_type_worker_unittest.cc
index f9029eda2abd0e8c9745b005919237e854abac35..5ce5a7f7a6f37a2bf8cc4729d7d0713d3a5449a2 100644
--- a/components/sync/engine_impl/model_type_worker_unittest.cc
+++ b/components/sync/engine_impl/model_type_worker_unittest.cc
@@ -178,10 +178,10 @@ class ModelTypeWorkerTest : public ::testing::Test {
DCHECK(!worker_);
// We don't get to own this object. The |worker_| keeps a unique_ptr to it.
- mock_type_processor_ = new MockModelTypeProcessor();
- mock_type_processor_->SetDisconnectCallback(base::Bind(
+ auto processor = base::MakeUnique<MockModelTypeProcessor>();
+ mock_type_processor_ = processor.get();
+ processor->SetDisconnectCallback(base::Bind(
&ModelTypeWorkerTest::DisconnectProcessor, base::Unretained(this)));
- std::unique_ptr<ModelTypeProcessor> proxy(mock_type_processor_);
std::unique_ptr<Cryptographer> cryptographer_copy;
if (cryptographer_) {
@@ -189,9 +189,9 @@ class ModelTypeWorkerTest : public ::testing::Test {
}
// TODO(maxbogue): crbug.com/529498: Inject pending updates somehow.
- worker_.reset(new ModelTypeWorker(kModelType, state,
- std::move(cryptographer_copy),
- &mock_nudge_handler_, std::move(proxy)));
+ worker_.reset(
+ new ModelTypeWorker(kModelType, state, std::move(cryptographer_copy),
+ &mock_nudge_handler_, std::move(processor)));
}
// Introduce a new key that the local cryptographer can't decrypt.
« no previous file with comments | « components/sync/driver/sync_client.h ('k') | components/sync/model/model_type_change_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698