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

Unified Diff: chrome/browser/extensions/api/token_cache/token_cache_factory.cc

Issue 12380006: Build a new TokenCacheService so I can stop using TokenService for something it wasn't designed for. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Token Cache - CR changes per DCheng and ATWilson Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
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;
+}

Powered by Google App Engine
This is Rietveld 408576698