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

Unified Diff: chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc

Issue 1143323005: Refactor AO2TS to make it easier to componentize. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address final comments Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
diff --git a/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc b/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
index 1888211e1993218343bb0646af6f33d128397171..a6d6449c25982434dc1f9685a1747f8bb1f33fa0 100644
--- a/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
+++ b/chrome/browser/signin/fake_profile_oauth2_token_service_builder.cc
@@ -4,31 +4,20 @@
#include "chrome/browser/signin/fake_profile_oauth2_token_service_builder.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/signin/chrome_signin_client_factory.h"
#include "chrome/browser/signin/fake_profile_oauth2_token_service.h"
-#include "chrome/browser/signin/signin_error_controller_factory.h"
// TODO(blundell): Should these be namespaced?
scoped_ptr<KeyedService> BuildFakeProfileOAuth2TokenService(
content::BrowserContext* context) {
- Profile* profile = Profile::FromBrowserContext(context);
scoped_ptr<FakeProfileOAuth2TokenService> service(
new FakeProfileOAuth2TokenService());
- service->Initialize(
- ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
- SigninErrorControllerFactory::GetInstance()->GetForProfile(profile));
return service.Pass();
}
scoped_ptr<KeyedService> BuildAutoIssuingFakeProfileOAuth2TokenService(
content::BrowserContext* context) {
- Profile* profile = Profile::FromBrowserContext(context);
scoped_ptr<FakeProfileOAuth2TokenService> service(
new FakeProfileOAuth2TokenService());
service->set_auto_post_fetch_response_on_message_loop(true);
- service->Initialize(
- ChromeSigninClientFactory::GetInstance()->GetForProfile(profile),
- SigninErrorControllerFactory::GetInstance()->GetForProfile(profile));
return service.Pass();
}

Powered by Google App Engine
This is Rietveld 408576698