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

Unified Diff: components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm

Issue 1267843003: Fix reconcilor loop when the primary account is in an auth error state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 years, 4 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
Index: components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm
diff --git a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm
index c9cc2b8601814c1926e4c0bf16387a066dfc1c3a..aba0cadcef7a4f4e0b9a252e6f27a102a3d0a19c 100644
--- a/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm
+++ b/components/signin/ios/browser/profile_oauth2_token_service_ios_delegate.mm
@@ -310,6 +310,14 @@ bool ProfileOAuth2TokenServiceIOSDelegate::RefreshTokenIsAvailable(
return accounts_.count(account_id) > 0;
}
+bool ProfileOAuth2TokenServiceIOSDelegate::RefreshTokenHasError(
+ const std::string& account_id) const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ auto it = accounts_.find(account_id);
+ // TODO(rogerta): should we distinguish between transient and persistent?
+ return it == accounts_.end() ? false : IsError(it->second->GetAuthStatus());
+}
+
void ProfileOAuth2TokenServiceIOSDelegate::UpdateAuthError(
const std::string& account_id,
const GoogleServiceAuthError& error) {

Powered by Google App Engine
This is Rietveld 408576698