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

Unified Diff: chrome/browser/chromeos/login/lock/screen_locker.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/lock/screen_locker.cc
diff --git a/chrome/browser/chromeos/login/lock/screen_locker.cc b/chrome/browser/chromeos/login/lock/screen_locker.cc
index 6afa62678601db44113c9467938193326bf42d9e..5e0471c4fb1ca0d329a508175c6c980144fd0d42 100644
--- a/chrome/browser/chromeos/login/lock/screen_locker.cc
+++ b/chrome/browser/chromeos/login/lock/screen_locker.cc
@@ -129,7 +129,7 @@ ScreenLocker* ScreenLocker::screen_locker_ = NULL;
//////////////////////////////////////////////////////////////////////////////
// ScreenLocker, public:
-ScreenLocker::ScreenLocker(const UserList& users)
+ScreenLocker::ScreenLocker(const user_manager::UserList& users)
: users_(users),
locked_(false),
start_time_(base::Time::Now()),
@@ -202,7 +202,8 @@ void ScreenLocker::OnAuthSuccess(const UserContext& user_context) {
UMA_HISTOGRAM_TIMES("ScreenLocker.AuthenticationSuccessTime", delta);
}
- const User* user = UserManager::Get()->FindUser(user_context.GetUserID());
+ const user_manager::User* user =
+ UserManager::Get()->FindUser(user_context.GetUserID());
if (user) {
if (!user->is_active())
UserManager::Get()->SwitchActiveUser(user_context.GetUserID());
@@ -250,7 +251,8 @@ void ScreenLocker::Authenticate(const UserContext& user_context) {
delegate_->OnAuthenticate();
// Special case: supervised users. Use special authenticator.
- if (const User* user = FindUnlockUser(user_context.GetUserID())) {
+ if (const user_manager::User* user =
+ FindUnlockUser(user_context.GetUserID())) {
if (user->GetType() == user_manager::USER_TYPE_SUPERVISED) {
UserContext updated_context = UserManager::Get()
->GetSupervisedUserManager()
@@ -278,9 +280,12 @@ void ScreenLocker::Authenticate(const UserContext& user_context) {
user_context));
}
-const User* ScreenLocker::FindUnlockUser(const std::string& user_id) {
- const User* unlock_user = NULL;
- for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) {
+const user_manager::User* ScreenLocker::FindUnlockUser(
+ const std::string& user_id) {
+ const user_manager::User* unlock_user = NULL;
+ for (user_manager::UserList::const_iterator it = users_.begin();
+ it != users_.end();
+ ++it) {
if ((*it)->email() == user_id) {
unlock_user = *it;
break;
@@ -484,7 +489,9 @@ content::WebUI* ScreenLocker::GetAssociatedWebUI() {
}
bool ScreenLocker::IsUserLoggedIn(const std::string& username) {
- for (UserList::const_iterator it = users_.begin(); it != users_.end(); ++it) {
+ for (user_manager::UserList::const_iterator it = users_.begin();
+ it != users_.end();
+ ++it) {
if ((*it)->email() == username)
return true;
}
« no previous file with comments | « chrome/browser/chromeos/login/lock/screen_locker.h ('k') | chrome/browser/chromeos/login/lock/webui_screen_locker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698