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

Side by Side Diff: chrome/browser/signin/token_service_factory.cc

Issue 10185008: Taking over issue 10006037: Moved WebDataService to ProfileKeyedService (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/signin/token_service.cc ('k') | chrome/browser/signin/token_service_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/token_service_factory.h" 5 #include "chrome/browser/signin/token_service_factory.h"
6 6
7 #include "chrome/browser/profiles/profile_dependency_manager.h" 7 #include "chrome/browser/profiles/profile_dependency_manager.h"
8 #include "chrome/browser/signin/token_service.h" 8 #include "chrome/browser/signin/token_service.h"
9 #include "chrome/browser/webdata/web_data_service_factory.h"
9 10
10 TokenServiceFactory::TokenServiceFactory() 11 TokenServiceFactory::TokenServiceFactory()
11 : ProfileKeyedServiceFactory("TokenService", 12 : ProfileKeyedServiceFactory("TokenService",
12 ProfileDependencyManager::GetInstance()) { 13 ProfileDependencyManager::GetInstance()) {
13 // TODO(rlp): TokenService depends on WebDataService - when this is 14 DependsOn(WebDataServiceFactory::GetInstance());
14 // converted to the ProfileKeyedService framework, uncomment this dependency.
15 // DependsOn(WebDataServiceFactory::GetInstance());
16 } 15 }
17 16
18 TokenServiceFactory::~TokenServiceFactory() {} 17 TokenServiceFactory::~TokenServiceFactory() {}
19 18
20 // static 19 // static
21 TokenService* TokenServiceFactory::GetForProfile(Profile* profile) { 20 TokenService* TokenServiceFactory::GetForProfile(Profile* profile) {
22 return static_cast<TokenService*>( 21 return static_cast<TokenService*>(
23 GetInstance()->GetServiceForProfile(profile, true)); 22 GetInstance()->GetServiceForProfile(profile, true));
24 } 23 }
25 24
26 // static 25 // static
27 TokenServiceFactory* TokenServiceFactory::GetInstance() { 26 TokenServiceFactory* TokenServiceFactory::GetInstance() {
28 return Singleton<TokenServiceFactory>::get(); 27 return Singleton<TokenServiceFactory>::get();
29 } 28 }
30 29
31 ProfileKeyedService* TokenServiceFactory::BuildServiceInstanceFor( 30 ProfileKeyedService* TokenServiceFactory::BuildServiceInstanceFor(
32 Profile* profile) const { 31 Profile* profile) const {
33 return new TokenService(); 32 return new TokenService();
34 } 33 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/token_service.cc ('k') | chrome/browser/signin/token_service_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698