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

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

Issue 10907104: Support an --install-from-webstore command line switch (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: updated comment Created 8 years, 3 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 d17820497c38819cf055bb9b4543362f7940d3dc..6afe4e017eebec1ea498d5f248eff54e1809a693 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -106,9 +106,11 @@ CrxInstaller::CrxInstaller(
return;
CHECK(profile_->IsSameProfile(approval->profile));
- client_->install_ui()->SetUseAppInstalledBubble(
- approval->use_app_installed_bubble);
- client_->install_ui()->SetSkipPostInstallUI(approval->skip_post_install_ui);
+ if (client_) {
+ client_->install_ui()->SetUseAppInstalledBubble(
+ approval->use_app_installed_bubble);
+ client_->install_ui()->SetSkipPostInstallUI(approval->skip_post_install_ui);
+ }
if (approval->skip_install_dialog) {
// Mark the extension as approved, but save the expected manifest and ID
@@ -135,8 +137,10 @@ CrxInstaller::~CrxInstaller() {
base::Bind(&extension_file_util::DeleteFile, source_file_, false));
}
// Make sure the UI is deleted on the ui thread.
- BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, client_);
- client_ = NULL;
+ if (client_) {
+ BrowserThread::DeleteSoon(BrowserThread::UI, FROM_HERE, client_);
+ client_ = NULL;
+ }
}
void CrxInstaller::InstallCrx(const FilePath& source_file) {

Powered by Google App Engine
This is Rietveld 408576698