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

Unified Diff: chrome/browser/sync/sync_error_notifier_ash_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: chrome/browser/sync/sync_error_notifier_ash_unittest.cc
diff --git a/chrome/browser/sync/sync_error_notifier_ash_unittest.cc b/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
index 9dc33be2b75d413ff02b683c091d1b64ba410851..a9ae11b54bbe26dbae9653a34f74c400f3610dc1 100644
--- a/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
+++ b/chrome/browser/sync/sync_error_notifier_ash_unittest.cc
@@ -89,29 +89,30 @@ class SyncErrorNotifierTest : public AshTestBase {
// Set up a desktop screen for Windows to hold native widgets, used when
// adding desktop widgets (i.e., message center notifications).
#if defined(OS_WIN)
- test_screen_.reset(aura::TestScreen::Create(gfx::Size()));
+ test_screen_ = base::MakeUnique<aura::TestScreen::Create>(gfx::Size());
display::Screen::SetScreenInstance(test_screen_.get());
#endif
AshTestBase::SetUp();
- profile_manager_.reset(
- new TestingProfileManager(TestingBrowserProcess::GetGlobal()));
+ profile_manager_ = base::MakeUnique<TestingProfileManager>(
+ TestingBrowserProcess::GetGlobal());
ASSERT_TRUE(profile_manager_->SetUp());
profile_ = profile_manager_->CreateTestingProfile(kTestAccountId);
- service_.reset(new browser_sync::ProfileSyncServiceMock(
- CreateProfileSyncServiceParamsForTest(profile_)));
+ service_ = base::MakeUnique<browser_sync::ProfileSyncServiceMock>(
+ CreateProfileSyncServiceParamsForTest(profile_));
FakeLoginUIService* login_ui_service = static_cast<FakeLoginUIService*>(
LoginUIServiceFactory::GetInstance()->SetTestingFactoryAndUse(
profile_, BuildMockLoginUIService));
login_ui_service->SetLoginUI(&login_ui_);
- error_controller_.reset(new syncer::SyncErrorController(service_.get()));
- error_notifier_.reset(new SyncErrorNotifier(error_controller_.get(),
- profile_));
+ error_controller_ =
+ base::MakeUnique<syncer::SyncErrorController>(service_.get());
+ error_notifier_ =
+ base::MakeUnique<SyncErrorNotifier>(error_controller_.get(), profile_);
notification_ui_manager_ = g_browser_process->notification_ui_manager();
}
« no previous file with comments | « chrome/browser/sync/sessions/sessions_sync_manager_unittest.cc ('k') | chrome/browser/sync/sync_startup_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698