Do not fetch profile image if the profile picture URL is invalid.
ProfileDownloader is responsible to download the picture of an account. To do the fetch, it uses the account picture URL that is fetched by the AccountFetcherService (from https://www.googleapis.com/oauth2/v1/userinfo ) and stored in AccountTrackerService as an AccountInfo. If the user info dictionary fetched from the userinfo endpoint does not contain any picture URL, then it sets the picture URL to "NO_PICTURE_URL" in the AccountInfo. ProfileDownloader does not check whether the profile picture URL is invalid before creating the URLFetcher to fetch this image. So if the picture URL of the account is "NO_PICTURE_URL", then it will attempt to fetch it via an invalid URL which leads to the crash described in the bug. This CL gracefully handles the case when the picture URL is invalid. Bug: 854907 Change-Id: Iea79b120cd8e4e830fa1a4cc074793418914b155 Reviewed-on: https://chromium-review.googlesource.com/1111846 Commit-Queue: Mihai Sardarescu <msarda@chromium.org> Reviewed-by:Boris Sazonov <bsazonov@chromium.org> Reviewed-by:
David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#569628}
Showing
Please register or sign in to comment