| 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 b96563636549e6ca8a6c372ec7416a80b39ddd3f..6a2f147d90c095c8aa0e5879836f96193165ed51 100644
|
| --- a/chrome/browser/chromeos/login/login_utils.cc
|
| +++ b/chrome/browser/chromeos/login/login_utils.cc
|
| @@ -48,6 +48,7 @@
|
| #include "chrome/browser/extensions/extension_service.h"
|
| #include "chrome/browser/first_run/first_run.h"
|
| #include "chrome/browser/google/google_util_chromeos.h"
|
| +#include "chrome/browser/lifetime/application_lifetime.h"
|
| #include "chrome/browser/managed_mode/managed_mode.h"
|
| #include "chrome/browser/net/chrome_url_request_context.h"
|
| #include "chrome/browser/net/preconnect.h"
|
| @@ -280,6 +281,20 @@ void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
|
| if (browser_shutdown::IsTryingToQuit())
|
| return;
|
|
|
| + CommandLine user_flags(CommandLine::NO_PROGRAM);
|
| + about_flags::ConvertFlagsToSwitches(profile->GetPrefs(), &user_flags);
|
| + if (!about_flags::CompareSwitchesToCurrentCommandLine(
|
| + user_flags, *CommandLine::ForCurrentProcess())) {
|
| + CommandLine::StringVector flags;
|
| + // argv[0] is the program name |CommandLine::NO_PROGRAM|.
|
| + flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
|
| + VLOG(1) << "Restarting to apply per-session flags...";
|
| + DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
|
| + UserManager::Get()->GetActiveUser()->email(), flags);
|
| + chrome::ExitCleanly();
|
| + return;
|
| + }
|
| +
|
| if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
|
| UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
|
| return;
|
| @@ -298,9 +313,6 @@ void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
|
| chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
|
| chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
|
|
|
| - // TODO(pastarmovj): Restart the browser and apply any flags set by the user.
|
| - // See: http://crosbug.com/39249
|
| -
|
| browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(),
|
| profile,
|
| base::FilePath(),
|
|
|