OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/extensions/install_limiter_factory.h" | 5 #include "chrome/browser/chromeos/extensions/install_limiter_factory.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/extensions/install_limiter.h" | 7 #include "chrome/browser/chromeos/extensions/install_limiter.h" |
8 #include "chrome/browser/extensions/extension_system_factory.h" | 8 #include "chrome/browser/extensions/extension_system_factory.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" | 10 #include "components/browser_context_keyed_service/browser_context_dependency_ma
nager.h" |
11 | 11 |
12 namespace extensions { | 12 namespace extensions { |
13 | 13 |
14 // static | 14 // static |
15 InstallLimiter* InstallLimiterFactory::GetForProfile(Profile* profile) { | 15 InstallLimiter* InstallLimiterFactory::GetForProfile(Profile* profile) { |
16 return static_cast<InstallLimiter*>( | 16 return static_cast<InstallLimiter*>( |
17 GetInstance()->GetServiceForProfile(profile, true)); | 17 GetInstance()->GetServiceForBrowserContext(profile, true)); |
18 } | 18 } |
19 | 19 |
20 // static | 20 // static |
21 InstallLimiterFactory* InstallLimiterFactory::GetInstance() { | 21 InstallLimiterFactory* InstallLimiterFactory::GetInstance() { |
22 return Singleton<InstallLimiterFactory>::get(); | 22 return Singleton<InstallLimiterFactory>::get(); |
23 } | 23 } |
24 | 24 |
25 InstallLimiterFactory::InstallLimiterFactory() | 25 InstallLimiterFactory::InstallLimiterFactory() |
26 : ProfileKeyedServiceFactory("InstallLimiter", | 26 : BrowserContextKeyedServiceFactory( |
27 ProfileDependencyManager::GetInstance()) { | 27 "InstallLimiter", |
| 28 BrowserContextDependencyManager::GetInstance()) { |
28 DependsOn(ExtensionSystemFactory::GetInstance()); | 29 DependsOn(ExtensionSystemFactory::GetInstance()); |
29 } | 30 } |
30 | 31 |
31 InstallLimiterFactory::~InstallLimiterFactory() { | 32 InstallLimiterFactory::~InstallLimiterFactory() { |
32 } | 33 } |
33 | 34 |
34 ProfileKeyedService* InstallLimiterFactory::BuildServiceInstanceFor( | 35 BrowserContextKeyedService* InstallLimiterFactory::BuildServiceInstanceFor( |
35 content::BrowserContext* profile) const { | 36 content::BrowserContext* profile) const { |
36 return new InstallLimiter(); | 37 return new InstallLimiter(); |
37 } | 38 } |
38 | 39 |
39 } // namespace extensions | 40 } // namespace extensions |
OLD | NEW |