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

Unified Diff: chrome/browser/chromeos/login/oauth2_login_manager_factory.cc

Issue 23678007: OAuth2LoginManager+MergeSessionThrottle hardening, multi-profle support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/chromeos/login/oauth2_login_manager_factory.cc
diff --git a/chrome/browser/signin/profile_oauth2_token_service_factory.cc b/chrome/browser/chromeos/login/oauth2_login_manager_factory.cc
similarity index 50%
copy from chrome/browser/signin/profile_oauth2_token_service_factory.cc
copy to chrome/browser/chromeos/login/oauth2_login_manager_factory.cc
index 23dbcae132c9ff02cfa0af63ca63c14a4758aa42..48d055b2dd21a4e80cd79d5ba9c8a8a6629f8fdf 100644
--- a/chrome/browser/signin/profile_oauth2_token_service_factory.cc
+++ b/chrome/browser/chromeos/login/oauth2_login_manager_factory.cc
@@ -2,59 +2,51 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
+#include "chrome/browser/chromeos/login/oauth2_login_manager_factory.h"
+#include "chrome/browser/chromeos/login/oauth2_login_manager.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/signin/profile_oauth2_token_service.h"
+#include "chrome/browser/signin/profile_oauth2_token_service_factory.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/signin/token_service_factory.h"
#include "chrome/browser/ui/global_error/global_error_service_factory.h"
#include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
-ProfileOAuth2TokenServiceFactory::ProfileOAuth2TokenServiceFactory()
+namespace chromeos {
+
+OAuth2LoginManagerFactory::OAuth2LoginManagerFactory()
: BrowserContextKeyedServiceFactory(
- "ProfileOAuth2TokenService",
+ "OAuth2LoginManager",
BrowserContextDependencyManager::GetInstance()) {
DependsOn(GlobalErrorServiceFactory::GetInstance());
DependsOn(SigninManagerFactory::GetInstance());
DependsOn(TokenServiceFactory::GetInstance());
+ DependsOn(ProfileOAuth2TokenServiceFactory::GetInstance());
}
-ProfileOAuth2TokenServiceFactory::~ProfileOAuth2TokenServiceFactory() {
+OAuth2LoginManagerFactory::~OAuth2LoginManagerFactory() {
}
-#if defined(OS_ANDROID)
// static
-AndroidProfileOAuth2TokenService*
- ProfileOAuth2TokenServiceFactory::GetForProfile(Profile* profile) {
- return static_cast<AndroidProfileOAuth2TokenService*>(
- GetInstance()->GetServiceForBrowserContext(profile, true));
-}
-#else
-// static
-ProfileOAuth2TokenService* ProfileOAuth2TokenServiceFactory::GetForProfile(
+OAuth2LoginManager* OAuth2LoginManagerFactory::GetForProfile(
Profile* profile) {
- return static_cast<ProfileOAuth2TokenService*>(
+ return static_cast<OAuth2LoginManager*>(
GetInstance()->GetServiceForBrowserContext(profile, true));
}
-#endif // defined(OS_ANDROID)
// static
-ProfileOAuth2TokenServiceFactory*
- ProfileOAuth2TokenServiceFactory::GetInstance() {
- return Singleton<ProfileOAuth2TokenServiceFactory>::get();
+OAuth2LoginManagerFactory*
+ OAuth2LoginManagerFactory::GetInstance() {
+ return Singleton<OAuth2LoginManagerFactory>::get();
}
BrowserContextKeyedService*
-ProfileOAuth2TokenServiceFactory::BuildServiceInstanceFor(
+OAuth2LoginManagerFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
Profile* profile = static_cast<Profile*>(context);
- ProfileOAuth2TokenService* service;
-#if defined(OS_ANDROID)
- service = new AndroidProfileOAuth2TokenService();
-#else
- service = new ProfileOAuth2TokenService();
-#endif
- service->Initialize(profile);
+ OAuth2LoginManager* service;
+ service = new OAuth2LoginManager(profile);
return service;
}
+
+} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/login/oauth2_login_manager_factory.h ('k') | chrome/browser/chromeos/login/oauth_login_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698