| 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 base::WeakPtrFactory<RulesRegistryWithCache> weak_ptr_factory_; | 200 base::WeakPtrFactory<RulesRegistryWithCache> weak_ptr_factory_; |
| 201 | 201 |
| 202 // |storage_on_ui_| is owned by the registry service. If |storage_on_ui_| is | 202 // |storage_on_ui_| is owned by the registry service. If |storage_on_ui_| is |
| 203 // NULL, then the storage functionality is disabled (this is used in tests). | 203 // NULL, then the storage functionality is disabled (this is used in tests). |
| 204 // This registry cannot own |storage_on_ui_| because during the time after | 204 // This registry cannot own |storage_on_ui_| because during the time after |
| 205 // rules registry service shuts down on UI thread, and the registry is | 205 // rules registry service shuts down on UI thread, and the registry is |
| 206 // destroyed on its thread, the use of the |storage_on_ui_| would not be | 206 // destroyed on its thread, the use of the |storage_on_ui_| would not be |
| 207 // safe. The registry only ever associates with one RuleStorageOnUI instance. | 207 // safe. The registry only ever associates with one RuleStorageOnUI instance. |
| 208 const base::WeakPtr<RuleStorageOnUI> storage_on_ui_; | 208 const base::WeakPtr<RuleStorageOnUI> storage_on_ui_; |
| 209 | 209 |
| 210 // If true then a task to call ProcessChangedRules is scheduled for execution | |
| 211 // in the future. | |
| 212 bool process_changed_rules_requested_; | |
| 213 | |
| 214 DISALLOW_COPY_AND_ASSIGN(RulesRegistryWithCache); | 210 DISALLOW_COPY_AND_ASSIGN(RulesRegistryWithCache); |
| 215 }; | 211 }; |
| 216 | 212 |
| 217 } // namespace extensions | 213 } // namespace extensions |
| 218 | 214 |
| 219 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H
__ | 215 #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_RULES_REGISTRY_WITH_CACHE_H
__ |
| OLD | NEW |