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

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

Issue 24072006: Return correct window when user is logged in but before session is started. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix unit test compile error Created 7 years, 3 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/user_manager_impl.h"
6 6
7 #include <cstddef> 7 #include <cstddef>
8 #include <set> 8 #include <set>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 else if (active_user_->GetType() == User::USER_TYPE_PUBLIC_ACCOUNT) 1721 else if (active_user_->GetType() == User::USER_TYPE_PUBLIC_ACCOUNT)
1722 login_user_type = LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT; 1722 login_user_type = LoginState::LOGGED_IN_USER_PUBLIC_ACCOUNT;
1723 else if (active_user_->GetType() == User::USER_TYPE_LOCALLY_MANAGED) 1723 else if (active_user_->GetType() == User::USER_TYPE_LOCALLY_MANAGED)
1724 login_user_type = LoginState::LOGGED_IN_USER_LOCALLY_MANAGED; 1724 login_user_type = LoginState::LOGGED_IN_USER_LOCALLY_MANAGED;
1725 else if (active_user_->GetType() == User::USER_TYPE_KIOSK_APP) 1725 else if (active_user_->GetType() == User::USER_TYPE_KIOSK_APP)
1726 login_user_type = LoginState::LOGGED_IN_USER_KIOSK_APP; 1726 login_user_type = LoginState::LOGGED_IN_USER_KIOSK_APP;
1727 else 1727 else
1728 login_user_type = LoginState::LOGGED_IN_USER_REGULAR; 1728 login_user_type = LoginState::LOGGED_IN_USER_REGULAR;
1729 1729
1730 LoginState::Get()->SetLoggedInState(logged_in_state, login_user_type); 1730 LoginState::Get()->SetLoggedInState(logged_in_state, login_user_type);
1731 LoginState::Get()->SetSessionStarted(session_started_);
stevenjb 2013/09/13 18:22:34 This is confusing to me. Do we really need to intr
1731 } 1732 }
1732 1733
1733 void UserManagerImpl::SetLRUUser(User* user) { 1734 void UserManagerImpl::SetLRUUser(User* user) {
1734 UserList::iterator it = std::find(lru_logged_in_users_.begin(), 1735 UserList::iterator it = std::find(lru_logged_in_users_.begin(),
1735 lru_logged_in_users_.end(), 1736 lru_logged_in_users_.end(),
1736 user); 1737 user);
1737 if (it != lru_logged_in_users_.end()) 1738 if (it != lru_logged_in_users_.end())
1738 lru_logged_in_users_.erase(it); 1739 lru_logged_in_users_.erase(it);
1739 lru_logged_in_users_.insert(lru_logged_in_users_.begin(), user); 1740 lru_logged_in_users_.insert(lru_logged_in_users_.begin(), user);
1740 } 1741 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1819 base::TimeTicks::Now() - manager_creation_time_; 1820 base::TimeTicks::Now() - manager_creation_time_;
1820 if (!last_email.empty() && email != last_email && 1821 if (!last_email.empty() && email != last_email &&
1821 time_to_login.InSeconds() <= kLogoutToLoginDelayMaxSec) { 1822 time_to_login.InSeconds() <= kLogoutToLoginDelayMaxSec) {
1822 UMA_HISTOGRAM_CUSTOM_COUNTS("UserManager.LogoutToLoginDelay", 1823 UMA_HISTOGRAM_CUSTOM_COUNTS("UserManager.LogoutToLoginDelay",
1823 time_to_login.InSeconds(), 0, kLogoutToLoginDelayMaxSec, 50); 1824 time_to_login.InSeconds(), 0, kLogoutToLoginDelayMaxSec, 50);
1824 } 1825 }
1825 } 1826 }
1826 } 1827 }
1827 1828
1828 } // namespace chromeos 1829 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_manager.h ('k') | chrome/browser/chromeos/system/ash_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698