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

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

Issue 14973007: Auto-install/uninstall shared module dependencies for extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 7 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 | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698