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

Unified Diff: components/browser_sync/abstract_profile_sync_service_test.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. 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 | « chrome/browser/sync/test/integration/sync_test.cc ('k') | components/browser_sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/browser_sync/abstract_profile_sync_service_test.cc
diff --git a/components/browser_sync/abstract_profile_sync_service_test.cc b/components/browser_sync/abstract_profile_sync_service_test.cc
index 9baf0a5d90b5e2ea0508326ee68bf74e5fc157ac..153962eb4c3e4378b5635166cb656d460309f1a3 100644
--- a/components/browser_sync/abstract_profile_sync_service_test.cc
+++ b/components/browser_sync/abstract_profile_sync_service_test.cc
@@ -86,11 +86,9 @@ SyncBackendHostForProfileSyncTest::~SyncBackendHostForProfileSyncTest() {}
void SyncBackendHostForProfileSyncTest::InitCore(
std::unique_ptr<syncer::DoInitializeOptions> options) {
- options->http_bridge_factory =
- std::unique_ptr<syncer::HttpPostProviderFactory>(
- new TestHttpBridgeFactory());
- options->sync_manager_factory.reset(
- new syncer::SyncManagerFactoryForProfileSyncTest(callback_));
+ options->http_bridge_factory = base::MakeUnique<TestHttpBridgeFactory>();
+ options->sync_manager_factory =
+ base::MakeUnique<syncer::SyncManagerFactoryForProfileSyncTest>(callback_);
options->credentials.email = "testuser@gmail.com";
options->credentials.sync_token = "token";
options->credentials.scope_set.insert(GaiaConstants::kChromeSyncOAuth2Scope);
@@ -101,10 +99,10 @@ void SyncBackendHostForProfileSyncTest::InitCore(
// free it. Grab the switches to pass on first.
syncer::EngineComponentsFactory::Switches factory_switches =
options->engine_components_factory->GetSwitches();
- options->engine_components_factory.reset(
- new syncer::TestEngineComponentsFactory(
+ options->engine_components_factory =
+ base::MakeUnique<syncer::TestEngineComponentsFactory>(
factory_switches, syncer::EngineComponentsFactory::STORAGE_IN_MEMORY,
- nullptr));
+ nullptr);
SyncBackendHostImpl::InitCore(std::move(options));
}
« no previous file with comments | « chrome/browser/sync/test/integration/sync_test.cc ('k') | components/browser_sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698