From 1ac1f1382fcafecdd9ee43cc5f1285989d5706dd Mon Sep 17 00:00:00 2001 From: wfh Date: Wed, 4 Feb 2015 11:11:24 -0800 Subject: [PATCH] Never launch a new window when --no-startup-window is specified. BUG=455070 TEST=manual, according to steps in bug. Review URL: https://codereview.chromium.org/893383002 Cr-Commit-Position: refs/heads/master@{#314603} --- chrome/browser/ui/startup/startup_browser_creator.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chrome/browser/ui/startup/startup_browser_creator.cc b/chrome/browser/ui/startup/startup_browser_creator.cc index 238fdb5ac570..50e42fa6d6e0 100644 --- a/chrome/browser/ui/startup/startup_browser_creator.cc +++ b/chrome/browser/ui/startup/startup_browser_creator.cc @@ -600,6 +600,11 @@ bool StartupBrowserCreator::ProcessCmdLineImpl( silent_launch = true; } + // If --no-startup-window is specified and Chrome is already running then do + // not open a new window. + if (!process_startup && command_line.HasSwitch(switches::kNoStartupWindow)) + silent_launch = true; + // If we don't want to launch a new browser window or tab we are done here. if (silent_launch) return true; -- 2.11.4.GIT