Index: chrome/browser/profiles/gaia_info_update_service.cc |
diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc |
index 6e79b855a5547a9a6f98a6d1df72e2113c2f3bcc..80aa71e2caf1b0b6fb3d9a64b649e29dcaf8fea3 100644 |
--- a/chrome/browser/profiles/gaia_info_update_service.cc |
+++ b/chrome/browser/profiles/gaia_info_update_service.cc |
@@ -118,10 +118,13 @@ void GAIAInfoUpdateService::OnProfileDownloadSuccess( |
return; |
cache.SetGAIANameOfProfileAtIndex(profile_index, full_name); |
- cache.SetGAIAGivenNameOfProfileAtIndex(profile_index, given_name); |
+ // The profile index may have changed. |
+ profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
+ cache.SetGAIAGivenNameOfProfileAtIndex(profile_index, given_name); |
// The profile index may have changed. |
profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); |
Pam (message me for reviews)
2014/07/10 22:39:14
Good catch -- please add a test for the bug.
|
+ |
if (profile_index == std::string::npos) |
return; |
if (picture_status == ProfileDownloader::PICTURE_SUCCESS) { |