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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/signin/oauth2_token_service_factory.h"
6
7 #include "chrome/browser/profiles/profile_dependency_manager.h"
8 #include "chrome/browser/signin/oauth2_token_service.h"
9 #include "chrome/browser/signin/token_service_factory.h"
10
11 OAuth2TokenServiceFactory::OAuth2TokenServiceFactory()
12 : ProfileKeyedServiceFactory("OAuth2TokenService",
13 ProfileDependencyManager::GetInstance()) {
14 DependsOn(TokenServiceFactory::GetInstance());
15 }
16
17 OAuth2TokenServiceFactory::~OAuth2TokenServiceFactory() {
18 }
19
20 // static
21 OAuth2TokenService* OAuth2TokenServiceFactory::GetForProfile(Profile* profile) {
22 return static_cast<OAuth2TokenService*>(
23 GetInstance()->GetServiceForProfile(profile, true));
24 }
25
26 // static
27 OAuth2TokenServiceFactory* OAuth2TokenServiceFactory::GetInstance() {
28 return Singleton<OAuth2TokenServiceFactory>::get();
29 }
30
31 ProfileKeyedService* OAuth2TokenServiceFactory::BuildServiceInstanceFor(
32 Profile* profile) const {
33 OAuth2TokenService* service = new OAuth2TokenService();
34 service->Initialize(profile);
35 return service;
36 }
OLDNEW
« 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