Index: chrome/browser/extensions/crx_installer.h |
diff --git a/chrome/browser/extensions/crx_installer.h b/chrome/browser/extensions/crx_installer.h |
index 1cad3601bc61cfb936cb19036510cc23d3db9082..4d3a3a0be11ea1eafe2424621e89650b8eb3431c 100644 |
--- a/chrome/browser/extensions/crx_installer.h |
+++ b/chrome/browser/extensions/crx_installer.h |
@@ -25,6 +25,7 @@ class SkBitmap; |
namespace extensions { |
class ExtensionUpdaterTest; |
+class RequirementsChecker; |
// This class installs a crx file into a profile. |
// |
@@ -165,6 +166,10 @@ class CrxInstaller |
page_ordinal_ = page_ordinal; |
} |
+ void set_error_on_unsupported_requirements(bool val) { |
+ error_on_unsupported_requirements_ = val; |
+ } |
+ |
bool did_handle_successfully() const { return did_handle_successfully_; } |
Profile* profile() { return profile_; } |
@@ -199,6 +204,12 @@ class CrxInstaller |
// whitelisted. |
bool CanSkipConfirmation(); |
+ // Called on the UI thread to start the requirements check on the extension. |
+ void CheckRequirements(); |
+ |
+ // Runs on the FILE thread. Callback from RequirementsChecker. |
+ void RequirementsChecked(std::vector<std::string> errors); |
Aaron Boodman
2012/08/21 23:04:21
OnRequirementsChecked
eaugusti
2012/08/24 19:30:52
Done.
|
+ |
// Runs on the UI thread. Confirms with the user (via ExtensionInstallPrompt) |
// that it is OK to install this extension. |
void ConfirmInstall(); |
@@ -339,6 +350,15 @@ class CrxInstaller |
// Whether we should record an oauth2 grant upon successful install. |
bool record_oauth2_grant_; |
+ // Whether we should produce an error if the manifest declares requirements |
+ // that are not met. If false and there is an unmet requirement, the install |
+ // will continue but the extension will be distabled. |
+ bool error_on_unsupported_requirements_; |
+ |
+ scoped_ptr<RequirementsChecker> requirements_checker_; |
+ |
+ bool has_requirement_errors_; |
+ |
DISALLOW_COPY_AND_ASSIGN(CrxInstaller); |
}; |