Chromium Code Reviews| Index: chrome/browser/extensions/api/token_cache/token_cache_factory.cc |
| diff --git a/chrome/browser/extensions/api/token_cache/token_cache_factory.cc b/chrome/browser/extensions/api/token_cache/token_cache_factory.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b8262a4f254401aae5f1279ed7e836254fd6a976 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/api/token_cache/token_cache_factory.cc |
| @@ -0,0 +1,45 @@ |
| +// 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/extensions/api/token_cache/token_cache_factory.h" |
| + |
| +#include "chrome/browser/extensions/api/token_cache/token_cache.h" |
| +#include "chrome/browser/extensions/extension_system_factory.h" |
| +#include "chrome/browser/profiles/profile_dependency_manager.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()) { |
| +} |
| + |
| +TokenCacheServiceFactory::~TokenCacheServiceFactory() { |
| +} |
| + |
| +ProfileKeyedService* TokenCacheServiceFactory::BuildServiceInstanceFor( |
| + Profile* profile) const { |
| + return new TokenCacheService(profile); |
| +} |
| + |
| +bool TokenCacheServiceFactory::ServiceRedirectedInIncognito() const { |
|
dcheng
2013/03/04 22:40:59
Please remove methods that simply use the default
Pete Williamson
2013/03/05 19:42:25
Done.
|
| + return false; |
| +} |
| + |
| +bool TokenCacheServiceFactory::ServiceIsCreatedWithProfile() const { |
| + return false; |
| +} |
| + |
| +bool TokenCacheServiceFactory::ServiceIsNULLWhileTesting() const { |
| + return false; |
| +} |