| Index: chrome/browser/extensions/crx_installer.cc
|
| diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
|
| index 7503b973cad7e3436bc3616458bcf1a5b1d343fe..aedc100b3e2e5abcbb5a7be9949fe0eb15baab85 100644
|
| --- a/chrome/browser/extensions/crx_installer.cc
|
| +++ b/chrome/browser/extensions/crx_installer.cc
|
| @@ -44,6 +44,7 @@
|
| #include "content/public/browser/user_metrics.h"
|
| #include "extensions/browser/extension_prefs.h"
|
| #include "extensions/browser/extension_system.h"
|
| +#include "extensions/browser/install_flag.h"
|
| #include "extensions/common/extension_icon_set.h"
|
| #include "extensions/common/feature_switch.h"
|
| #include "extensions/common/file_util.h"
|
| @@ -130,11 +131,8 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> service_weak,
|
| off_store_install_allow_reason_(OffStoreInstallDisallowed),
|
| did_handle_successfully_(true),
|
| error_on_unsupported_requirements_(false),
|
| - has_requirement_errors_(false),
|
| - blacklist_state_(extensions::NOT_BLACKLISTED),
|
| - install_wait_for_idle_(true),
|
| update_from_settings_page_(false),
|
| - is_ephemeral_(false),
|
| + install_flags_(kInstallFlagNone),
|
| installer_(service_weak->profile()) {
|
| installer_task_runner_ = service_weak->GetFileTaskRunner();
|
| if (!approval)
|
| @@ -164,7 +162,7 @@ CrxInstaller::CrxInstaller(base::WeakPtr<ExtensionService> service_weak,
|
| }
|
|
|
| show_dialog_callback_ = approval->show_dialog_callback;
|
| - is_ephemeral_ = approval->is_ephemeral;
|
| + set_is_ephemeral(approval->is_ephemeral);
|
| }
|
|
|
| CrxInstaller::~CrxInstaller() {
|
| @@ -528,7 +526,7 @@ void CrxInstaller::OnRequirementsChecked(
|
| base::UTF8ToUTF16(JoinString(requirement_errors, ' '))));
|
| return;
|
| }
|
| - has_requirement_errors_ = true;
|
| + install_flags_ |= kInstallFlagHasRequirementErrors;
|
| }
|
|
|
| ExtensionSystem::Get(profile())->blacklist()->IsBlacklisted(
|
| @@ -542,10 +540,12 @@ void CrxInstaller::OnBlacklistChecked(
|
| if (!service_weak_)
|
| return;
|
|
|
| - blacklist_state_ = blacklist_state;
|
| + if (blacklist_state == extensions::BLACKLISTED_MALWARE) {
|
| + install_flags_ |= kInstallFlagIsBlacklistedForMalware;
|
| + }
|
|
|
| - if ((blacklist_state_ == extensions::BLACKLISTED_MALWARE ||
|
| - blacklist_state_ == extensions::BLACKLISTED_UNKNOWN) &&
|
| + if ((blacklist_state == extensions::BLACKLISTED_MALWARE ||
|
| + blacklist_state == extensions::BLACKLISTED_UNKNOWN) &&
|
| !allow_silent_install_) {
|
| // User tried to install a blacklisted extension. Show an error and
|
| // refuse to install it.
|
| @@ -817,12 +817,8 @@ void CrxInstaller::ReportSuccessFromUIThread() {
|
| }
|
| }
|
|
|
| - service_weak_->OnExtensionInstalled(extension(),
|
| - page_ordinal_,
|
| - has_requirement_errors_,
|
| - blacklist_state_,
|
| - is_ephemeral_,
|
| - install_wait_for_idle_);
|
| + service_weak_->OnExtensionInstalled(
|
| + extension(), page_ordinal_, install_flags_);
|
| NotifyCrxInstallComplete(true);
|
| }
|
|
|
|
|