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

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

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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_FACTORY _H__
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_FACTORY _H__
7 #pragma once
8
9 #include "base/basictypes.h"
10 #include "base/memory/singleton.h"
11 #include "chrome/browser/profiles/profile_keyed_service_factory.h"
12
13 namespace extensions {
14
15 class RulesRegistryService;
16
17 // Singleton that owns all RulesRegistryService and associates them with
18 // Profiles. Listens for the Profile's destruction notification and cleans up
19 // the associated RulesRegistryServic.
20 class RulesRegistryServiceFactory : public ProfileKeyedServiceFactory {
21 public:
22 // Returns the RulesRegistryService that owns RuleRegistries resources for
23 // |profile|.
24 static RulesRegistryService* GetForProfile(Profile* profile);
25
26 static RulesRegistryServiceFactory* GetInstance();
27
28 private:
29 friend struct DefaultSingletonTraits<RulesRegistryServiceFactory>;
30
31 RulesRegistryServiceFactory();
32 virtual ~RulesRegistryServiceFactory();
33
34 // ProfileKeyedServiceFactory:
35 virtual ProfileKeyedService* BuildServiceInstanceFor(
36 Profile* profile) const OVERRIDE;
37 virtual bool ServiceRedirectedInIncognito() OVERRIDE;
38
39 DISALLOW_COPY_AND_ASSIGN(RulesRegistryServiceFactory);
40 };
41
42 }
43
44 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_FACT ORY_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698