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

Unified Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 17346003: Don't restart browser if UserFlow isn't going to launch browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/chromeos/login/login_utils.cc
diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc
index 24cc11f623962922cf0032b5df469a883688ba11..377f8df5fc0de04b3f1ad5958696e9ef7fc55590 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -285,7 +285,12 @@ void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
CommandLine user_flags(CommandLine::NO_PROGRAM);
about_flags::PrefServiceFlagsStorage flags_storage_(profile->GetPrefs());
about_flags::ConvertFlagsToSwitches(&flags_storage_, &user_flags);
- if (!about_flags::AreSwitchesIdenticalToCurrentCommandLine(
+
+ bool should_launch_browser =
+ UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser();
+
+ if (should_launch_browser &&
+ !about_flags::AreSwitchesIdenticalToCurrentCommandLine(
user_flags, *CommandLine::ForCurrentProcess())) {
CommandLine::StringVector flags;
// argv[0] is the program name |CommandLine::NO_PROGRAM|.
@@ -297,7 +302,7 @@ void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
return;
}
- if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
+ if (!should_launch_browser) {
pastarmovj 2013/06/18 18:15:36 Hey why not move the if above below this if - then
Dmitry Polukhin 2013/06/18 18:40:02 Done.
UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
return;
}
« 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