Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(377)

Side by Side Diff: chrome/browser/extensions/api/declarative/rules_registry_service_factory.cc

Issue 9315010: RulesRegistry for declarative APIs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implemented ID and priority generation Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698