| Index: chrome/browser/extensions/webstore_standalone_installer.cc
|
| diff --git a/chrome/browser/extensions/webstore_standalone_installer.cc b/chrome/browser/extensions/webstore_standalone_installer.cc
|
| index 1942084c877ba45bf243839d1a166ba472f4c829..da7483dfe651d343e166e74b52e8532e518cdde0 100644
|
| --- a/chrome/browser/extensions/webstore_standalone_installer.cc
|
| +++ b/chrome/browser/extensions/webstore_standalone_installer.cc
|
| @@ -135,9 +135,9 @@ void WebstoreStandaloneInstaller::ProceedWithInstallPrompt() {
|
| install_prompt_ = CreateInstallPrompt();
|
| if (install_prompt_.get()) {
|
| ShowInstallUI();
|
| - // Control flow finishes up in InstallUIProceed or InstallUIAbort.
|
| + // Control flow finishes up in OnInstallPromptDone().
|
| } else {
|
| - InstallUIProceed();
|
| + OnInstallPromptDone(ExtensionInstallPrompt::Result::ACCEPTED);
|
| }
|
| }
|
|
|
| @@ -189,12 +189,21 @@ WebstoreStandaloneInstaller::CreateApproval() const {
|
| return approval;
|
| }
|
|
|
| -void WebstoreStandaloneInstaller::InstallUIProceed() {
|
| - if (!CheckRequestorAlive()) {
|
| +void WebstoreStandaloneInstaller::OnInstallPromptDone(
|
| + ExtensionInstallPrompt::Result result) {
|
| + if (result == ExtensionInstallPrompt::Result::USER_CANCELED) {
|
| + CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
|
| + return;
|
| + }
|
| +
|
| + if (result == ExtensionInstallPrompt::Result::ABORTED ||
|
| + !CheckRequestorAlive()) {
|
| CompleteInstall(webstore_install::ABORTED, std::string());
|
| return;
|
| }
|
|
|
| + DCHECK(result == ExtensionInstallPrompt::Result::ACCEPTED);
|
| +
|
| scoped_ptr<WebstoreInstaller::Approval> approval = CreateApproval();
|
|
|
| ExtensionService* extension_service =
|
| @@ -228,10 +237,6 @@ void WebstoreStandaloneInstaller::InstallUIProceed() {
|
| installer->Start();
|
| }
|
|
|
| -void WebstoreStandaloneInstaller::InstallUIAbort(bool user_initiated) {
|
| - CompleteInstall(webstore_install::USER_CANCELLED, kUserCancelledError);
|
| -}
|
| -
|
| void WebstoreStandaloneInstaller::OnWebstoreRequestFailure() {
|
| OnWebStoreDataFetcherDone();
|
| CompleteInstall(webstore_install::WEBSTORE_REQUEST_ERROR,
|
| @@ -404,7 +409,8 @@ void WebstoreStandaloneInstaller::ShowInstallUI() {
|
|
|
| install_ui_ = CreateInstallUI();
|
| install_ui_->ShowDialog(
|
| - this, localized_extension.get(), &icon_, std::move(install_prompt_),
|
| + base::Bind(&WebstoreStandaloneInstaller::OnInstallPromptDone, this),
|
| + localized_extension.get(), &icon_, std::move(install_prompt_),
|
| ExtensionInstallPrompt::GetDefaultShowDialogCallback());
|
| }
|
|
|
|
|