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

Side by Side Diff: chrome/browser/chromeos/login/login_utils.cc

Issue 393343002: Rename "managed (mode|user)" to "supervised user" (part 7) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more alphabetize (and rebase again) Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return user_flags; 101 return user_flags;
102 } 102 }
103 103
104 // Returns true if restart is needed to apply per-session flags. 104 // Returns true if restart is needed to apply per-session flags.
105 bool NeedRestartToApplyPerSessionFlags(const CommandLine& user_flags) { 105 bool NeedRestartToApplyPerSessionFlags(const CommandLine& user_flags) {
106 // Don't restart browser if it is not first profile in session. 106 // Don't restart browser if it is not first profile in session.
107 if (UserManager::Get()->GetLoggedInUsers().size() != 1) 107 if (UserManager::Get()->GetLoggedInUsers().size() != 1)
108 return false; 108 return false;
109 109
110 // Only restart if needed and if not going into managed mode. 110 // Only restart if needed and if not going into managed mode.
111 if (UserManager::Get()->IsLoggedInAsLocallyManagedUser()) 111 if (UserManager::Get()->IsLoggedInAsSupervisedUser())
112 return false; 112 return false;
113 113
114 if (about_flags::AreSwitchesIdenticalToCurrentCommandLine( 114 if (about_flags::AreSwitchesIdenticalToCurrentCommandLine(
115 user_flags, *CommandLine::ForCurrentProcess())) { 115 user_flags, *CommandLine::ForCurrentProcess())) {
116 return false; 116 return false;
117 } 117 }
118 118
119 return true; 119 return true;
120 } 120 }
121 121
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 CrosSettings* cros_settings = CrosSettings::Get(); 458 CrosSettings* cros_settings = CrosSettings::Get();
459 bool allow_new_user = false; 459 bool allow_new_user = false;
460 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user); 460 cros_settings->GetBoolean(kAccountsPrefAllowNewUser, &allow_new_user);
461 if (allow_new_user) 461 if (allow_new_user)
462 return true; 462 return true;
463 return cros_settings->FindEmailInList( 463 return cros_settings->FindEmailInList(
464 kAccountsPrefUsers, username, wildcard_match); 464 kAccountsPrefUsers, username, wildcard_match);
465 } 465 }
466 466
467 } // namespace chromeos 467 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698