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

Unified Diff: components/sync/driver/ui_model_type_controller_unittest.cc

Issue 2256733004: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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: components/sync/driver/ui_model_type_controller_unittest.cc
diff --git a/components/sync/driver/ui_model_type_controller_unittest.cc b/components/sync/driver/ui_model_type_controller_unittest.cc
index 80d66104e7a1e0f5699e64f171ea0bb37f9018fb..d9cc2a4538d99f5b728a4c44cc0fbf68060a3bde 100644
--- a/components/sync/driver/ui_model_type_controller_unittest.cc
+++ b/components/sync/driver/ui_model_type_controller_unittest.cc
@@ -63,7 +63,7 @@ class MockSyncBackend {
std::unique_ptr<syncer_v2::ActivationContext> activation_context) {
enabled_types_.Put(type);
activation_context->type_processor->ConnectSync(
- base::WrapUnique(new NullCommitQueue()));
+ base::MakeUnique<NullCommitQueue>());
}
void Disconnect(syncer::ModelType type) {
@@ -163,8 +163,7 @@ class UIModelTypeControllerTest : public testing::Test,
syncer::ModelType type,
syncer_v2::ModelTypeService* service) {
std::unique_ptr<syncer_v2::SharedModelTypeProcessor> processor =
- base::WrapUnique(
- new syncer_v2::SharedModelTypeProcessor(type, service));
+ base::MakeUnique<syncer_v2::SharedModelTypeProcessor>(type, service);
type_processor_ = processor.get();
return std::move(processor);
}
@@ -179,8 +178,7 @@ class UIModelTypeControllerTest : public testing::Test,
&UIModelTypeControllerTest::LoadModelsDone, base::Unretained(this)));
if (!type_processor_->IsAllowingChanges()) {
type_processor_->OnMetadataLoaded(
- syncer::SyncError(),
- base::WrapUnique(new syncer_v2::MetadataBatch()));
+ syncer::SyncError(), base::MakeUnique<syncer_v2::MetadataBatch>());
}
if (auto_run_tasks_) {
« no previous file with comments | « components/sync/driver/sync_policy_handler_unittest.cc ('k') | components/sync/engine_impl/cycle/nudge_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698