| OLD | NEW |
| 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 EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ | 5 #ifndef EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ |
| 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ | 6 #define EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 return "RulesRegistryService"; | 126 return "RulesRegistryService"; |
| 127 } | 127 } |
| 128 static const bool kServiceHasOwnInstanceInIncognito = true; | 128 static const bool kServiceHasOwnInstanceInIncognito = true; |
| 129 static const bool kServiceIsNULLWhileTesting = true; | 129 static const bool kServiceIsNULLWhileTesting = true; |
| 130 | 130 |
| 131 int current_rules_registry_id_; | 131 int current_rules_registry_id_; |
| 132 | 132 |
| 133 RulesRegistryMap rule_registries_; | 133 RulesRegistryMap rule_registries_; |
| 134 | 134 |
| 135 // We own the parts of the registries which need to run on the UI thread. | 135 // We own the parts of the registries which need to run on the UI thread. |
| 136 std::vector<scoped_ptr<RulesCacheDelegate>> cache_delegates_; | 136 std::vector<std::unique_ptr<RulesCacheDelegate>> cache_delegates_; |
| 137 | 137 |
| 138 // Weak pointer into rule_registries_ to make it easier to handle content rule | 138 // Weak pointer into rule_registries_ to make it easier to handle content rule |
| 139 // conditions. | 139 // conditions. |
| 140 ContentRulesRegistry* content_rules_registry_; | 140 ContentRulesRegistry* content_rules_registry_; |
| 141 | 141 |
| 142 // Listen to extension load, unloaded notification. | 142 // Listen to extension load, unloaded notification. |
| 143 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 143 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 144 extension_registry_observer_; | 144 extension_registry_observer_; |
| 145 | 145 |
| 146 content::BrowserContext* browser_context_; | 146 content::BrowserContext* browser_context_; |
| 147 | 147 |
| 148 DISALLOW_COPY_AND_ASSIGN(RulesRegistryService); | 148 DISALLOW_COPY_AND_ASSIGN(RulesRegistryService); |
| 149 }; | 149 }; |
| 150 | 150 |
| 151 } // namespace extensions | 151 } // namespace extensions |
| 152 | 152 |
| 153 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ | 153 #endif // EXTENSIONS_BROWSER_API_DECLARATIVE_RULES_REGISTRY_SERVICE_H__ |
| OLD | NEW |