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

Unified Diff: chrome/browser/extensions/api/identity/account_tracker.cc

Issue 39203002: IdentityAPI: update SigninGlobalError when tokens become available (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: really always update SigninGlobalError Created 7 years, 2 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
« no previous file with comments | « chrome/browser/extensions/api/identity/account_tracker.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/identity/account_tracker.cc
diff --git a/chrome/browser/extensions/api/identity/account_tracker.cc b/chrome/browser/extensions/api/identity/account_tracker.cc
index 03db40a97df63f736305b99366f6bfb1c998ca3a..ea09479bd4193855630b4b7a848488f7af900334 100644
--- a/chrome/browser/extensions/api/identity/account_tracker.cc
+++ b/chrome/browser/extensions/api/identity/account_tracker.cc
@@ -52,7 +52,7 @@ void AccountTracker::RemoveObserver(Observer* observer) {
void AccountTracker::OnRefreshTokenAvailable(const std::string& account_id) {
DVLOG(1) << "AVAILABLE " << account_id;
- account_errors_.erase(account_id);
+ ClearAuthError(account_id);
UpdateSignInState(account_id, true);
}
@@ -93,6 +93,11 @@ void AccountTracker::NotifySignInChanged(const AccountState& account) {
OnAccountSignInChanged(account.ids, account.is_signed_in));
}
+void AccountTracker::ClearAuthError(const std::string& account_key) {
+ account_errors_.erase(account_key);
+ SigninGlobalError::GetForProfile(profile_)->AuthStatusChanged();
+}
+
void AccountTracker::UpdateSignInState(const std::string& account_key,
bool is_signed_in) {
StartTrackingAccount(account_key);
@@ -129,7 +134,7 @@ void AccountTracker::StopTrackingAccount(const std::string& account_key) {
accounts_.erase(account_key);
}
- account_errors_.erase(account_key);
+ ClearAuthError(account_key);
if (ContainsKey(user_info_requests_, account_key))
DeleteFetcher(user_info_requests_[account_key]);
« no previous file with comments | « chrome/browser/extensions/api/identity/account_tracker.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698