Commit e3b76fa9 authored by mlerman@chromium.org's avatar mlerman@chromium.org

Handle opening "You" profile from the User Manager.

When doing name-based comparison, use the displayed name.

BUG=400633

Review URL: https://codereview.chromium.org/442843002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287635 0039d316-1c4b-4281-b951-d872f2087c98
parent 0295dc62
......@@ -120,7 +120,9 @@ size_t GetIndexOfProfileWithEmailAndName(const ProfileInfoCache& info_cache,
const base::string16& name) {
for (size_t i = 0; i < info_cache.GetNumberOfProfiles(); ++i) {
if (info_cache.GetUserNameOfProfileAtIndex(i) == email &&
(name.empty() || info_cache.GetNameOfProfileAtIndex(i) == name)) {
(name.empty() ||
profiles::GetAvatarNameForProfile(
info_cache.GetPathOfProfileAtIndex(i)) == name)) {
return i;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment