Bugfix: CrOsOAuth2TsDelegate calling FireRefreshTokensLoaded too early
|ChromeOSOAuth2TokenServiceDelegate| loads tokens at startup and calls |FireRefreshTokensLoaded| before some token service observers may have had a chance to register themselves. This causes them to miss the |OnRefreshTokensLoaded| callback. For now, the solution is to respect the temporal coupling between |OAuth2TokenServiceDelegate::LoadCredentials| and |OAuth2TokenService::AddObserver|, i.e. |LoadCredentials| is called only when all observers have been added. Ideally, it should be an observer's responsibility to check whether it has been initialized 'too late' and may have missed the |OnRefreshTokensLoaded| notification. Bug: 820046 Change-Id: I3ac67798d165afe230fa29e03ec7af75a9a093a9 Reviewed-on: https://chromium-review.googlesource.com/1069353 Commit-Queue: Kush Sinha <sinhak@chromium.org> Reviewed-by:Xiyuan Xia <xiyuan@chromium.org> Reviewed-by:
Lutz Justen <ljusten@chromium.org> Cr-Commit-Position: refs/heads/master@{#561422}
Showing
Please register or sign in to comment