summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-15 08:06:59 +0000
committernkostylev@chromium.org <nkostylev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-15 08:06:59 +0000
commitdd0c175cd1a6a96ed2cad1c581f489135e950218 (patch)
tree6a636bb524bf7cb867a4e4e9f19bb409eb4ab122
parent89360054279f883acf4136845f5d50bf8dfdeda6 (diff)
downloadchromium_src-dd0c175cd1a6a96ed2cad1c581f489135e950218.zip
chromium_src-dd0c175cd1a6a96ed2cad1c581f489135e950218.tar.gz
chromium_src-dd0c175cd1a6a96ed2cad1c581f489135e950218.tar.bz2
Merge 263616 "LRU logic for user-list returned."
> LRU logic for user-list returned. > > BUG=361112 > > Review URL: https://codereview.chromium.org/235923008 TBR=merkulova@chromium.org Review URL: https://codereview.chromium.org/238203003 git-svn-id: svn://svn.chromium.org/chrome/branches/1916/src@263804 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
index 34e8d6f..56d8b74 100644
--- a/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc
@@ -1394,10 +1394,12 @@ void SigninScreenHandler::SendUserList(bool animated) {
!signed_in && !is_signin_to_add);
user_dict->SetBoolean(kKeyCanRemove, can_remove_user);
- if (is_owner) {
- users_list.Insert(0, user_dict);
- } else {
+ if (!is_owner)
++non_owner_count;
+ if (is_owner && users_list.GetSize() > kMaxUsers) {
+ // Owner is always in the list.
+ users_list.Insert(kMaxUsers - 1, user_dict);
+ } else {
users_list.Append(user_dict);
}
}