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

Unified Diff: chrome/browser/supervised_user/chromeos/manager_password_service.cc

Issue 615493005: c/b/supervised_user: Use range-based for where appropriate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix CrOS Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/supervised_user/supervised_user_pref_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/supervised_user/chromeos/manager_password_service.cc
diff --git a/chrome/browser/supervised_user/chromeos/manager_password_service.cc b/chrome/browser/supervised_user/chromeos/manager_password_service.cc
index af706b0e866edf78a4358613335aa0e16e8c5e61..e292233cc59c7b7039033277c6def927d9f13518 100644
--- a/chrome/browser/supervised_user/chromeos/manager_password_service.cc
+++ b/chrome/browser/supervised_user/chromeos/manager_password_service.cc
@@ -42,18 +42,14 @@ void ManagerPasswordService::Init(
SupervisedUserManager* supervised_user_manager =
ChromeUserManager::Get()->GetSupervisedUserManager();
- const user_manager::UserList& users =
- user_manager::UserManager::Get()->GetUsers();
-
- for (user_manager::UserList::const_iterator it = users.begin();
- it != users.end();
- ++it) {
- if ((*it)->GetType() != user_manager::USER_TYPE_SUPERVISED)
+ for (const user_manager::User* user :
+ user_manager::UserManager::Get()->GetUsers()) {
+ if (user->GetType() != user_manager::USER_TYPE_SUPERVISED)
continue;
- if (user_id != supervised_user_manager->GetManagerUserId((*it)->email()))
+ if (user_id != supervised_user_manager->GetManagerUserId(user->email()))
continue;
OnSharedSettingsChange(
- supervised_user_manager->GetUserSyncId((*it)->email()),
+ supervised_user_manager->GetUserSyncId(user->email()),
supervised_users::kChromeOSPasswordData);
}
}
« no previous file with comments | « no previous file | chrome/browser/supervised_user/supervised_user_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698