Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1265)

Unified Diff: chrome/browser/extensions/state_store.h

Issue 322503006: Remove deprecated extension notifications from state_store.*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add StateStore::OnExtensionUninstalled as reviewer's request Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « AUTHORS ('k') | chrome/browser/extensions/state_store.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « AUTHORS ('k') | chrome/browser/extensions/state_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698