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

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

Issue 654173005: Don't allow restarting to apply custom flags when supervised user creation flow is active (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: logging restart due flags as warning, don't restart for supervised users Created 6 years, 2 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 | chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h » ('j') | 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 7921718b7bc14aaed656b68b0ed7118585ace04f..9c4e297e82e4df3c2e956757937e34cba016d7c6 100644
--- a/chrome/browser/chromeos/login/login_utils.cc
+++ b/chrome/browser/chromeos/login/login_utils.cc
@@ -147,6 +147,11 @@ bool CanPerformEarlyRestart() {
if (!base::SysInfo::IsRunningOnChromeOS())
return false;
+ if (!ChromeUserManager::Get()->GetCurrentUserFlow()->
+ SupportsEarlyRestartToApplyFlags()) {
+ return false;
+ }
+
const ExistingUserController* controller =
ExistingUserController::current_controller();
if (!controller)
@@ -399,7 +404,7 @@ bool LoginUtilsImpl::RestartToApplyPerSessionFlagsIfNeed(Profile* profile,
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...";
+ LOG(WARNING) << "Restarting to apply per-session flags...";
DBusThreadManager::Get()->GetSessionManagerClient()->SetFlagsForUser(
user_manager::UserManager::Get()->GetActiveUser()->email(), flags);
AttemptRestart(profile);
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698