Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 |
| OLD | NEW |