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

Unified Diff: chrome/browser/sync/profile_sync_test_util.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky Created 4 years, 3 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/profile_sync_test_util.cc
diff --git a/chrome/browser/sync/profile_sync_test_util.cc b/chrome/browser/sync/profile_sync_test_util.cc
index aee56f3b867565a35842a8d184dcad3cf70b0991..7261d1b68ef4af512ce777a9fb333e872698a7b4 100644
--- a/chrome/browser/sync/profile_sync_test_util.cc
+++ b/chrome/browser/sync/profile_sync_test_util.cc
@@ -23,11 +23,10 @@
ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest(
Profile* profile) {
- auto sync_client =
- base::WrapUnique(new browser_sync::ChromeSyncClient(profile));
+ auto sync_client = base::MakeUnique<browser_sync::ChromeSyncClient>(profile);
sync_client->SetSyncApiComponentFactoryForTesting(
- base::WrapUnique(new SyncApiComponentFactoryMock()));
+ base::MakeUnique<SyncApiComponentFactoryMock>());
ProfileSyncService::InitParams init_params =
CreateProfileSyncServiceParamsForTest(std::move(sync_client), profile);
@@ -40,8 +39,8 @@ ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest(
Profile* profile) {
ProfileSyncService::InitParams init_params;
- init_params.signin_wrapper = base::WrapUnique(
- new SigninManagerWrapper(SigninManagerFactory::GetForProfile(profile)));
+ init_params.signin_wrapper = base::MakeUnique<SigninManagerWrapper>(
+ SigninManagerFactory::GetForProfile(profile));
init_params.oauth2_token_service =
ProfileOAuth2TokenServiceFactory::GetForProfile(profile);
init_params.start_behavior = ProfileSyncService::MANUAL_START;
@@ -62,7 +61,7 @@ ProfileSyncService::InitParams CreateProfileSyncServiceParamsForTest(
}
std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() {
- auto profile = base::WrapUnique(new TestingProfile());
+ auto profile = base::MakeUnique<TestingProfile>();
SigninManagerFactory::GetForProfile(profile.get())
->SetAuthenticatedAccountInfo("12345", "foo");
return profile;
@@ -70,7 +69,7 @@ std::unique_ptr<TestingProfile> MakeSignedInTestingProfile() {
std::unique_ptr<KeyedService> BuildMockProfileSyncService(
content::BrowserContext* context) {
- return base::WrapUnique(
- new ProfileSyncServiceMock(CreateProfileSyncServiceParamsForTest(
- Profile::FromBrowserContext(context))));
+ return base::MakeUnique<ProfileSyncServiceMock>(
+ CreateProfileSyncServiceParamsForTest(
+ Profile::FromBrowserContext(context)));
}
« no previous file with comments | « chrome/browser/sync/profile_sync_service_factory.cc ('k') | chrome/browser/sync/sync_error_notifier_ash_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698