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

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

Issue 10831008: Refactor and fix declarative webRequest API permissions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 4 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 20 matching lines...) Expand all
31 // This class lives on the UI thread. 31 // This class lives on the UI thread.
32 class RulesRegistryService : public content::NotificationObserver { 32 class RulesRegistryService : public content::NotificationObserver {
33 public: 33 public:
34 explicit RulesRegistryService(Profile* profile); 34 explicit RulesRegistryService(Profile* profile);
35 virtual ~RulesRegistryService(); 35 virtual ~RulesRegistryService();
36 36
37 // Unregisters refptrs to concrete RulesRegistries at other objects that were 37 // Unregisters refptrs to concrete RulesRegistries at other objects that were
38 // created by us so that the RulesRegistries can be released. 38 // created by us so that the RulesRegistries can be released.
39 void Shutdown(); 39 void Shutdown();
40 40
41 // Registers the default RulesRegistries used in Chromium. 41 // Registers the default RulesRegistries used in Chromium. |incognito|
42 void RegisterDefaultRulesRegistries(); 42 // specifies whether this RulesRegistryService is associated with an incognito
43 // profile.
44 void RegisterDefaultRulesRegistries(bool incognito);
43 45
44 // Registers a RulesRegistry and wraps it in an InitializingRulesRegistry. 46 // Registers a RulesRegistry and wraps it in an InitializingRulesRegistry.
45 void RegisterRulesRegistry(const std::string& event_name, 47 void RegisterRulesRegistry(const std::string& event_name,
46 scoped_refptr<RulesRegistry> rule_registry); 48 scoped_refptr<RulesRegistry> rule_registry);
47 49
48 // Returns the RulesRegistry for |event_name| or NULL if no such registry 50 // Returns the RulesRegistry for |event_name| or NULL if no such registry
49 // has been registered. 51 // has been registered.
50 scoped_refptr<RulesRegistry> GetRulesRegistry( 52 scoped_refptr<RulesRegistry> GetRulesRegistry(
51 const std::string& event_name) const; 53 const std::string& event_name) const;
52 54
(...skipping 22 matching lines...) Expand all
75 content::NotificationRegistrar registrar_; 77 content::NotificationRegistrar registrar_;
76 78
77 Profile* profile_; 79 Profile* profile_;
78 80
79 DISALLOW_COPY_AND_ASSIGN(RulesRegistryService); 81 DISALLOW_COPY_AND_ASSIGN(RulesRegistryService);
80 }; 82 };
81 83
82 } // namespace extensions 84 } // namespace extensions
83 85
84 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ 86 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698