summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 20:50:19 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-25 20:50:19 +0000
commit774a996a8235bd91dbbdaf6418ad405810f3be5d (patch)
tree0c4a2f57e88fd66c8ba8b431426979accac85be5 /chrome/browser/browser_init.cc
parentbd17b70920f5a327eada613ef32e501b043cad51 (diff)
downloadchromium_src-774a996a8235bd91dbbdaf6418ad405810f3be5d.zip
chromium_src-774a996a8235bd91dbbdaf6418ad405810f3be5d.tar.gz
chromium_src-774a996a8235bd91dbbdaf6418ad405810f3be5d.tar.bz2
Fix the case of invoking chrome with --install-extension when chrome was not
running. It now opens a new chrome window instead of leaving a ghost process around. Review URL: http://codereview.chromium.org/28079 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10375 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 2f46668..b10e7ac 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -502,7 +502,10 @@ bool BrowserInit::ProcessCommandLine(
command_line.GetSwitchValue(switches::kInstallExtension);
FilePath path = FilePath::FromWStringHack(path_string);
profile->GetExtensionsService()->InstallExtension(path);
- silent_launch = true;
+
+ // If the chrome process was already running, install the extension without
+ // popping up another browser window.
+ silent_launch = !process_startup;
}
// If we don't want to launch a new browser window or tab (in the case