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

Unified Diff: components/sync/driver/glue/sync_backend_registrar.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/driver/glue/sync_backend_registrar.cc
diff --git a/components/sync/driver/glue/sync_backend_registrar.cc b/components/sync/driver/glue/sync_backend_registrar.cc
index 7a9fdebc5de4fe68dd7233e268b459b65ed86758..464261f4c15edf1d68412f36dde58ccc00cf6f38 100644
--- a/components/sync/driver/glue/sync_backend_registrar.cc
+++ b/components/sync/driver/glue/sync_backend_registrar.cc
@@ -9,6 +9,7 @@
#include <utility>
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "components/sync/driver/change_processor.h"
#include "components/sync/driver/sync_client.h"
@@ -33,7 +34,7 @@ SyncBackendRegistrar::SyncBackendRegistrar(
sync_thread_ = std::move(sync_thread);
if (!sync_thread_) {
- sync_thread_.reset(new base::Thread("Chrome_SyncThread"));
+ sync_thread_ = base::MakeUnique<base::Thread>("Chrome_SyncThread");
base::Thread::Options options;
options.timer_slack = base::TIMER_SLACK_MAXIMUM;
CHECK(sync_thread_->StartWithOptions(options));

Powered by Google App Engine
This is Rietveld 408576698