Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1262)

Side by Side Diff: chrome/browser/chromeos/login/screens/user_selection_screen.cc

Issue 1440583002: This CL replaces e-mail with AccountId on user selection screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 bool is_signin_to_add, 141 bool is_signin_to_add,
142 AuthType auth_type, 142 AuthType auth_type,
143 const std::vector<std::string>* public_session_recommended_locales, 143 const std::vector<std::string>* public_session_recommended_locales,
144 base::DictionaryValue* user_dict) { 144 base::DictionaryValue* user_dict) {
145 const bool is_public_session = 145 const bool is_public_session =
146 user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT; 146 user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT;
147 const bool is_legacy_supervised_user = 147 const bool is_legacy_supervised_user =
148 user->GetType() == user_manager::USER_TYPE_SUPERVISED; 148 user->GetType() == user_manager::USER_TYPE_SUPERVISED;
149 const bool is_child_user = user->GetType() == user_manager::USER_TYPE_CHILD; 149 const bool is_child_user = user->GetType() == user_manager::USER_TYPE_CHILD;
150 150
151 user_dict->SetString(kKeyUsername, user->GetAccountId().GetUserEmail()); 151 user_dict->SetString(kKeyUsername, user->GetAccountId().Serialize());
152 user_dict->SetString(kKeyEmailAddress, user->display_email()); 152 user_dict->SetString(kKeyEmailAddress, user->display_email());
153 user_dict->SetString(kKeyDisplayName, user->GetDisplayName()); 153 user_dict->SetString(kKeyDisplayName, user->GetDisplayName());
154 user_dict->SetBoolean(kKeyPublicAccount, is_public_session); 154 user_dict->SetBoolean(kKeyPublicAccount, is_public_session);
155 user_dict->SetBoolean(kKeyLegacySupervisedUser, is_legacy_supervised_user); 155 user_dict->SetBoolean(kKeyLegacySupervisedUser, is_legacy_supervised_user);
156 user_dict->SetBoolean(kKeyChildUser, is_child_user); 156 user_dict->SetBoolean(kKeyChildUser, is_child_user);
157 user_dict->SetBoolean(kKeyDesktopUser, false); 157 user_dict->SetBoolean(kKeyDesktopUser, false);
158 user_dict->SetInteger(kKeyInitialAuthType, auth_type); 158 user_dict->SetInteger(kKeyInitialAuthType, auth_type);
159 user_dict->SetBoolean(kKeySignedIn, user->is_logged_in()); 159 user_dict->SetBoolean(kKeySignedIn, user->is_logged_in());
160 user_dict->SetBoolean(kKeyIsOwner, is_owner); 160 user_dict->SetBoolean(kKeyIsOwner, is_owner);
161 161
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // The user profile should exist if and only if this is the lock screen. 550 // The user profile should exist if and only if this is the lock screen.
551 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN); 551 DCHECK_EQ(!!profile, GetScreenType() == LOCK_SCREEN);
552 552
553 if (!profile) 553 if (!profile)
554 profile = profile_helper->GetSigninProfile(); 554 profile = profile_helper->GetSigninProfile();
555 555
556 return EasyUnlockService::Get(profile); 556 return EasyUnlockService::Get(profile);
557 } 557 }
558 558
559 } // namespace chromeos 559 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698