| Index: chrome/browser/chromeos/profiles/profile_helper.cc
|
| diff --git a/chrome/browser/chromeos/profiles/profile_helper.cc b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| index 96fef2b37369d61d85421d2508070d2069fe7ef4..22876498d711b231166f27b449c13362e06fa615 100644
|
| --- a/chrome/browser/chromeos/profiles/profile_helper.cc
|
| +++ b/chrome/browser/chromeos/profiles/profile_helper.cc
|
| @@ -366,9 +366,11 @@ const user_manager::User* ProfileHelper::GetUserByProfile(
|
| return user_manager->GetActiveUser();
|
| }
|
|
|
| + // Finds the matching user in logged-in user list since only a logged-in
|
| + // user would have a profile.
|
| const std::string username_hash =
|
| ProfileHelper::GetUserIdHashFromProfile(profile);
|
| - const user_manager::UserList& users = user_manager->GetUsers();
|
| + const user_manager::UserList& users = user_manager->GetLoggedInUsers();
|
| const user_manager::UserList::const_iterator pos = std::find_if(
|
| users.begin(), users.end(), UsernameHashMatcher(username_hash));
|
| if (pos != users.end())
|
|
|