| Index: chrome/browser/profiles/profile_impl.cc
|
| diff --git a/chrome/browser/profiles/profile_impl.cc b/chrome/browser/profiles/profile_impl.cc
|
| index c6eb3f6193e556de6e5bac0df734ff6a0663c67f..5ab24d22060938a3a0e93c85f078522667339a27 100644
|
| --- a/chrome/browser/profiles/profile_impl.cc
|
| +++ b/chrome/browser/profiles/profile_impl.cc
|
| @@ -1600,10 +1600,11 @@ SpellCheckProfile* ProfileImpl::GetSpellCheckProfile() {
|
| 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) {
|
| - std::string user_name =
|
| - GetPrefs()->GetString(prefs::kGoogleServicesUsername);
|
| - cache.SetUserNameOfProfileAtIndex(index, UTF8ToUTF16(user_name));
|
| + ProfileInfoEntry entry;
|
| + if (cache.GetInfoForProfile(GetPath(), &entry)) {
|
| + string16 user_name =
|
| + UTF8ToUTF16(GetPrefs()->GetString(prefs::kGoogleServicesUsername));
|
| + entry.set_user_name(user_name);
|
| + cache.SetInfoForProfile(entry);
|
| }
|
| }
|
|
|