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