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

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

Issue 10941003: Reset registered events and dispatch runtime.onInstalled to all extensions when (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ? Created 8 years, 3 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
Index: chrome/browser/extensions/extension_prefs.h
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h
index bc9c2c70b14e6aab07b2d283eb4dd9f27b0af368..c9bfe5500d8639aea9a224ea1ee052210bfa166c 100644
--- a/chrome/browser/extensions/extension_prefs.h
+++ b/chrome/browser/extensions/extension_prefs.h
@@ -269,6 +269,10 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
void SetActivePermissions(const std::string& extension_id,
const PermissionSet* permissions);
+ // Returns true if registered events are from this version of Chrome. Else,
+ // clear them, and return false.
+ bool CheckRegisteredEventsUpToDate();
+
// Returns the list of events that the given extension has registered for.
std::set<std::string> GetRegisteredEvents(const std::string& extension_id);
void SetRegisteredEvents(const std::string& extension_id,
@@ -541,6 +545,9 @@ class ExtensionPrefs : public ContentSettingsStore::Observer,
// Migrates the disable reasons from a single enum to a bit mask.
void MigrateDisableReasons(const ExtensionIds& extension_ids);
+ // Clears the registered events for event pages.
+ void ClearRegisteredEvents();
+
// Checks whether there is a state pref for the extension and if so, whether
// it matches |check_state|.
bool DoesExtensionHaveState(const std::string& id,

Powered by Google App Engine
This is Rietveld 408576698