Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / install_limiter_factory.cc
blobe93d54af1595110ee455306f3e922df7cc25d80c
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/chromeos/extensions/install_limiter_factory.h"
7 #include "chrome/browser/chromeos/extensions/install_limiter.h"
8 #include "chrome/browser/profiles/profile.h"
9 #include "components/keyed_service/content/browser_context_dependency_manager.h"
10 #include "extensions/browser/extension_system_provider.h"
11 #include "extensions/browser/extensions_browser_client.h"
13 namespace extensions {
15 // static
16 InstallLimiter* InstallLimiterFactory::GetForProfile(Profile* profile) {
17 return static_cast<InstallLimiter*>(
18 GetInstance()->GetServiceForBrowserContext(profile, true));
21 // static
22 InstallLimiterFactory* InstallLimiterFactory::GetInstance() {
23 return Singleton<InstallLimiterFactory>::get();
26 InstallLimiterFactory::InstallLimiterFactory()
27 : BrowserContextKeyedServiceFactory(
28 "InstallLimiter",
29 BrowserContextDependencyManager::GetInstance()) {
30 DependsOn(ExtensionsBrowserClient::Get()->GetExtensionSystemFactory());
33 InstallLimiterFactory::~InstallLimiterFactory() {
36 KeyedService* InstallLimiterFactory::BuildServiceInstanceFor(
37 content::BrowserContext* profile) const {
38 return new InstallLimiter();
41 } // namespace extensions