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

Unified Diff: components/sync/driver/glue/sync_backend_host_impl.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_host_impl.cc
diff --git a/components/sync/driver/glue/sync_backend_host_impl.cc b/components/sync/driver/glue/sync_backend_host_impl.cc
index 072c5f616bd9cf7c4c63cb3427f63ed05e7a7110..3c8f4f69ac2e5ad0a93174a821d5870d78a91fc4 100644
--- a/components/sync/driver/glue/sync_backend_host_impl.cc
+++ b/components/sync/driver/glue/sync_backend_host_impl.cc
@@ -10,6 +10,7 @@
#include "base/feature_list.h"
#include "base/location.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/invalidation/public/invalidation_service.h"
#include "components/invalidation/public/object_id_invalidation_map.h"
@@ -83,9 +84,9 @@ void SyncBackendHostImpl::Initialize(
const base::Closure& report_unrecoverable_error_function,
const HttpPostProviderFactoryGetter& http_post_provider_factory_getter,
std::unique_ptr<SyncEncryptionHandler::NigoriState> saved_nigori_state) {
- registrar_.reset(new SyncBackendRegistrar(name_, sync_client_,
- std::move(sync_thread), ui_thread_,
- db_thread, file_thread));
+ registrar_ = base::MakeUnique<SyncBackendRegistrar>(
+ name_, sync_client_, std::move(sync_thread), ui_thread_, db_thread,
+ file_thread);
CHECK(registrar_->sync_thread());
frontend_ = frontend;
« no previous file with comments | « components/sync/driver/glue/sync_backend_host_core.cc ('k') | components/sync/driver/glue/sync_backend_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698