| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index 8b6afe1160dfdf9afa3c0da05a21cadc5656aafe..44061d3f90e5df3c9aa5c67b6567edcf85e67f60 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -1165,33 +1165,36 @@ GURL ProfileImpl::GetHomePage() {
|
| void ProfileImpl::UpdateProfileUserNameCache() {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
|
| - size_t index = cache.GetIndexOfProfileWithPath(GetPath());
|
| - if (index != std::string::npos) {
|
| + ProfileInfoEntry entry;
|
| + if (cache.GetInfoForProfile(GetPath(), &entry)) {
|
| std::string user_name =
|
| GetPrefs()->GetString(prefs::kGoogleServicesUsername);
|
| - cache.SetUserNameOfProfileAtIndex(index, UTF8ToUTF16(user_name));
|
| + entry.set_user_name(UTF8ToUTF16(user_name));
|
| + cache.SetInfoForProfile(entry);
|
| }
|
| }
|
|
|
| void ProfileImpl::UpdateProfileNameCache() {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
|
| - size_t index = cache.GetIndexOfProfileWithPath(GetPath());
|
| - if (index != std::string::npos) {
|
| + ProfileInfoEntry entry;
|
| + if (cache.GetInfoForProfile(GetPath(), &entry)) {
|
| std::string profile_name =
|
| GetPrefs()->GetString(prefs::kProfileName);
|
| - cache.SetNameOfProfileAtIndex(index, UTF8ToUTF16(profile_name));
|
| + entry.set_name(UTF8ToUTF16(profile_name));
|
| + cache.SetInfoForProfile(entry);
|
| }
|
| }
|
|
|
| void ProfileImpl::UpdateProfileAvatarCache() {
|
| ProfileManager* profile_manager = g_browser_process->profile_manager();
|
| ProfileInfoCache& cache = profile_manager->GetProfileInfoCache();
|
| - size_t index = cache.GetIndexOfProfileWithPath(GetPath());
|
| - if (index != std::string::npos) {
|
| + ProfileInfoEntry entry;
|
| + if (cache.GetInfoForProfile(GetPath(), &entry)) {
|
| size_t avatar_index =
|
| GetPrefs()->GetInteger(prefs::kProfileAvatarIndex);
|
| - cache.SetAvatarIconOfProfileAtIndex(index, avatar_index);
|
| + entry.set_icon_index(avatar_index);
|
| + cache.SetInfoForProfile(entry);
|
| }
|
| }
|
|
|
|
|