NaCl: Update revision in DEPS, r12770 -> r12773
[chromium-blink-merge.git] / chrome / browser / extensions / token_cache / token_cache_service_factory.cc
blob47381d7685dd0fb2f7fbf658c334536a7f4ba30c
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.
5 #include "chrome/browser/extensions/token_cache/token_cache_service_factory.h"
7 #include "chrome/browser/extensions/token_cache/token_cache_service.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/browser_context_keyed_service/browser_context_dependency_manager.h"
11 // static
12 extensions::TokenCacheService*
13 TokenCacheServiceFactory::GetForProfile(Profile* profile) {
14 return static_cast<extensions::TokenCacheService*>(
15 GetInstance()->GetServiceForBrowserContext(profile, true));
18 // static
19 TokenCacheServiceFactory* TokenCacheServiceFactory::GetInstance() {
20 return Singleton<TokenCacheServiceFactory>::get();
23 TokenCacheServiceFactory::TokenCacheServiceFactory()
24 : BrowserContextKeyedServiceFactory(
25 "TokenCacheService",
26 BrowserContextDependencyManager::GetInstance()) {
29 TokenCacheServiceFactory::~TokenCacheServiceFactory() {
32 BrowserContextKeyedService* TokenCacheServiceFactory::BuildServiceInstanceFor(
33 content::BrowserContext* profile) const {
34 return new extensions::TokenCacheService(static_cast<Profile*>(profile));