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

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

Issue 11038063: Support chrome_to_mobile job receiving Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix format Created 8 years, 1 month 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
« no previous file with comments | « chrome/browser/signin/oauth2_token_service_factory.h ('k') | chrome/browser/signin/signin_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..be4dcad09645db8ba097e3b89f90ef9be2a39419
--- /dev/null
+++ b/chrome/browser/signin/oauth2_token_service_factory.cc
@@ -0,0 +1,36 @@
+// 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/token_service_factory.h"
+
+OAuth2TokenServiceFactory::OAuth2TokenServiceFactory()
+ : ProfileKeyedServiceFactory("OAuth2TokenService",
+ ProfileDependencyManager::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/signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698