Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4018)

Unified Diff: chrome/browser/profiles/gaia_info_update_service.cc

Issue 373083002: Fix incorrect usage of ProfileInfoCache in GAIAInfoUpdateService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_info_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698