Index: chrome/browser/token_cache/token_cache_factory.cc |
diff --git a/chrome/browser/token_cache/token_cache_factory.cc b/chrome/browser/token_cache/token_cache_factory.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..64bffc4621a51cdfee97dd1eb72bd49251d7aafa |
--- /dev/null |
+++ b/chrome/browser/token_cache/token_cache_factory.cc |
@@ -0,0 +1,46 @@ |
+// Copyright (c) 2013 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/token_cache/token_cache_factory.h" |
+ |
+#include "chrome/browser/extensions/extension_system_factory.h" |
+#include "chrome/browser/profiles/profile_dependency_manager.h" |
+#include "chrome/browser/token_cache/token_cache.h" |
+ |
+ // static |
+ TokenCacheService* TokenCacheServiceFactory::GetForProfile(Profile* profile) { |
+ return static_cast<TokenCacheService*>( |
+ GetInstance()->GetServiceForProfile(profile, true)); |
+ } |
+ |
+// static |
+TokenCacheServiceFactory* TokenCacheServiceFactory::GetInstance() { |
+ return Singleton<TokenCacheServiceFactory>::get(); |
+} |
+ |
+TokenCacheServiceFactory::TokenCacheServiceFactory() |
+ : ProfileKeyedServiceFactory("TokenCacheService", |
+ ProfileDependencyManager::GetInstance()) { |
+ 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
|
+} |
+ |
+TokenCacheServiceFactory::~TokenCacheServiceFactory() { |
+} |
+ |
+ProfileKeyedService* TokenCacheServiceFactory::BuildServiceInstanceFor( |
+ Profile* profile) const { |
+ return new TokenCacheService(profile); |
+} |
+ |
+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.
|
+ return true; |
+} |
+ |
+bool TokenCacheServiceFactory::ServiceIsCreatedWithProfile() const { |
+ 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.
|
+} |
+ |
+bool TokenCacheServiceFactory::ServiceIsNULLWhileTesting() const { |
+ 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.
|
+} |