| 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 CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H__ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H__ |
| 7 | 7 |
| 8 #include "chrome/browser/extensions/api/declarative/rules_registry.h" | 8 #include "chrome/browser/extensions/api/declarative/rules_registry.h" |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 base::WeakPtrFactory<RulesRegistryWithCache> weak_ptr_factory_; | 180 base::WeakPtrFactory<RulesRegistryWithCache> weak_ptr_factory_; |
| 181 | 181 |
| 182 // |storage_on_ui_| is owned by the registry service. If |storage_on_ui_| is | 182 // |storage_on_ui_| is owned by the registry service. If |storage_on_ui_| is |
| 183 // NULL, then the storage functionality is disabled (this is used in tests). | 183 // NULL, then the storage functionality is disabled (this is used in tests). |
| 184 // This registry cannot own |storage_on_ui_| because during the time after | 184 // This registry cannot own |storage_on_ui_| because during the time after |
| 185 // rules registry service shuts down on UI thread, and the registry is | 185 // rules registry service shuts down on UI thread, and the registry is |
| 186 // destroyed on its thread, the use of the |storage_on_ui_| would not be | 186 // destroyed on its thread, the use of the |storage_on_ui_| would not be |
| 187 // safe. The registry only ever associates with one RuleStorageOnUI instance. | 187 // safe. The registry only ever associates with one RuleStorageOnUI instance. |
| 188 const base::WeakPtr<RuleStorageOnUI> storage_on_ui_; | 188 const base::WeakPtr<RuleStorageOnUI> storage_on_ui_; |
| 189 | 189 |
| 190 // If true then a task to call ProcessChangedRules is scheduled for execution |
| 191 // in the future. |
| 192 bool process_changed_rules_requested_; |
| 193 |
| 190 DISALLOW_COPY_AND_ASSIGN(RulesRegistryWithCache); | 194 DISALLOW_COPY_AND_ASSIGN(RulesRegistryWithCache); |
| 191 }; | 195 }; |
| 192 | 196 |
| 193 } // namespace extensions | 197 } // namespace extensions |
| 194 | 198 |
| 195 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H
__ | 199 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H
__ |
| OLD | NEW |