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

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

Issue 53273002: Decouple RulesCacheDelegate from RulesRegistry (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_rules_registry_with_cache
Patch Set: Updated Created 7 years, 1 month 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
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // ProfileKeyedAPI implementation. 89 // ProfileKeyedAPI implementation.
90 static const char* service_name() { 90 static const char* service_name() {
91 return "RulesRegistryService"; 91 return "RulesRegistryService";
92 } 92 }
93 static const bool kServiceHasOwnInstanceInIncognito = true; 93 static const bool kServiceHasOwnInstanceInIncognito = true;
94 static const bool kServiceIsNULLWhileTesting = true; 94 static const bool kServiceIsNULLWhileTesting = true;
95 95
96 RulesRegistryMap rule_registries_; 96 RulesRegistryMap rule_registries_;
97 97
98 // We own the parts of the registries which need to run on the UI thread. 98 // We own the parts of the registries which need to run on the UI thread.
99 ScopedVector<RulesCacheDelegate> ui_parts_of_registries_; 99 ScopedVector<RulesCacheDelegate> cache_delegates_;
100 100
101 // Weak pointer into rule_registries_ to make it easier to handle content rule 101 // Weak pointer into rule_registries_ to make it easier to handle content rule
102 // conditions. 102 // conditions.
103 ContentRulesRegistry* content_rules_registry_; 103 ContentRulesRegistry* content_rules_registry_;
104 104
105 content::NotificationRegistrar registrar_; 105 content::NotificationRegistrar registrar_;
106 106
107 Profile* profile_; 107 Profile* profile_;
108 108
109 DISALLOW_COPY_AND_ASSIGN(RulesRegistryService); 109 DISALLOW_COPY_AND_ASSIGN(RulesRegistryService);
110 }; 110 };
111 111
112 } // namespace extensions 112 } // namespace extensions
113 113
114 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ 114 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698