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..01b65c53a7d1f6bc1563f6cd8afe18091c24ed94 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" |
| +namespace content { |
|
limasdf
2014/06/14 03:58:59
please make 'class Profile' come first..
class
Ted Kim
2014/06/14 05:13:53
Done.
|
| +class BrowserContext; |
| +} |
| + |
| 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 +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 |