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

Side by Side Diff: chrome/browser/chromeos/login/users/chrome_user_manager_impl.cc

Issue 2392693002: Rewrite simple uses of base::ListValue::Append(base::Value*) on CrOS. (Closed)
Patch Set: MakeUnique Created 4 years, 2 months 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/users/chrome_user_manager_impl.h" 5 #include "chrome/browser/chromeos/login/users/chrome_user_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cstddef> 9 #include <cstddef>
10 #include <set> 10 #include <set>
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
706 for (user_manager::UserList::iterator it = users_.begin(); 706 for (user_manager::UserList::iterator it = users_.begin();
707 it != users_.end();) { 707 it != users_.end();) {
708 const AccountId account_id = (*it)->GetAccountId(); 708 const AccountId account_id = (*it)->GetAccountId();
709 if ((*it)->HasGaiaAccount() && account_id != GetOwnerAccountId()) { 709 if ((*it)->HasGaiaAccount() && account_id != GetOwnerAccountId()) {
710 RemoveNonCryptohomeData(account_id); 710 RemoveNonCryptohomeData(account_id);
711 DeleteUser(*it); 711 DeleteUser(*it);
712 it = users_.erase(it); 712 it = users_.erase(it);
713 changed = true; 713 changed = true;
714 } else { 714 } else {
715 if ((*it)->GetType() != user_manager::USER_TYPE_PUBLIC_ACCOUNT) 715 if ((*it)->GetType() != user_manager::USER_TYPE_PUBLIC_ACCOUNT)
716 prefs_users_update->Append( 716 prefs_users_update->AppendString(account_id.GetUserEmail());
717 new base::StringValue(account_id.GetUserEmail()));
718 ++it; 717 ++it;
719 } 718 }
720 } 719 }
721 } 720 }
722 721
723 if (changed) 722 if (changed)
724 NotifyUserListChanged(); 723 NotifyUserListChanged();
725 } 724 }
726 725
727 void ChromeUserManagerImpl::GuestUserLoggedIn() { 726 void ChromeUserManagerImpl::GuestUserLoggedIn() {
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 break; 1342 break;
1344 default: 1343 default:
1345 NOTREACHED(); 1344 NOTREACHED();
1346 break; 1345 break;
1347 } 1346 }
1348 1347
1349 return user; 1348 return user;
1350 } 1349 }
1351 1350
1352 } // namespace chromeos 1351 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698