summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extensions_service.h
diff options
context:
space:
mode:
authormpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 21:57:49 +0000
committermpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-03 21:57:49 +0000
commitd7e9a8609d36bee7a8510dc95eec201ed44d37e0 (patch)
tree0a8536eaff24d0de0cf4a7e9d7e68dc409c98ff3 /chrome/browser/extensions/extensions_service.h
parent230d2fd2e1cafaab5cd5e4d2a9f64b4ae272550a (diff)
downloadchromium_src-d7e9a8609d36bee7a8510dc95eec201ed44d37e0.zip
chromium_src-d7e9a8609d36bee7a8510dc95eec201ed44d37e0.tar.gz
chromium_src-d7e9a8609d36bee7a8510dc95eec201ed44d37e0.tar.bz2
Kill Extension::RuntimeData and move its guts to ExtensionsService.
ImageCache remains on Extension, on the expectation that it will eventually be loaded at startup. BUG=56558 TEST=no functional change Review URL: http://codereview.chromium.org/4132005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extensions_service.h')
-rw-r--r--chrome/browser/extensions/extensions_service.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
index 7cc2c9d..f5e541c 100644
--- a/chrome/browser/extensions/extensions_service.h
+++ b/chrome/browser/extensions/extensions_service.h
@@ -189,6 +189,17 @@ class ExtensionsService
bool AllowFileAccess(const Extension* extension);
void SetAllowFileAccess(const Extension* extension, bool allow);
+ // Whether the background page, if any, is ready. We don't load other
+ // components until then. If there is no background page, we consider it to
+ // be ready.
+ bool IsBackgroundPageReady(const Extension* extension);
+ void SetBackgroundPageReady(const Extension* extension);
+
+ // Getter and setter for the flag that specifies whether the extension is
+ // being upgraded.
+ bool IsBeingUpgraded(const Extension* extension);
+ void SetBeingUpgraded(const Extension* extension, bool value);
+
// Initialize and start all installed extensions.
void Init();
@@ -408,10 +419,25 @@ class ExtensionsService
ExtensionIdSet GetAppIds() const;
private:
- virtual ~ExtensionsService();
friend class BrowserThread;
friend class DeleteTask<ExtensionsService>;
+ // Contains Extension data that can change during the life of the process,
+ // but does not persist across restarts.
+ struct ExtensionRuntimeData {
+ // True if the background page is ready.
+ bool background_page_ready;
+
+ // True while the extension is being upgraded.
+ bool being_upgraded;
+
+ ExtensionRuntimeData();
+ ~ExtensionRuntimeData();
+ };
+ typedef std::map<std::string, ExtensionRuntimeData> ExtensionRuntimeDataMap;
+
+ virtual ~ExtensionsService();
+
// Clear all persistent data that may have been stored by the extension.
void ClearExtensionData(const GURL& extension_url);
@@ -463,6 +489,9 @@ class ExtensionsService
// The set of pending extensions.
PendingExtensionMap pending_extensions_;
+ // The map of extension IDs to their runtime data.
+ ExtensionRuntimeDataMap extension_runtime_data_;
+
// The full path to the directory where extensions are installed.
FilePath install_directory_;