| Index: chrome/browser/extensions/extension_install_prompt.cc
|
| diff --git a/chrome/browser/extensions/extension_install_prompt.cc b/chrome/browser/extensions/extension_install_prompt.cc
|
| index aec3b6293f0e55ec747ac49aee55e1bcd61dd690..87447fb51f333f0b42d30af913b3b38c3cd269cc 100644
|
| --- a/chrome/browser/extensions/extension_install_prompt.cc
|
| +++ b/chrome/browser/extensions/extension_install_prompt.cc
|
| @@ -348,24 +348,31 @@ void ExtensionInstallPrompt::ConfirmStandaloneInstall(
|
| FetchOAuthIssueAdviceIfNeeded();
|
| }
|
|
|
| -void ExtensionInstallPrompt::ConfirmWebstoreInstall(Delegate* delegate,
|
| - const Extension* extension,
|
| - const SkBitmap* icon) {
|
| +void ExtensionInstallPrompt::ConfirmWebstoreInstall(
|
| + Delegate* delegate,
|
| + const Extension* extension,
|
| + const SkBitmap* icon,
|
| + scoped_refptr<ExtensionInstallDialog> dialog) {
|
| // SetIcon requires |extension_| to be set. ConfirmInstall will setup the
|
| // remaining fields.
|
| extension_ = extension;
|
| SetIcon(icon);
|
| - ConfirmInstall(delegate, extension);
|
| + ConfirmInstall(delegate, extension, dialog);
|
| }
|
|
|
| -void ExtensionInstallPrompt::ConfirmInstall(Delegate* delegate,
|
| - const Extension* extension) {
|
| +void ExtensionInstallPrompt::ConfirmInstall(
|
| + Delegate* delegate,
|
| + const Extension* extension,
|
| + scoped_refptr<ExtensionInstallDialog> dialog) {
|
| DCHECK(ui_loop_ == MessageLoop::current());
|
| extension_ = extension;
|
| permissions_ = extension->GetActivePermissions();
|
| delegate_ = delegate;
|
| prompt_type_ = INSTALL_PROMPT;
|
|
|
| + DCHECK(dialog_.get());
|
| + dialog_ = dialog;
|
| +
|
| // We special-case themes to not show any confirm UI. Instead they are
|
| // immediately installed, and then we show an infobar (see OnInstallSuccess)
|
| // to allow the user to revert if they don't like it.
|
| @@ -537,12 +544,14 @@ void ExtensionInstallPrompt::ShowConfirmation() {
|
| case INSTALL_PROMPT: {
|
| prompt_.set_extension(extension_);
|
| prompt_.set_icon(gfx::Image(icon_));
|
| - ShowExtensionInstallDialog(parent_, navigator_, delegate_, prompt_);
|
| + dialog_->ShowExtensionInstallDialog(
|
| + parent_, navigator_, delegate_, prompt_);
|
| break;
|
| }
|
| case BUNDLE_INSTALL_PROMPT: {
|
| prompt_.set_bundle(bundle_);
|
| - ShowExtensionInstallDialog(parent_, navigator_, delegate_, prompt_);
|
| + dialog_->ShowExtensionInstallDialog(
|
| + parent_, navigator_, delegate_, prompt_);
|
| break;
|
| }
|
| default:
|
|
|