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

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

Issue 2172023002: chrome/browser/chromeos: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 } 969 }
970 } 970 }
971 971
972 bool ChromeUserManagerImpl::UpdateAndCleanUpDeviceLocalAccounts( 972 bool ChromeUserManagerImpl::UpdateAndCleanUpDeviceLocalAccounts(
973 const std::vector<policy::DeviceLocalAccount>& device_local_accounts) { 973 const std::vector<policy::DeviceLocalAccount>& device_local_accounts) {
974 // Try to remove any device local account data marked as pending removal. 974 // Try to remove any device local account data marked as pending removal.
975 CleanUpDeviceLocalAccountNonCryptohomeDataPendingRemoval(); 975 CleanUpDeviceLocalAccountNonCryptohomeDataPendingRemoval();
976 976
977 // Get the current list of device local accounts. 977 // Get the current list of device local accounts.
978 std::vector<std::string> old_accounts; 978 std::vector<std::string> old_accounts;
979 for (const auto& user : users_) { 979 for (auto* user : users_) {
980 if (user->IsDeviceLocalAccount()) 980 if (user->IsDeviceLocalAccount())
981 old_accounts.push_back(user->email()); 981 old_accounts.push_back(user->email());
982 } 982 }
983 983
984 // If the list of device local accounts has not changed, return. 984 // If the list of device local accounts has not changed, return.
985 if (device_local_accounts.size() == old_accounts.size()) { 985 if (device_local_accounts.size() == old_accounts.size()) {
986 bool changed = false; 986 bool changed = false;
987 for (size_t i = 0; i < device_local_accounts.size(); ++i) { 987 for (size_t i = 0; i < device_local_accounts.size(); ++i) {
988 if (device_local_accounts[i].user_id != old_accounts[i]) { 988 if (device_local_accounts[i].user_id != old_accounts[i]) {
989 changed = true; 989 changed = true;
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1323 break; 1323 break;
1324 default: 1324 default:
1325 NOTREACHED(); 1325 NOTREACHED();
1326 break; 1326 break;
1327 } 1327 }
1328 1328
1329 return user; 1329 return user;
1330 } 1330 }
1331 1331
1332 } // namespace chromeos 1332 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698