• Colin Blundell's avatar
    IdentityProvider: Provide explicit interface to fetch access tokens · 646f29b4
    Colin Blundell authored
    One of IdentityProvider's clients' use cases is to fetch access tokens
    for the active account. IdentityProvider currently provides no explicit
    mechanism for this, instead letting clients directly interact with the
    underlying OAuth2TokenService instance via GetTokenService(). However,
    it's necessary to decouple IdentityProvider from OAuth2TokenService at
    an interface level in order to allow for porting ProfileIdentityProvider
    to be backed by IdentityManager.
    
    This CL adds an explicit interface for clients of IdentityProvider to
    request access tokens for the active account. This interface is
    currently implemented directly in IdentityProvider itself, as it is
    common to ProfileIdentityProvider and DeviceIdentityProvider. Before
    porting ProfileIdentityProvider to be backed by IdentityManager we
    will move this implementation out into those two derived classes,
    temporarily duplicating it. However, we will only do that when we are
    just at the point of porting ProfileIdentityProvider away from using
    ProfileOAuth2TokenService.
    
    Bug: 809452
    Change-Id: I402af0cb19b5e0057edc3870ca2a8f564f4f8e10
    Reviewed-on: https://chromium-review.googlesource.com/1089051Reviewed-by: default avatarPavel Yatsuk <pavely@chromium.org>
    Commit-Queue: Colin Blundell <blundell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#565584}
    646f29b4
ticl_invalidation_service.cc 15.1 KB