| 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..092dad39cc045cae9b4d4ff0adcbe6788f965105 100644
|
| --- a/chrome/browser/extensions/state_store.h
|
| +++ b/chrome/browser/extensions/state_store.h
|
| @@ -10,17 +10,26 @@
|
|
|
| #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 content {
|
| +class BrowserContext;
|
| +}
|
| +
|
| 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 +77,16 @@ 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;
|
| + 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 +101,9 @@ class StateStore
|
| scoped_ptr<DelayedTaskQueue> task_queue_;
|
|
|
| content::NotificationRegistrar registrar_;
|
| +
|
| + ScopedObserver<ExtensionRegistry, ExtensionRegistryObserver>
|
| + extension_registry_observer_;
|
| };
|
|
|
| } // namespace extensions
|
|
|