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

Side by Side Diff: ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provider_factory.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid er_factory.h" 5 #include "ios/chrome/browser/invalidation/ios_chrome_profile_invalidation_provid er_factory.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 66
67 std::unique_ptr<IdentityProvider> identity_provider( 67 std::unique_ptr<IdentityProvider> identity_provider(
68 new ProfileIdentityProvider( 68 new ProfileIdentityProvider(
69 ios::SigninManagerFactory::GetForBrowserState(browser_state), 69 ios::SigninManagerFactory::GetForBrowserState(browser_state),
70 OAuth2TokenServiceFactory::GetForBrowserState(browser_state), 70 OAuth2TokenServiceFactory::GetForBrowserState(browser_state),
71 // LoginUIServiceFactory is not built on iOS. 71 // LoginUIServiceFactory is not built on iOS.
72 base::Closure())); 72 base::Closure()));
73 73
74 std::unique_ptr<TiclInvalidationService> service(new TiclInvalidationService( 74 std::unique_ptr<TiclInvalidationService> service(new TiclInvalidationService(
75 web::GetWebClient()->GetUserAgent(false), std::move(identity_provider), 75 web::GetWebClient()->GetUserAgent(false), std::move(identity_provider),
76 base::WrapUnique(new invalidation::TiclProfileSettingsProvider( 76 base::MakeUnique<invalidation::TiclProfileSettingsProvider>(
77 browser_state->GetPrefs())), 77 browser_state->GetPrefs()),
78 IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state) 78 IOSChromeGCMProfileServiceFactory::GetForBrowserState(browser_state)
79 ->driver(), 79 ->driver(),
80 browser_state->GetRequestContext())); 80 browser_state->GetRequestContext()));
81 service->Init( 81 service->Init(
82 base::WrapUnique(new InvalidatorStorage(browser_state->GetPrefs()))); 82 base::MakeUnique<InvalidatorStorage>(browser_state->GetPrefs()));
83 83
84 return base::WrapUnique(new ProfileInvalidationProvider(std::move(service))); 84 return base::MakeUnique<ProfileInvalidationProvider>(std::move(service));
85 } 85 }
86 86
87 void IOSChromeProfileInvalidationProviderFactory::RegisterBrowserStatePrefs( 87 void IOSChromeProfileInvalidationProviderFactory::RegisterBrowserStatePrefs(
88 user_prefs::PrefRegistrySyncable* registry) { 88 user_prefs::PrefRegistrySyncable* registry) {
89 ProfileInvalidationProvider::RegisterProfilePrefs(registry); 89 ProfileInvalidationProvider::RegisterProfilePrefs(registry);
90 InvalidatorStorage::RegisterProfilePrefs(registry); 90 InvalidatorStorage::RegisterProfilePrefs(registry);
91 } 91 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/history/web_history_service_factory.cc ('k') | ios/chrome/browser/ios_chrome_io_thread.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698