| 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/ui/ash/session_state_delegate_chromeos.h" | 5 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/multi_profile_uma.h" | 7 #include "ash/multi_profile_uma.h" |
| 8 #include "ash/session_state_observer.h" | 8 #include "ash/session_state_observer.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 chromeos::UserAddingScreen::Get()->IsRunning(); | 111 chromeos::UserAddingScreen::Get()->IsRunning(); |
| 112 } | 112 } |
| 113 | 113 |
| 114 const base::string16 SessionStateDelegateChromeos::GetUserDisplayName( | 114 const base::string16 SessionStateDelegateChromeos::GetUserDisplayName( |
| 115 ash::MultiProfileIndex index) const { | 115 ash::MultiProfileIndex index) const { |
| 116 DCHECK_LT(index, NumberOfLoggedInUsers()); | 116 DCHECK_LT(index, NumberOfLoggedInUsers()); |
| 117 return chromeos::UserManager::Get()-> | 117 return chromeos::UserManager::Get()-> |
| 118 GetLRULoggedInUsers()[index]->display_name(); | 118 GetLRULoggedInUsers()[index]->display_name(); |
| 119 } | 119 } |
| 120 | 120 |
| 121 const base::string16 SessionStateDelegateChromeos::GetUserGivenName( |
| 122 ash::MultiProfileIndex index) const { |
| 123 DCHECK_LT(index, NumberOfLoggedInUsers()); |
| 124 return chromeos::UserManager::Get() |
| 125 ->GetLRULoggedInUsers()[index] |
| 126 ->given_name(); |
| 127 } |
| 128 |
| 121 const std::string SessionStateDelegateChromeos::GetUserEmail( | 129 const std::string SessionStateDelegateChromeos::GetUserEmail( |
| 122 ash::MultiProfileIndex index) const { | 130 ash::MultiProfileIndex index) const { |
| 123 DCHECK_LT(index, NumberOfLoggedInUsers()); | 131 DCHECK_LT(index, NumberOfLoggedInUsers()); |
| 124 return chromeos::UserManager::Get()-> | 132 return chromeos::UserManager::Get()-> |
| 125 GetLRULoggedInUsers()[index]->display_email(); | 133 GetLRULoggedInUsers()[index]->display_email(); |
| 126 } | 134 } |
| 127 | 135 |
| 128 const std::string SessionStateDelegateChromeos::GetUserID( | 136 const std::string SessionStateDelegateChromeos::GetUserID( |
| 129 ash::MultiProfileIndex index) const { | 137 ash::MultiProfileIndex index) const { |
| 130 DCHECK_LT(index, NumberOfLoggedInUsers()); | 138 DCHECK_LT(index, NumberOfLoggedInUsers()); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 session_state_observer_list_, | 222 session_state_observer_list_, |
| 215 ActiveUserChanged(active_user->email())); | 223 ActiveUserChanged(active_user->email())); |
| 216 } | 224 } |
| 217 | 225 |
| 218 void SessionStateDelegateChromeos::UserAddedToSession( | 226 void SessionStateDelegateChromeos::UserAddedToSession( |
| 219 const chromeos::User* added_user) { | 227 const chromeos::User* added_user) { |
| 220 FOR_EACH_OBSERVER(ash::SessionStateObserver, | 228 FOR_EACH_OBSERVER(ash::SessionStateObserver, |
| 221 session_state_observer_list_, | 229 session_state_observer_list_, |
| 222 UserAddedToSession(added_user->email())); | 230 UserAddedToSession(added_user->email())); |
| 223 } | 231 } |
| OLD | NEW |