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

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: rebased 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
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/extensions/extension_install_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/crx_installer.cc
diff --git a/chrome/browser/extensions/crx_installer.cc b/chrome/browser/extensions/crx_installer.cc
index 3886528d63cb21a1113059e2fb3a275f652e721d..d1f2a77c1f21132033696985f1e761549670cf66 100644
--- a/chrome/browser/extensions/crx_installer.cc
+++ b/chrome/browser/extensions/crx_installer.cc
@@ -110,9 +110,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
@@ -139,8 +141,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) {
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/extensions/extension_install_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698