| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_STATE_STORE_H_ | 5 #ifndef EXTENSIONS_BROWSER_STATE_STORE_H_ |
| 6 #define EXTENSIONS_BROWSER_STATE_STORE_H_ | 6 #define EXTENSIONS_BROWSER_STATE_STORE_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Removes all keys registered for the given extension. | 85 // Removes all keys registered for the given extension. |
| 86 void RemoveKeysForExtension(const std::string& extension_id); | 86 void RemoveKeysForExtension(const std::string& extension_id); |
| 87 | 87 |
| 88 // ExtensionRegistryObserver implementation. | 88 // ExtensionRegistryObserver implementation. |
| 89 void OnExtensionUninstalled(content::BrowserContext* browser_context, | 89 void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| 90 const Extension* extension, | 90 const Extension* extension, |
| 91 extensions::UninstallReason reason) override; | 91 extensions::UninstallReason reason) override; |
| 92 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, | 92 void OnExtensionWillBeInstalled(content::BrowserContext* browser_context, |
| 93 const Extension* extension, | 93 const Extension* extension, |
| 94 bool is_update, | 94 bool is_update, |
| 95 bool from_ephemeral, | |
| 96 const std::string& old_name) override; | 95 const std::string& old_name) override; |
| 97 | 96 |
| 98 // Path to our database, on disk. Empty during testing. | 97 // Path to our database, on disk. Empty during testing. |
| 99 base::FilePath db_path_; | 98 base::FilePath db_path_; |
| 100 | 99 |
| 101 // Database client name used for UMA logging by database backend. | 100 // Database client name used for UMA logging by database backend. |
| 102 const std::string uma_client_name_; | 101 const std::string uma_client_name_; |
| 103 | 102 |
| 104 // The store that holds our key/values. | 103 // The store that holds our key/values. |
| 105 ValueStoreFrontend store_; | 104 ValueStoreFrontend store_; |
| 106 | 105 |
| 107 // List of all known keys. They will be cleared for each extension when it is | 106 // List of all known keys. They will be cleared for each extension when it is |
| 108 // (un)installed. | 107 // (un)installed. |
| 109 std::set<std::string> registered_keys_; | 108 std::set<std::string> registered_keys_; |
| 110 | 109 |
| 111 // Keeps track of tasks we have delayed while starting up. | 110 // Keeps track of tasks we have delayed while starting up. |
| 112 scoped_ptr<DelayedTaskQueue> task_queue_; | 111 scoped_ptr<DelayedTaskQueue> task_queue_; |
| 113 | 112 |
| 114 content::NotificationRegistrar registrar_; | 113 content::NotificationRegistrar registrar_; |
| 115 | 114 |
| 116 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> | 115 ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| 117 extension_registry_observer_; | 116 extension_registry_observer_; |
| 118 }; | 117 }; |
| 119 | 118 |
| 120 } // namespace extensions | 119 } // namespace extensions |
| 121 | 120 |
| 122 #endif // EXTENSIONS_BROWSER_STATE_STORE_H_ | 121 #endif // EXTENSIONS_BROWSER_STATE_STORE_H_ |
| OLD | NEW |