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

Side by Side Diff: chrome/browser/chromeos/login/lock/screen_locker.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/lock/screen_locker.h" 5 #include "chrome/browser/chromeos/login/lock/screen_locker.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 12 matching lines...) Expand all
23 #include "base/metrics/histogram.h" 23 #include "base/metrics/histogram.h"
24 #include "base/strings/string_number_conversions.h" 24 #include "base/strings/string_number_conversions.h"
25 #include "base/strings/string_util.h" 25 #include "base/strings/string_util.h"
26 #include "base/timer/timer.h" 26 #include "base/timer/timer.h"
27 #include "chrome/browser/chrome_notification_types.h" 27 #include "chrome/browser/chrome_notification_types.h"
28 #include "chrome/browser/chromeos/login/auth/authenticator.h" 28 #include "chrome/browser/chromeos/login/auth/authenticator.h"
29 #include "chrome/browser/chromeos/login/auth/extended_authenticator.h" 29 #include "chrome/browser/chromeos/login/auth/extended_authenticator.h"
30 #include "chrome/browser/chromeos/login/auth/login_performer.h" 30 #include "chrome/browser/chromeos/login/auth/login_performer.h"
31 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h" 31 #include "chrome/browser/chromeos/login/lock/webui_screen_locker.h"
32 #include "chrome/browser/chromeos/login/login_utils.h" 32 #include "chrome/browser/chromeos/login/login_utils.h"
33 #include "chrome/browser/chromeos/login/managed/supervised_user_authentication.h " 33 #include "chrome/browser/chromeos/login/supervised/supervised_user_authenticatio n.h"
34 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h" 34 #include "chrome/browser/chromeos/login/ui/user_adding_screen.h"
35 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h" 35 #include "chrome/browser/chromeos/login/users/supervised_user_manager.h"
36 #include "chrome/browser/chromeos/login/users/user_manager.h" 36 #include "chrome/browser/chromeos/login/users/user_manager.h"
37 #include "chrome/browser/lifetime/application_lifetime.h" 37 #include "chrome/browser/lifetime/application_lifetime.h"
38 #include "chrome/browser/signin/signin_manager_factory.h" 38 #include "chrome/browser/signin/signin_manager_factory.h"
39 #include "chrome/browser/ui/webui/chromeos/login/screenlock_icon_provider.h" 39 #include "chrome/browser/ui/webui/chromeos/login/screenlock_icon_provider.h"
40 #include "chrome/browser/ui/webui/chromeos/login/screenlock_icon_source.h" 40 #include "chrome/browser/ui/webui/chromeos/login/screenlock_icon_source.h"
41 #include "chrome/common/chrome_switches.h" 41 #include "chrome/common/chrome_switches.h"
42 #include "chromeos/audio/chromeos_sounds.h" 42 #include "chromeos/audio/chromeos_sounds.h"
43 #include "chromeos/dbus/dbus_thread_manager.h" 43 #include "chromeos/dbus/dbus_thread_manager.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 void ScreenLocker::Authenticate(const UserContext& user_context) { 244 void ScreenLocker::Authenticate(const UserContext& user_context) {
245 LOG_ASSERT(IsUserLoggedIn(user_context.GetUserID())) 245 LOG_ASSERT(IsUserLoggedIn(user_context.GetUserID()))
246 << "Invalid user trying to unlock."; 246 << "Invalid user trying to unlock.";
247 247
248 authentication_start_time_ = base::Time::Now(); 248 authentication_start_time_ = base::Time::Now();
249 delegate_->SetInputEnabled(false); 249 delegate_->SetInputEnabled(false);
250 delegate_->OnAuthenticate(); 250 delegate_->OnAuthenticate();
251 251
252 // Special case: supervised users. Use special authenticator. 252 // Special case: supervised users. Use special authenticator.
253 if (const User* user = FindUnlockUser(user_context.GetUserID())) { 253 if (const User* user = FindUnlockUser(user_context.GetUserID())) {
254 if (user->GetType() == user_manager::USER_TYPE_LOCALLY_MANAGED) { 254 if (user->GetType() == user_manager::USER_TYPE_SUPERVISED) {
255 UserContext updated_context = UserManager::Get() 255 UserContext updated_context = UserManager::Get()
256 ->GetSupervisedUserManager() 256 ->GetSupervisedUserManager()
257 ->GetAuthentication() 257 ->GetAuthentication()
258 ->TransformKey(user_context); 258 ->TransformKey(user_context);
259 // TODO(antrim) : replace empty closure with explicit method. 259 // TODO(antrim) : replace empty closure with explicit method.
260 // http://crbug.com/351268 260 // http://crbug.com/351268
261 BrowserThread::PostTask( 261 BrowserThread::PostTask(
262 BrowserThread::UI, 262 BrowserThread::UI,
263 FROM_HERE, 263 FROM_HERE,
264 base::Bind(&ExtendedAuthenticator::AuthenticateToCheck, 264 base::Bind(&ExtendedAuthenticator::AuthenticateToCheck,
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
485 485
486 bool ScreenLocker::IsUserLoggedIn(const std::string& username) { 486 bool ScreenLocker::IsUserLoggedIn(const std::string& username) {
487 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) { 487 for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) {
488 if ((*it)->email() == username) 488 if ((*it)->email() == username)
489 return true; 489 return true;
490 } 490 }
491 return false; 491 return false;
492 } 492 }
493 493
494 } // namespace chromeos 494 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.cc ('k') | chrome/browser/chromeos/login/login_screen_policy_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698