OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 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/extensions/extension_pref_value_map_factory.h" | |
6 | |
7 #include "chrome/browser/extensions/extension_pref_value_map.h" | |
8 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | |
9 | |
10 ExtensionPrefValueMapFactory::ExtensionPrefValueMapFactory() | |
11 : BrowserContextKeyedServiceFactory( | |
12 "ExtensionPrefValueMap", | |
13 BrowserContextDependencyManager::GetInstance()) { | |
14 } | |
15 | |
16 ExtensionPrefValueMapFactory::~ExtensionPrefValueMapFactory() { | |
17 } | |
18 | |
19 // static | |
20 ExtensionPrefValueMap* ExtensionPrefValueMapFactory::GetForBrowserContext( | |
21 content::BrowserContext* context) { | |
22 return static_cast<ExtensionPrefValueMap*>( | |
23 GetInstance()->GetServiceForBrowserContext(context, true)); | |
24 } | |
25 | |
26 // static | |
27 ExtensionPrefValueMapFactory* ExtensionPrefValueMapFactory::GetInstance() { | |
28 return Singleton<ExtensionPrefValueMapFactory>::get(); | |
29 } | |
30 | |
31 BrowserContextKeyedService* | |
32 ExtensionPrefValueMapFactory::BuildServiceInstanceFor( | |
33 content::BrowserContext* context) const { | |
34 return new ExtensionPrefValueMap(); | |
35 } | |
OLD | NEW |