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

Side by Side Diff: ios/chrome/browser/signin/account_fetcher_service_factory.cc

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase? Created 4 years, 8 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/signin/account_fetcher_service_factory.h" 5 #include "ios/chrome/browser/signin/account_fetcher_service_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "components/keyed_service/ios/browser_state_dependency_manager.h" 10 #include "components/keyed_service/ios/browser_state_dependency_manager.h"
(...skipping 27 matching lines...) Expand all
38 // static 38 // static
39 AccountFetcherServiceFactory* AccountFetcherServiceFactory::GetInstance() { 39 AccountFetcherServiceFactory* AccountFetcherServiceFactory::GetInstance() {
40 return base::Singleton<AccountFetcherServiceFactory>::get(); 40 return base::Singleton<AccountFetcherServiceFactory>::get();
41 } 41 }
42 42
43 void AccountFetcherServiceFactory::RegisterBrowserStatePrefs( 43 void AccountFetcherServiceFactory::RegisterBrowserStatePrefs(
44 user_prefs::PrefRegistrySyncable* registry) { 44 user_prefs::PrefRegistrySyncable* registry) {
45 AccountFetcherService::RegisterPrefs(registry); 45 AccountFetcherService::RegisterPrefs(registry);
46 } 46 }
47 47
48 scoped_ptr<KeyedService> AccountFetcherServiceFactory::BuildServiceInstanceFor( 48 std::unique_ptr<KeyedService>
49 AccountFetcherServiceFactory::BuildServiceInstanceFor(
49 web::BrowserState* context) const { 50 web::BrowserState* context) const {
50 ios::ChromeBrowserState* browser_state = 51 ios::ChromeBrowserState* browser_state =
51 ios::ChromeBrowserState::FromBrowserState(context); 52 ios::ChromeBrowserState::FromBrowserState(context);
52 scoped_ptr<AccountFetcherService> service(new AccountFetcherService()); 53 std::unique_ptr<AccountFetcherService> service(new AccountFetcherService());
53 service->Initialize( 54 service->Initialize(
54 SigninClientFactory::GetForBrowserState(browser_state), 55 SigninClientFactory::GetForBrowserState(browser_state),
55 OAuth2TokenServiceFactory::GetForBrowserState(browser_state), 56 OAuth2TokenServiceFactory::GetForBrowserState(browser_state),
56 ios::AccountTrackerServiceFactory::GetForBrowserState(browser_state)); 57 ios::AccountTrackerServiceFactory::GetForBrowserState(browser_state));
57 return std::move(service); 58 return std::move(service);
58 } 59 }
59 60
60 } // namespace ios 61 } // namespace ios
OLDNEW
« no previous file with comments | « ios/chrome/browser/signin/account_fetcher_service_factory.h ('k') | ios/chrome/browser/signin/account_reconcilor_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698