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

Unified Diff: components/sync/device_info/device_info_data_type_controller_unittest.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/device_info_data_type_controller_unittest.cc
diff --git a/components/sync/device_info/device_info_data_type_controller_unittest.cc b/components/sync/device_info/device_info_data_type_controller_unittest.cc
index 5ffd5411ce9d00c4be0fe2126a5f6ab762b1b21f..6d04d5f7c539a3a688a8eac3ce9156f5f3986b2e 100644
--- a/components/sync/device_info/device_info_data_type_controller_unittest.cc
+++ b/components/sync/device_info/device_info_data_type_controller_unittest.cc
@@ -6,6 +6,7 @@
#include "base/bind.h"
#include "base/callback.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/run_loop.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -28,12 +29,12 @@ class DeviceInfoDataTypeControllerTest : public testing::Test {
~DeviceInfoDataTypeControllerTest() override {}
void SetUp() override {
- local_device_.reset(new LocalDeviceInfoProviderMock(
+ local_device_ = base::MakeUnique<LocalDeviceInfoProviderMock>(
"cache_guid", "Wayne Gretzky's Hacking Box", "Chromium 10k",
- "Chrome 10k", sync_pb::SyncEnums_DeviceType_TYPE_LINUX, "device_id"));
+ "Chrome 10k", sync_pb::SyncEnums_DeviceType_TYPE_LINUX, "device_id");
- controller_.reset(new DeviceInfoDataTypeController(
- base::Closure(), &sync_client_, local_device_.get()));
+ controller_ = base::MakeUnique<DeviceInfoDataTypeController>(
+ base::Closure(), &sync_client_, local_device_.get());
load_finished_ = false;
last_type_ = UNSPECIFIED;
« no previous file with comments | « components/sync/base/proto_value_ptr_unittest.cc ('k') | components/sync/device_info/device_info_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698