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

Unified Diff: chrome/browser/ui/browser_init.cc

Issue 9117024: Changes to "launch with multiple profiles" behavior. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Code review. Created 8 years, 11 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') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_init.cc
diff --git a/chrome/browser/ui/browser_init.cc b/chrome/browser/ui/browser_init.cc
index 1996205965e7837d05a38e145abc829ba5bac0e9..5f10ec4b81cc55fa45fea7ff3071a5be593e918f 100644
--- a/chrome/browser/ui/browser_init.cc
+++ b/chrome/browser/ui/browser_init.cc
@@ -1703,6 +1703,15 @@ bool BrowserInit::ProcessCmdLineImpl(
// Launch the profiles in the order they became active.
for (Profiles::const_iterator it = last_opened_profiles.begin();
it != last_opened_profiles.end(); ++it) {
+ // Don't launch additional profiles which would only open a new tab
+ // page. When restarting after an update, all profiles will reopen last
+ // open pages.
+ SessionStartupPref startup_pref =
+ GetSessionStartupPref(command_line, *it);
+ if (*it != last_used_profile &&
+ startup_pref.type != SessionStartupPref::LAST &&
+ startup_pref.type != SessionStartupPref::URLS)
+ continue;
if (!browser_init->LaunchBrowser((*it == last_used_profile) ?
command_line : command_line_without_urls, *it, cur_dir,
is_process_startup, is_first_run, return_code))
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698