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

Unified Diff: components/sync/tools/sync_client.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
Index: components/sync/tools/sync_client.cc
diff --git a/components/sync/tools/sync_client.cc b/components/sync/tools/sync_client.cc
index c6a2e578584770e7c3be59d72c7d1fc4b068f202..36b355dd67cb38544f72ec68adf12604b39e14a9 100644
--- a/components/sync/tools/sync_client.cc
+++ b/components/sync/tools/sync_client.cc
@@ -98,7 +98,7 @@ class MyTestURLRequestContextGetter : public net::TestURLRequestContextGetter {
// Construct |context_| lazily so it gets constructed on the right
// thread (the IO thread).
if (!context_)
- context_.reset(new MyTestURLRequestContext());
+ context_ = base::MakeUnique<MyTestURLRequestContext>();
return context_.get();
}
@@ -427,8 +427,8 @@ int SyncClientMain(int argc, char* argv[]) {
args.restored_key_for_bootstrapping = kRestoredKeyForBootstrapping;
args.restored_keystore_key_for_bootstrapping =
kRestoredKeystoreKeyForBootstrapping;
- args.engine_components_factory.reset(
- new EngineComponentsFactoryImpl(factory_switches));
+ args.engine_components_factory =
+ base::MakeUnique<EngineComponentsFactoryImpl>(factory_switches);
args.encryptor = &null_encryptor;
args.unrecoverable_error_handler = WeakHandle<UnrecoverableErrorHandler>();
args.report_unrecoverable_error_function =
« no previous file with comments | « components/sync/test/engine/test_directory_setter_upper.cc ('k') | components/sync/tools/sync_listen_notifications.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698