| 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/api/declarative/rules_registry_service_facto
ry.h" |
| 6 |
| 7 #include "chrome/browser/extensions/api/declarative/rules_registry_service.h" |
| 8 #include "chrome/browser/profiles/profile_dependency_manager.h" |
| 9 |
| 10 namespace extensions { |
| 11 |
| 12 // static |
| 13 RulesRegistryService* |
| 14 RulesRegistryServiceFactory::GetForProfile(Profile* profile) { |
| 15 return static_cast<RulesRegistryService*>( |
| 16 GetInstance()->GetServiceForProfile(profile, true)); |
| 17 } |
| 18 |
| 19 // static |
| 20 RulesRegistryServiceFactory* RulesRegistryServiceFactory::GetInstance() { |
| 21 return Singleton<RulesRegistryServiceFactory>::get(); |
| 22 } |
| 23 |
| 24 RulesRegistryServiceFactory::RulesRegistryServiceFactory() |
| 25 : ProfileKeyedServiceFactory("RulesRegistryService", |
| 26 ProfileDependencyManager::GetInstance()) { |
| 27 } |
| 28 |
| 29 RulesRegistryServiceFactory::~RulesRegistryServiceFactory() { |
| 30 } |
| 31 |
| 32 ProfileKeyedService* RulesRegistryServiceFactory::BuildServiceInstanceFor( |
| 33 Profile* profile) const { |
| 34 RulesRegistryService* provider = new RulesRegistryService(); |
| 35 provider->Init(profile); |
| 36 return provider; |
| 37 } |
| 38 |
| 39 bool RulesRegistryServiceFactory::ServiceRedirectedInIncognito() { |
| 40 return true; |
| 41 } |
| 42 |
| 43 } // namespace extensions |
| OLD | NEW |