Chromium Code Reviews| 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; |
| } |