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

Unified Diff: chrome/browser/sync/test/integration/sync_arc_package_helper.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: chrome/browser/sync/test/integration/sync_arc_package_helper.cc
diff --git a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
index 609c855e72441f3a77dc9dde6577233b5ee9f7dc..df3a874898bac8bec6d3548d41ad7919bbf19fe7 100644
--- a/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
+++ b/chrome/browser/sync/test/integration/sync_arc_package_helper.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/command_line.h"
+#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/chromeos/arc/arc_auth_service.h"
@@ -67,8 +68,8 @@ void SyncArcPackageHelper::SetupTest(SyncTest* test) {
}
test_ = test;
- user_manager_enabler_.reset(new chromeos::ScopedUserManagerEnabler(
- new chromeos::FakeChromeUserManager()));
+ user_manager_enabler_ = base::MakeUnique<chromeos::ScopedUserManagerEnabler>(
+ new chromeos::FakeChromeUserManager());
base::CommandLine::ForCurrentProcess()->AppendSwitch(
chromeos::switches::kEnableArc);
ArcAppListPrefsFactory::SetFactoryForSyncTest();
@@ -166,7 +167,8 @@ void SyncArcPackageHelper::SetupArcService(Profile* profile, size_t id) {
arc_app_list_prefs->SetDefaltAppsReadyCallback(run_loop.QuitClosure());
run_loop.Run();
- instance_map_[profile].reset(new FakeAppInstance(arc_app_list_prefs));
+ instance_map_[profile] =
+ base::MakeUnique<FakeAppInstance>(arc_app_list_prefs);
DCHECK(instance_map_[profile].get());
arc_app_list_prefs->app_instance_holder()->SetInstance(
instance_map_[profile].get());
« no previous file with comments | « chrome/browser/sync/sync_startup_tracker_unittest.cc ('k') | chrome/browser/sync/test/integration/sync_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698