| 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 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; | 250 user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; |
| 251 | 251 |
| 252 if (is_supervised_user && | 252 if (is_supervised_user && |
| 253 token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN) { | 253 token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN) { |
| 254 return false; | 254 return false; |
| 255 } | 255 } |
| 256 | 256 |
| 257 if (is_public_session) | 257 if (is_public_session) |
| 258 return false; | 258 return false; |
| 259 | 259 |
| 260 if (user->GetType() == user_manager::USER_TYPE_AD) { |
| 261 return true; |
| 262 } |
| 263 |
| 260 // At this point the reason for invalid token should be already set. If not, | 264 // At this point the reason for invalid token should be already set. If not, |
| 261 // this might be a leftover from an old version. | 265 // this might be a leftover from an old version. |
| 262 if (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) | 266 if (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) |
| 263 RecordReauthReason(user->GetAccountId(), ReauthReason::OTHER); | 267 RecordReauthReason(user->GetAccountId(), ReauthReason::OTHER); |
| 264 | 268 |
| 265 return user->force_online_signin() || | 269 return user->force_online_signin() || |
| 266 (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) || | 270 (token_status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) || |
| 267 (token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN); | 271 (token_status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN); |
| 268 } | 272 } |
| 269 | 273 |
| (...skipping 298 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. | 572 // The user profile should exist if and only if this is the lock screen. |
| 569 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 573 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
| 570 | 574 |
| 571 if (!profile) | 575 if (!profile) |
| 572 profile = profile_helper->GetSigninProfile(); | 576 profile = profile_helper->GetSigninProfile(); |
| 573 | 577 |
| 574 return EasyUnlockService::Get(profile); | 578 return EasyUnlockService::Get(profile); |
| 575 } | 579 } |
| 576 | 580 |
| 577 } // namespace chromeos | 581 } // namespace chromeos |
| OLD | NEW |