| OLD | NEW |
| 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/screens/user_selection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 if (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) | 262 if (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) |
| 263 RecordReauthReason(user->GetAccountId(), ReauthReason::OTHER); | 263 RecordReauthReason(user->GetAccountId(), ReauthReason::OTHER); |
| 264 | 264 |
| 265 return user->force_online_signin() || | 265 return user->force_online_signin() || |
| 266 (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) || | 266 (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) || |
| 267 (token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN); | 267 (token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN); |
| 268 } | 268 } |
| 269 | 269 |
| 270 void UserSelectionScreen::SetHandler(LoginDisplayWebUIHandler* handler) { | 270 void UserSelectionScreen::SetHandler(LoginDisplayWebUIHandler* handler) { |
| 271 handler_ = handler; | 271 handler_ = handler; |
| 272 |
| 273 if (handler_) { |
| 274 // Forcibly refresh all of the user images, as the |handler_| instance may |
| 275 // have been reused. |
| 276 for (user_manager::User* user : users_) |
| 277 handler_->OnUserImageChanged(*user); |
| 278 } |
| 272 } | 279 } |
| 273 | 280 |
| 274 void UserSelectionScreen::SetView(UserBoardView* view) { | 281 void UserSelectionScreen::SetView(UserBoardView* view) { |
| 275 view_ = view; | 282 view_ = view; |
| 276 } | 283 } |
| 277 | 284 |
| 278 void UserSelectionScreen::Init(const user_manager::UserList& users, | 285 void UserSelectionScreen::Init(const user_manager::UserList& users, |
| 279 bool show_guest) { | 286 bool show_guest) { |
| 280 users_ = users; | 287 users_ = users; |
| 281 show_guest_ = show_guest; | 288 show_guest_ = show_guest; |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 // The user profile should exist if and only if this is the lock screen. | 575 // The user profile should exist if and only if this is the lock screen. |
| 569 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 576 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
| 570 | 577 |
| 571 if (!profile) | 578 if (!profile) |
| 572 profile = profile_helper->GetSigninProfile(); | 579 profile = profile_helper->GetSigninProfile(); |
| 573 | 580 |
| 574 return EasyUnlockService::Get(profile); | 581 return EasyUnlockService::Get(profile); |
| 575 } | 582 } |
| 576 | 583 |
| 577 } // namespace chromeos | 584 } // namespace chromeos |
| OLD | NEW |