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

Unified Diff: components/sync/device_info/local_device_info_provider_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/device_info/local_device_info_provider_impl.cc
diff --git a/components/sync/device_info/local_device_info_provider_impl.cc b/components/sync/device_info/local_device_info_provider_impl.cc
index 836bcbad685ee0fee5219b48de87a77b7a4f2335..9da066f34a5a0bc23671ffa646a5738ce1a99e17 100644
--- a/components/sync/device_info/local_device_info_provider_impl.cc
+++ b/components/sync/device_info/local_device_info_provider_impl.cc
@@ -5,6 +5,7 @@
#include "components/sync/device_info/local_device_info_provider_impl.h"
#include "base/bind.h"
+#include "base/memory/ptr_util.h"
#include "base/task_runner.h"
#include "build/build_config.h"
#include "components/sync/base/get_session_name.h"
@@ -94,9 +95,9 @@ void LocalDeviceInfoProviderImpl::InitializeContinuation(
return;
}
- local_device_info_.reset(
- new DeviceInfo(guid, session_name, version_, GetSyncUserAgent(),
- GetLocalDeviceType(is_tablet_), signin_scoped_device_id));
+ local_device_info_ = base::MakeUnique<DeviceInfo>(
+ guid, session_name, version_, GetSyncUserAgent(),
+ GetLocalDeviceType(is_tablet_), signin_scoped_device_id);
// Notify observers.
callback_list_.Notify();

Powered by Google App Engine
This is Rietveld 408576698