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

Side by Side Diff: chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc

Issue 809313009: Make the SigninErrorController a PKS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Copyrighted: 2015 Created 5 years, 11 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/profiles/profile.h" 5 #include "chrome/browser/profiles/profile.h"
6 #include "chrome/browser/signin/chrome_signin_client_factory.h" 6 #include "chrome/browser/signin/chrome_signin_client_factory.h"
7 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h" 7 #include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
8 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h" 8 #include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
9 #include "chrome/browser/signin/signin_error_controller_factory.h"
9 10
10 // TODO(blundell): Should these be namespaced? 11 // TODO(blundell): Should these be namespaced?
11 KeyedService* BuildFakeProfileOAuth2TokenService( 12 KeyedService* BuildFakeProfileOAuth2TokenService(
12 content::BrowserContext* context) { 13 content::BrowserContext* context) {
13 Profile* profile = Profile::FromBrowserContext(context); 14 Profile* profile = Profile::FromBrowserContext(context);
14 FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService(); 15 FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService();
15 service->Initialize( 16 service->Initialize(
16 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile)); 17 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
18 SigninErrorControllerFactory::GetInstance()->GetForProfile(profile));
17 return service; 19 return service;
18 } 20 }
19 21
20 KeyedService* BuildAutoIssuingFakeProfileOAuth2TokenService( 22 KeyedService* BuildAutoIssuingFakeProfileOAuth2TokenService(
21 content::BrowserContext* context) { 23 content::BrowserContext* context) {
22 Profile* profile = Profile::FromBrowserContext(context); 24 Profile* profile = Profile::FromBrowserContext(context);
23 FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService(); 25 FakeProfileOAuth2TokenService* service = new FakeProfileOAuth2TokenService();
24 service->set_auto_post_fetch_response_on_message_loop(true); 26 service->set_auto_post_fetch_response_on_message_loop(true);
25 service->Initialize( 27 service->Initialize(
26 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile)); 28 ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
29 SigninErrorControllerFactory::GetInstance()->GetForProfile(profile));
27 return service; 30 return service;
28 } 31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698