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

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

Issue 1251463002: iOS factories for ProfileOAuth2TokenService and AccountTrackerService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@componentizeOAuth2
Patch Set: Review comments Created 5 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ios/chrome/browser/signin/fake_oauth2_token_service_builder.h"
6
7 #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 "ios/chrome/browser/signin/signin_client_factory.h"
10 #include "ios/chrome/browser/signin/signin_error_controller_factory.h"
11 #include "ios/public/provider/chrome/browser/browser_state/chrome_browser_state. h"
12 #include "ios/public/provider/chrome/browser/chrome_browser_provider.h"
13
14 scoped_ptr<KeyedService> BuildFakeOAuth2TokenService(
15 web::BrowserState* context) {
16 ios::ChromeBrowserState* browser_state =
17 ios::ChromeBrowserState::FromBrowserState(context);
18 OAuth2TokenServiceDelegate* delegate =
19 new FakeProfileOAuth2TokenServiceIOSDelegate(
20 SigninClientFactory::GetForBrowserState(browser_state),
21 ios::GetChromeBrowserProvider()
22 ->GetProfileOAuth2TokenServiceIOSProvider(),
23 ios::SigninErrorControllerFactory::GetForBrowserState(browser_state));
24 return make_scoped_ptr(new FakeProfileOAuth2TokenService(delegate));
25 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698