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 ea09479bd4193855630b4b7a848488f7af900334..f046ff5f4e004593c1eae9a69ef196f08273edca 100644 |
--- a/chrome/browser/extensions/api/identity/account_tracker.cc |
+++ b/chrome/browser/extensions/api/identity/account_tracker.cc |
@@ -51,6 +51,12 @@ void AccountTracker::RemoveObserver(Observer* observer) { |
} |
void AccountTracker::OnRefreshTokenAvailable(const std::string& account_id) { |
+ // Ignore refresh tokens if there is no primary account ID at all. |
+ ProfileOAuth2TokenService* token_service = |
+ ProfileOAuth2TokenServiceFactory::GetForProfile(profile_); |
+ if (token_service->GetPrimaryAccountId().empty()) |
Michael Courage
2013/10/29 18:25:35
This code doesn't give the reader much hope of und
Bernhard Bauer
2013/10/29 20:25:08
Roger can explain more about the ongoing refactori
Michael Courage
2013/10/29 21:13:47
I suspect that this layering violation is already
Bernhard Bauer
2013/10/30 16:23:23
No, this token should only be used by services tha
|
+ return; |
+ |
DVLOG(1) << "AVAILABLE " << account_id; |
ClearAuthError(account_id); |
UpdateSignInState(account_id, true); |