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

Side by Side Diff: ios/chrome/browser/signin/fake_oauth2_token_service_builder.mm

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/fake_oauth2_token_service_builder.h" 5 #include "ios/chrome/browser/signin/fake_oauth2_token_service_builder.h"
6 6
7 #include "base/memory/ptr_util.h"
7 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" 8 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
8 #include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_de legate.h" 9 #include "components/signin/ios/browser/fake_profile_oauth2_token_service_ios_de legate.h"
9 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
10 #include "ios/chrome/browser/signin/account_tracker_service_factory.h" 11 #include "ios/chrome/browser/signin/account_tracker_service_factory.h"
11 #include "ios/chrome/browser/signin/signin_client_factory.h" 12 #include "ios/chrome/browser/signin/signin_client_factory.h"
12 #include "ios/chrome/browser/signin/signin_error_controller_factory.h" 13 #include "ios/chrome/browser/signin/signin_error_controller_factory.h"
13 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h" 14 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
14 15
15 scoped_ptr<KeyedService> BuildFakeOAuth2TokenService( 16 std::unique_ptr<KeyedService> BuildFakeOAuth2TokenService(
16 web::BrowserState* context) { 17 web::BrowserState* context) {
17 ios::ChromeBrowserState* browser_state = 18 ios::ChromeBrowserState* browser_state =
18 ios::ChromeBrowserState::FromBrowserState(context); 19 ios::ChromeBrowserState::FromBrowserState(context);
19 OAuth2TokenServiceDelegate* delegate = 20 OAuth2TokenServiceDelegate* delegate =
20 new FakeProfileOAuth2TokenServiceIOSDelegate( 21 new FakeProfileOAuth2TokenServiceIOSDelegate(
21 SigninClientFactory::GetForBrowserState(browser_state), 22 SigninClientFactory::GetForBrowserState(browser_state),
22 ios::GetChromeBrowserProvider() 23 ios::GetChromeBrowserProvider()
23 ->GetProfileOAuth2TokenServiceIOSProvider(), 24 ->GetProfileOAuth2TokenServiceIOSProvider(),
24 ios::AccountTrackerServiceFactory::GetForBrowserState(browser_state), 25 ios::AccountTrackerServiceFactory::GetForBrowserState(browser_state),
25 ios::SigninErrorControllerFactory::GetForBrowserState(browser_state)); 26 ios::SigninErrorControllerFactory::GetForBrowserState(browser_state));
26 return make_scoped_ptr(new FakeProfileOAuth2TokenService(delegate)); 27 return base::WrapUnique(new FakeProfileOAuth2TokenService(delegate));
27 } 28 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/signin/fake_oauth2_token_service_builder.h ('k') | ios/chrome/browser/signin/fake_signin_manager_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698