| Index: chrome/browser/extensions/extensions_service.h
|
| diff --git a/chrome/browser/extensions/extensions_service.h b/chrome/browser/extensions/extensions_service.h
|
| index 213471c4e27a8f6088a72716c4c909726a5e7a4c..272b32509325b97444300042eb0c5d19d7eed90f 100644
|
| --- a/chrome/browser/extensions/extensions_service.h
|
| +++ b/chrome/browser/extensions/extensions_service.h
|
| @@ -185,6 +185,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();
|
|
|
| @@ -404,10 +415,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);
|
|
|
| @@ -459,6 +485,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_;
|
|
|
|
|