Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2013 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/token_cache/token_cache_factory.h" | |
| 6 | |
| 7 #include "chrome/browser/extensions/extension_system_factory.h" | |
| 8 #include "chrome/browser/profiles/profile_dependency_manager.h" | |
| 9 #include "chrome/browser/token_cache/token_cache.h" | |
| 10 | |
| 11 // static | |
| 12 TokenCacheService* TokenCacheServiceFactory::GetForProfile(Profile* profile) { | |
| 13 return static_cast<TokenCacheService*>( | |
| 14 GetInstance()->GetServiceForProfile(profile, true)); | |
| 15 } | |
| 16 | |
| 17 // static | |
| 18 TokenCacheServiceFactory* TokenCacheServiceFactory::GetInstance() { | |
| 19 return Singleton<TokenCacheServiceFactory>::get(); | |
| 20 } | |
| 21 | |
| 22 TokenCacheServiceFactory::TokenCacheServiceFactory() | |
| 23 : ProfileKeyedServiceFactory("TokenCacheService", | |
| 24 ProfileDependencyManager::GetInstance()) { | |
| 25 DependsOn(extensions::ExtensionSystemFactory::GetInstance()); | |
|
dcheng
2013/02/28 19:18:04
Shouldn't this dependency edge be the other way ar
Andrew T Wilson (Slow)
2013/03/01 17:50:54
Agreed, this shouldn't depend on ExtensionSystemFa
Pete Williamson
2013/03/04 18:32:53
Dependency removed (It was cut and pasted from an
| |
| 26 } | |
| 27 | |
| 28 TokenCacheServiceFactory::~TokenCacheServiceFactory() { | |
| 29 } | |
| 30 | |
| 31 ProfileKeyedService* TokenCacheServiceFactory::BuildServiceInstanceFor( | |
| 32 Profile* profile) const { | |
| 33 return new TokenCacheService(profile); | |
| 34 } | |
| 35 | |
| 36 bool TokenCacheServiceFactory::ServiceRedirectedInIncognito() const { | |
|
Andrew T Wilson (Slow)
2013/03/01 17:50:54
I don't think you want this. I think you want null
Pete Williamson
2013/03/04 18:32:53
Done.
| |
| 37 return true; | |
| 38 } | |
| 39 | |
| 40 bool TokenCacheServiceFactory::ServiceIsCreatedWithProfile() const { | |
| 41 return true; | |
|
Andrew T Wilson (Slow)
2013/03/01 17:50:54
Why do we need to create this with the profile? Ty
Pete Williamson
2013/03/04 18:32:53
Done.
| |
| 42 } | |
| 43 | |
| 44 bool TokenCacheServiceFactory::ServiceIsNULLWhileTesting() const { | |
| 45 return true; | |
|
Andrew T Wilson (Slow)
2013/03/01 17:50:54
Why are we doing this? There's no reason not to ha
Pete Williamson
2013/03/04 18:32:53
Done.
| |
| 46 } | |
| OLD | NEW |