Index: chrome/browser/extensions/extension_prefs.h |
diff --git a/chrome/browser/extensions/extension_prefs.h b/chrome/browser/extensions/extension_prefs.h |
index a0eb1ec98df8cb9987521b39f03ab3f44350c24f..6a236a732b8a5a98d0e466a5960621d57af77098 100644 |
--- a/chrome/browser/extensions/extension_prefs.h |
+++ b/chrome/browser/extensions/extension_prefs.h |
@@ -81,6 +81,17 @@ class ExtensionPrefs : public ExtensionScopedPrefs, |
LAUNCH_DEFAULT = LAUNCH_REGULAR |
}; |
+ // This enum is used to store the reason an extension's install has been |
+ // delayed. Do not remove items or re-order this enum as it is used in |
+ // preferences. |
+ enum DelayReason { |
+ DELAY_REASON_NONE = 0, |
+ DELAY_REASON_GC = 1, |
+ DELAY_REASON_WAIT_FOR_IDLE = 2, |
+ DELAY_REASON_WAIT_FOR_IMPORTS = 3, |
+ }; |
+ |
+ |
// Creates base::Time classes. The default implementation is just to return |
// the current time, but tests can inject alternative implementations. |
class TimeProvider { |
@@ -394,9 +405,10 @@ class ExtensionPrefs : public ExtensionScopedPrefs, |
const std::string& extension_id) const; |
// We've downloaded an updated .crx file for the extension, but are waiting |
- // for idle time to install it. |
+ // to install it. |
void SetDelayedInstallInfo(const Extension* extension, |
Extension::State initial_state, |
+ DelayReason delay_reason, |
const syncer::StringOrdinal& page_ordinal); |
// Removes any delayed install information we have for the given |
@@ -411,6 +423,8 @@ class ExtensionPrefs : public ExtensionScopedPrefs, |
scoped_ptr<ExtensionInfo> GetDelayedInstallInfo( |
const std::string& extension_id) const; |
+ DelayReason GetDelayedInstallReason(const std::string& extension_id) const; |
+ |
// Returns information about all the extensions that have delayed install |
// information. |
scoped_ptr<ExtensionsInfo> GetAllDelayedInstallInfo() const; |
@@ -430,6 +444,9 @@ class ExtensionPrefs : public ExtensionScopedPrefs, |
// Returns the creation flags mask for the extension. |
int GetCreationFlags(const std::string& extension_id) const; |
+ // Returns the creation flags mask for a delayed install extension. |
+ int GetDelayedInstallCreationFlags(const std::string& extension_id) const; |
+ |
// Returns true if the extension was installed from the Chrome Web Store. |
bool IsFromWebStore(const std::string& extension_id) const; |