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

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

Issue 2930303002: [ObjC ARC] Converts ios/chrome/browser/signin:test_support to ARC. (Closed)
Patch Set: Created 3 years, 6 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 "base/memory/ptr_util.h"
8 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h" 8 #include "components/signin/core/browser/fake_profile_oauth2_token_service.h"
9 #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegat e.h" 9 #include "components/signin/ios/browser/profile_oauth2_token_service_ios_delegat e.h"
10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h" 10 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
11 #include "ios/chrome/browser/signin/account_tracker_service_factory.h" 11 #include "ios/chrome/browser/signin/account_tracker_service_factory.h"
12 #include "ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_im pl.h" 12 #include "ios/chrome/browser/signin/profile_oauth2_token_service_ios_provider_im pl.h"
13 #include "ios/chrome/browser/signin/signin_client_factory.h" 13 #include "ios/chrome/browser/signin/signin_client_factory.h"
14 #include "ios/chrome/browser/signin/signin_error_controller_factory.h" 14 #include "ios/chrome/browser/signin/signin_error_controller_factory.h"
15 15
16 #if !defined(__has_feature) || !__has_feature(objc_arc)
17 #error "This file requires ARC support."
18 #endif
19
16 std::unique_ptr<KeyedService> BuildFakeOAuth2TokenService( 20 std::unique_ptr<KeyedService> BuildFakeOAuth2TokenService(
17 web::BrowserState* context) { 21 web::BrowserState* context) {
18 ios::ChromeBrowserState* browser_state = 22 ios::ChromeBrowserState* browser_state =
19 ios::ChromeBrowserState::FromBrowserState(context); 23 ios::ChromeBrowserState::FromBrowserState(context);
20 std::unique_ptr<OAuth2TokenServiceDelegate> delegate = 24 std::unique_ptr<OAuth2TokenServiceDelegate> delegate =
21 base::MakeUnique<ProfileOAuth2TokenServiceIOSDelegate>( 25 base::MakeUnique<ProfileOAuth2TokenServiceIOSDelegate>(
22 SigninClientFactory::GetForBrowserState(browser_state), 26 SigninClientFactory::GetForBrowserState(browser_state),
23 base::MakeUnique<ProfileOAuth2TokenServiceIOSProviderImpl>(), 27 base::MakeUnique<ProfileOAuth2TokenServiceIOSProviderImpl>(),
24 ios::AccountTrackerServiceFactory::GetForBrowserState(browser_state), 28 ios::AccountTrackerServiceFactory::GetForBrowserState(browser_state),
25 ios::SigninErrorControllerFactory::GetForBrowserState(browser_state)); 29 ios::SigninErrorControllerFactory::GetForBrowserState(browser_state));
26 return base::MakeUnique<FakeProfileOAuth2TokenService>(std::move(delegate)); 30 return base::MakeUnique<FakeProfileOAuth2TokenService>(std::move(delegate));
27 } 31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698