Commit 6b3b4182 authored by Colin Blundell's avatar Colin Blundell Committed by Commit Bot

Remove usage of is_valid from ProfileDownloader's token update callback

https://chromium-review.googlesource.com/c/chromium/src/+/1163620/
migrated ProfileDownloader to IdentityManager. As part of doing so, it
naturally checked the |is_valid| parameter in ProfileDownloader::
OnRefreshTokenUpdatedForAccount(). However, this check is actually
incorrect, as the being migrated *away from* was not making the
equivalent check (which would have been checking PO2TS::GetAuthError()
explicitly). I discovered this while going through the codebase to
remove the |is_valid| parameter from this observer callback precisely
to avoid this kind of confusion :).

Bug: 909734
Change-Id: Iace1fbe14326aedbdd54e6e59db9ec466d8ffcdc
Reviewed-on: https://chromium-review.googlesource.com/c/1353982Reviewed-by: default avatarMihai Sardarescu <msarda@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612196}
parent bee31086
......@@ -291,7 +291,7 @@ void ProfileDownloader::OnDecodeImageFailed() {
void ProfileDownloader::OnRefreshTokenUpdatedForAccount(
const AccountInfo& account_info,
bool is_valid) {
if (!is_valid || account_info.account_id != account_id_)
if (account_info.account_id != account_id_)
return;
identity_manager_observer_.Remove(identity_manager_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment