Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2522)

Unified Diff: chrome/browser/extensions/extension_install_prompt.cc

Issue 11131002: Make show_dialog_callback optional in ExtensionInstallPrompt (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 a6af0293cf4736757e38a02545c4ce9f7a85b393..0dd41f8ae2ef70b593da19c6fdfca2c1df86ab76 100644
--- a/chrome/browser/extensions/extension_install_prompt.cc
+++ b/chrome/browser/extensions/extension_install_prompt.cc
@@ -402,7 +402,6 @@ void ExtensionInstallPrompt::ConfirmInstall(
delegate_ = delegate;
prompt_type_ = INSTALL_PROMPT;
show_dialog_callback_ = show_dialog_callback;
- DCHECK(!show_dialog_callback_.is_null());
// We special-case themes to not show any confirm UI. Instead they are
// immediately installed, and then we show an infobar (see OnInstallSuccess)
@@ -589,8 +588,10 @@ void ExtensionInstallPrompt::ShowConfirmation() {
if (AutoConfirmPrompt(delegate_))
return;
- DCHECK(!show_dialog_callback_.is_null());
- show_dialog_callback_.Run(parent_, navigator_, delegate_, prompt_);
+ if (show_dialog_callback_.is_null())
+ GetDefaultShowDialogCallback().Run(parent_, navigator_, delegate_, prompt_);
+ else
+ show_dialog_callback_.Run(parent_, navigator_, delegate_, prompt_);
}
namespace chrome {
« no previous file with comments | « chrome/browser/extensions/crx_installer.cc ('k') | chrome/browser/extensions/webstore_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698