| 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 "base/location.h" | 7 #include "base/location.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 user_id, base::Bind(&UserSelectionScreen::OnUserStatusChecked, | 426 user_id, base::Bind(&UserSelectionScreen::OnUserStatusChecked, |
| 427 weak_factory_.GetWeakPtr())); | 427 weak_factory_.GetWeakPtr())); |
| 428 } | 428 } |
| 429 } | 429 } |
| 430 | 430 |
| 431 void UserSelectionScreen::OnUserStatusChecked( | 431 void UserSelectionScreen::OnUserStatusChecked( |
| 432 const user_manager::UserID& user_id, | 432 const user_manager::UserID& user_id, |
| 433 TokenHandleUtil::TokenHandleStatus status) { | 433 TokenHandleUtil::TokenHandleStatus status) { |
| 434 if (status == TokenHandleUtil::INVALID) { | 434 if (status == TokenHandleUtil::INVALID) { |
| 435 RecordReauthReason(user_id, ReauthReason::INVALID_TOKEN_HANDLE); | 435 RecordReauthReason(user_id, ReauthReason::INVALID_TOKEN_HANDLE); |
| 436 user_manager::UserManager::Get()->SaveUserOAuthStatus( | 436 token_handle_util_->MarkHandleInvalid(user_id); |
| 437 user_id, user_manager::User::OAUTH2_TOKEN_STATUS_INVALID); | |
| 438 token_handle_util_->DeleteToken(user_id); | |
| 439 SetAuthType(user_id, ONLINE_SIGN_IN, base::string16()); | 437 SetAuthType(user_id, ONLINE_SIGN_IN, base::string16()); |
| 440 } | 438 } |
| 441 } | 439 } |
| 442 | 440 |
| 443 // EasyUnlock stuff | 441 // EasyUnlock stuff |
| 444 | 442 |
| 445 void UserSelectionScreen::SetAuthType(const std::string& user_id, | 443 void UserSelectionScreen::SetAuthType(const std::string& user_id, |
| 446 AuthType auth_type, | 444 AuthType auth_type, |
| 447 const base::string16& initial_value) { | 445 const base::string16& initial_value) { |
| 448 if (GetAuthType(user_id) == FORCE_OFFLINE_PASSWORD) | 446 if (GetAuthType(user_id) == FORCE_OFFLINE_PASSWORD) |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 // The user profile should exist if and only if this is the lock screen. | 556 // The user profile should exist if and only if this is the lock screen. |
| 559 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 557 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
| 560 | 558 |
| 561 if (!profile) | 559 if (!profile) |
| 562 profile = profile_helper->GetSigninProfile(); | 560 profile = profile_helper->GetSigninProfile(); |
| 563 | 561 |
| 564 return EasyUnlockService::Get(profile); | 562 return EasyUnlockService::Get(profile); |
| 565 } | 563 } |
| 566 | 564 |
| 567 } // namespace chromeos | 565 } // namespace chromeos |
| OLD | NEW |