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

Unified Diff: chrome/browser/browser_init.cc

Issue 20074: Open Chrome Window instead of tab when it is launched from a shortcut. (Closed)
Patch Set: Created 11 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_init.cc
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 4aecb2cbe3519bb60d723d2538a762f344d6fa4d..7123a5d3b69e28423c36e2bd0b102e04c763780d 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -194,9 +194,12 @@ bool BrowserInit::LaunchWithProfile::Launch(Profile* profile,
// the home pages if no additional URLs were passed on the command line.
if (!OpenStartupURLs(process_startup, urls_to_open)) {
// Add the home page and any special first run URLs.
- AddStartupURLs(&urls_to_open);
- OpenURLsInBrowser(BrowserList::GetLastActive(), process_startup,
- urls_to_open);
+ Browser* browser = NULL;
+ if (urls_to_open.empty())
+ AddStartupURLs(&urls_to_open);
+ else
+ browser = BrowserList::GetLastActive();
+ OpenURLsInBrowser(browser, process_startup, urls_to_open);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698