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

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

Issue 11087071: Making ShowExtensionInstallDialog a callback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix android build 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
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index e51b225e73cc7387a1d99a46ae2642909fd82dcb..ea5484005868cc765a041278526e1cc76f8cf03a 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -106,6 +106,8 @@ CrxInstaller::CrxInstaller(
error_on_unsupported_requirements_(false),
requirements_checker_(new extensions::RequirementsChecker()),
has_requirement_errors_(false) {
+ show_dialog_callback_ =
+ ExtensionInstallPrompt::GetDefaultShowDialogCallback();
if (!approval)
return;
@@ -124,6 +126,8 @@ CrxInstaller::CrxInstaller(
expected_id_ = approval->extension_id;
record_oauth2_grant_ = approval->record_oauth2_grant;
}
+
+ show_dialog_callback_ = approval->show_dialog_callback;
}
CrxInstaller::~CrxInstaller() {
@@ -453,7 +457,7 @@ void CrxInstaller::ConfirmInstall() {
if (client_ && (!allow_silent_install_ || !approved_)) {
AddRef(); // Balanced in Proceed() and Abort().
- client_->ConfirmInstall(this, extension_.get());
+ client_->ConfirmInstall(this, extension_.get(), show_dialog_callback_);
} else {
if (!BrowserThread::PostTask(
BrowserThread::FILE, FROM_HERE,

Powered by Google App Engine
This is Rietveld 408576698