X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fbrowser%2Fprofiles%2Fgaia_info_update_service.cc;h=a68006b4fbe3e0be1538ec67c5390660eb060ad9;hb=4a1a0bdd01eef90b0826a0e761d3379d3715c10f;hp=6e79b855a5547a9a6f98a6d1df72e2113c2f3bcc;hpb=b1be5ca53587d23e7aeb77b26861fdc0a181ffd8;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/browser/profiles/gaia_info_update_service.cc b/src/chrome/browser/profiles/gaia_info_update_service.cc index 6e79b85..a68006b 100644 --- a/src/chrome/browser/profiles/gaia_info_update_service.cc +++ b/src/chrome/browser/profiles/gaia_info_update_service.cc @@ -118,12 +118,15 @@ 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()); + DCHECK_NE(profile_index, std::string::npos); + cache.SetGAIAGivenNameOfProfileAtIndex(profile_index, given_name); // The profile index may have changed. profile_index = cache.GetIndexOfProfileWithPath(profile_->GetPath()); - if (profile_index == std::string::npos) - return; + DCHECK_NE(profile_index, std::string::npos); + if (picture_status == ProfileDownloader::PICTURE_SUCCESS) { profile_->GetPrefs()->SetString(prefs::kProfileGAIAInfoPictureURL, picture_url);