| Index: chrome/browser/extensions/extension_install_checker.h
|
| diff --git a/chrome/browser/extensions/extension_install_checker.h b/chrome/browser/extensions/extension_install_checker.h
|
| index 17da24274b9bba8494c573e02a5ef64306f8cd5b..f548474ba8d70100917cdfc007b1b54523d328e7 100644
|
| --- a/chrome/browser/extensions/extension_install_checker.h
|
| +++ b/chrome/browser/extensions/extension_install_checker.h
|
| @@ -20,8 +20,6 @@ class Profile;
|
|
|
| namespace extensions {
|
|
|
| -class RequirementsChecker;
|
| -
|
| // Performs common checks for validating whether an extension may be installed.
|
| // This class should be Start()-ed at most once.
|
| class ExtensionInstallChecker {
|
| @@ -60,10 +58,9 @@ class ExtensionInstallChecker {
|
| // Returns true if any checks are currently running.
|
| bool is_running() const { return running_checks_ != 0; }
|
|
|
| - // Returns the requirement violations. A non-empty list is considered to be
|
| - // a check failure.
|
| - const std::vector<std::string>& requirement_errors() const {
|
| - return requirement_errors_;
|
| + // Returns the error message for requirement violations, if any were found.
|
| + const std::string& requirements_error_message() const {
|
| + return requirements_error_message_;
|
| }
|
|
|
| // Returns the blacklist error of the extension. Note that there is only an
|
| @@ -79,13 +76,17 @@ class ExtensionInstallChecker {
|
| void SetPolicyCheckForTesting(std::unique_ptr<PreloadCheck> policy_check) {
|
| policy_check_ = std::move(policy_check);
|
| }
|
| + void SetRequirementsCheckForTesting(
|
| + std::unique_ptr<PreloadCheck> requirements_check) {
|
| + requirements_check_ = std::move(requirements_check);
|
| + }
|
|
|
| protected:
|
| virtual void CheckManagementPolicy();
|
| void OnManagementPolicyCheckDone(PreloadCheck::Errors errors);
|
|
|
| virtual void CheckRequirements();
|
| - void OnRequirementsCheckDone(const std::vector<std::string>& errors);
|
| + void OnRequirementsCheckDone(PreloadCheck::Errors errors);
|
|
|
| virtual void CheckBlacklistState();
|
| void OnBlacklistStateCheckDone(PreloadCheck::Errors errors);
|
| @@ -100,8 +101,8 @@ class ExtensionInstallChecker {
|
| scoped_refptr<const Extension> extension_;
|
|
|
| // Checks requirements specified in the manifest.
|
| - std::unique_ptr<RequirementsChecker> requirements_checker_;
|
| - std::vector<std::string> requirement_errors_;
|
| + std::unique_ptr<PreloadCheck> requirements_check_;
|
| + std::string requirements_error_message_;
|
|
|
| // Checks if the extension is blacklisted.
|
| std::unique_ptr<PreloadCheck> blacklist_check_;
|
|
|