| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const char kKeyEmailAddress[] = "emailAddress"; | 46 const char kKeyEmailAddress[] = "emailAddress"; |
| 47 const char kKeyEnterpriseDomain[] = "enterpriseDomain"; | 47 const char kKeyEnterpriseDomain[] = "enterpriseDomain"; |
| 48 const char kKeyPublicAccount[] = "publicAccount"; | 48 const char kKeyPublicAccount[] = "publicAccount"; |
| 49 const char kKeyLegacySupervisedUser[] = "legacySupervisedUser"; | 49 const char kKeyLegacySupervisedUser[] = "legacySupervisedUser"; |
| 50 const char kKeyChildUser[] = "childUser"; | 50 const char kKeyChildUser[] = "childUser"; |
| 51 const char kKeyDesktopUser[] = "isDesktopUser"; | 51 const char kKeyDesktopUser[] = "isDesktopUser"; |
| 52 const char kKeyShowPin[] = "showPin"; | 52 const char kKeyShowPin[] = "showPin"; |
| 53 const char kKeySignedIn[] = "signedIn"; | 53 const char kKeySignedIn[] = "signedIn"; |
| 54 const char kKeyCanRemove[] = "canRemove"; | 54 const char kKeyCanRemove[] = "canRemove"; |
| 55 const char kKeyIsOwner[] = "isOwner"; | 55 const char kKeyIsOwner[] = "isOwner"; |
| 56 const char kKeyIsActiveDirectory[] = "isActiveDirectory"; |
| 56 const char kKeyInitialAuthType[] = "initialAuthType"; | 57 const char kKeyInitialAuthType[] = "initialAuthType"; |
| 57 const char kKeyMultiProfilesAllowed[] = "isMultiProfilesAllowed"; | 58 const char kKeyMultiProfilesAllowed[] = "isMultiProfilesAllowed"; |
| 58 const char kKeyMultiProfilesPolicy[] = "multiProfilesPolicy"; | 59 const char kKeyMultiProfilesPolicy[] = "multiProfilesPolicy"; |
| 59 const char kKeyInitialLocales[] = "initialLocales"; | 60 const char kKeyInitialLocales[] = "initialLocales"; |
| 60 const char kKeyInitialLocale[] = "initialLocale"; | 61 const char kKeyInitialLocale[] = "initialLocale"; |
| 61 const char kKeyInitialMultipleRecommendedLocales[] = | 62 const char kKeyInitialMultipleRecommendedLocales[] = |
| 62 "initialMultipleRecommendedLocales"; | 63 "initialMultipleRecommendedLocales"; |
| 63 const char kKeyInitialKeyboardLayout[] = "initialKeyboardLayout"; | 64 const char kKeyInitialKeyboardLayout[] = "initialKeyboardLayout"; |
| 64 | 65 |
| 65 // Max number of users to show. | 66 // Max number of users to show. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 user_dict->SetString(kKeyEmailAddress, user->display_email()); | 174 user_dict->SetString(kKeyEmailAddress, user->display_email()); |
| 174 user_dict->SetString(kKeyDisplayName, user->GetDisplayName()); | 175 user_dict->SetString(kKeyDisplayName, user->GetDisplayName()); |
| 175 user_dict->SetBoolean(kKeyPublicAccount, is_public_session); | 176 user_dict->SetBoolean(kKeyPublicAccount, is_public_session); |
| 176 user_dict->SetBoolean(kKeyLegacySupervisedUser, is_legacy_supervised_user); | 177 user_dict->SetBoolean(kKeyLegacySupervisedUser, is_legacy_supervised_user); |
| 177 user_dict->SetBoolean(kKeyChildUser, is_child_user); | 178 user_dict->SetBoolean(kKeyChildUser, is_child_user); |
| 178 user_dict->SetBoolean(kKeyDesktopUser, false); | 179 user_dict->SetBoolean(kKeyDesktopUser, false); |
| 179 user_dict->SetInteger(kKeyInitialAuthType, auth_type); | 180 user_dict->SetInteger(kKeyInitialAuthType, auth_type); |
| 180 user_dict->SetBoolean(kKeyShowPin, CanShowPinForUser(user)); | 181 user_dict->SetBoolean(kKeyShowPin, CanShowPinForUser(user)); |
| 181 user_dict->SetBoolean(kKeySignedIn, user->is_logged_in()); | 182 user_dict->SetBoolean(kKeySignedIn, user->is_logged_in()); |
| 182 user_dict->SetBoolean(kKeyIsOwner, is_owner); | 183 user_dict->SetBoolean(kKeyIsOwner, is_owner); |
| 184 user_dict->SetBoolean(kKeyIsActiveDirectory, user->IsActiveDirectoryUser()); |
| 183 | 185 |
| 184 FillMultiProfileUserPrefs(user, user_dict, is_signin_to_add); | 186 FillMultiProfileUserPrefs(user, user_dict, is_signin_to_add); |
| 185 FillKnownUserPrefs(user, user_dict); | 187 FillKnownUserPrefs(user, user_dict); |
| 186 | 188 |
| 187 if (is_public_session) { | 189 if (is_public_session) { |
| 188 AddPublicSessionDetailsToUserDictionaryEntry( | 190 AddPublicSessionDetailsToUserDictionaryEntry( |
| 189 user_dict, public_session_recommended_locales); | 191 user_dict, public_session_recommended_locales); |
| 190 } | 192 } |
| 191 } | 193 } |
| 192 | 194 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 // The user profile should exist if and only if this is the lock screen. | 576 // The user profile should exist if and only if this is the lock screen. |
| 575 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); | 577 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); |
| 576 | 578 |
| 577 if (!profile) | 579 if (!profile) |
| 578 profile = profile_helper->GetSigninProfile(); | 580 profile = profile_helper->GetSigninProfile(); |
| 579 | 581 |
| 580 return EasyUnlockService::Get(profile); | 582 return EasyUnlockService::Get(profile); |
| 581 } | 583 } |
| 582 | 584 |
| 583 } // namespace chromeos | 585 } // namespace chromeos |
| OLD | NEW |