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

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

Issue 12647008: Refactor OAuth2TokenService to have profile- and device-based implementations. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase again Created 7 years, 8 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/oauth2_token_service_factory.cc
diff --git a/chrome/browser/signin/oauth2_token_service_factory.cc b/chrome/browser/signin/oauth2_token_service_factory.cc
deleted file mode 100644
index c0ca0be9672ea065e22c8668b0f99f6d397645e9..0000000000000000000000000000000000000000
--- a/chrome/browser/signin/oauth2_token_service_factory.cc
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/signin/oauth2_token_service_factory.h"
-
-#include "chrome/browser/profiles/profile_dependency_manager.h"
-#include "chrome/browser/signin/oauth2_token_service.h"
-#include "chrome/browser/signin/signin_manager_factory.h"
-#include "chrome/browser/signin/token_service_factory.h"
-
-OAuth2TokenServiceFactory::OAuth2TokenServiceFactory()
- : ProfileKeyedServiceFactory("OAuth2TokenService",
- ProfileDependencyManager::GetInstance()) {
- DependsOn(SigninManagerFactory::GetInstance());
- DependsOn(TokenServiceFactory::GetInstance());
-}
-
-OAuth2TokenServiceFactory::~OAuth2TokenServiceFactory() {
-}
-
-// static
-OAuth2TokenService* OAuth2TokenServiceFactory::GetForProfile(Profile* profile) {
- return static_cast<OAuth2TokenService*>(
- GetInstance()->GetServiceForProfile(profile, true));
-}
-
-// static
-OAuth2TokenServiceFactory* OAuth2TokenServiceFactory::GetInstance() {
- return Singleton<OAuth2TokenServiceFactory>::get();
-}
-
-ProfileKeyedService* OAuth2TokenServiceFactory::BuildServiceInstanceFor(
- Profile* profile) const {
- OAuth2TokenService* service = new OAuth2TokenService();
- service->Initialize(profile);
- return service;
-}
« no previous file with comments | « chrome/browser/signin/oauth2_token_service_factory.h ('k') | chrome/browser/signin/oauth2_token_service_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698