Chromium Code Reviews| Index: chrome/browser/extensions/state_store.h |
| diff --git a/chrome/browser/extensions/state_store.h b/chrome/browser/extensions/state_store.h |
| index 4585b5cae37b4013a4aa6693e21f436e712144f4..daea53166dd83f81f65979c023012393debbbe01 100644 |
| --- a/chrome/browser/extensions/state_store.h |
| +++ b/chrome/browser/extensions/state_store.h |
| @@ -10,17 +10,22 @@ |
| #include "base/files/file_path.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "base/scoped_observer.h" |
| #include "content/public/browser/notification_observer.h" |
| #include "content/public/browser/notification_registrar.h" |
| +#include "extensions/browser/extension_registry_observer.h" |
| #include "extensions/browser/value_store/value_store_frontend.h" |
| class Profile; |
| namespace extensions { |
| +class ExtensionRegistry; |
| + |
| // A storage area for per-extension state that needs to be persisted to disk. |
| class StateStore |
| : public base::SupportsWeakPtr<StateStore>, |
| + public ExtensionRegistryObserver, |
| public content::NotificationObserver { |
| public: |
| typedef ValueStoreFrontend::ReadCallback ReadCallback; |
| @@ -68,6 +73,17 @@ class StateStore |
| // Removes all keys registered for the given extension. |
| void RemoveKeysForExtension(const std::string& extension_id); |
| + // ExtensionRegistryObserver implementation. |
| + virtual void OnExtensionUninstalled(content::BrowserContext* browser_context, |
| + const Extension* extension) OVERRIDE; |
| + |
|
limasdf
2014/06/08 07:01:35
remove this empty line
|
| + virtual void OnExtensionWillBeInstalled( |
| + content::BrowserContext* browser_context, |
| + const Extension* extension, |
| + bool is_update, |
| + bool from_ephemeral, |
| + const std::string& old_name) OVERRIDE; |
| + |
| // Path to our database, on disk. Empty during testing. |
| base::FilePath db_path_; |
| @@ -82,6 +98,9 @@ class StateStore |
| scoped_ptr<DelayedTaskQueue> task_queue_; |
| content::NotificationRegistrar registrar_; |
| + |
| + ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver> |
| + extension_registry_observer_; |
| }; |
| } // namespace extensions |