[ProfileInfoCache]: Only override account image if it is of the right size.
The profile info cache relies now on the AccountFetcherService to fetch the account info as well the account image. The AccountFetcherService downloads the image on signin or every 24 hours. The profile info cache used to rely on the profile_downloader to download 256 image while the AccountFetcherService used to download 64 image. The AccountFetcherService currently downloads 256 images but for existing profiles there is a delay of 24 hours until the image of size 256 is downloaded. To eliviate this case, the GaiaInfoUpdateService will do the following: (1) If the image's size is equal to |kAccountInfoImageSize|, it means it is a newly downloaded image either for a new signin event or a 24 hour refresh, so we should save it to the profile info cache. (2) Else, it means it is an old image and should not override the existing one. Bug: 1028328 Change-Id: I2c77b2bf803b60aa98b46a80649697707e223005 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1936313Reviewed-by:David Roger <droger@chromium.org> Commit-Queue: Monica Basta <msalama@chromium.org> Cr-Commit-Position: refs/heads/master@{#719203}
Showing
Please register or sign in to comment