• Maksim Moskvitin's avatar
    [Trusted vault] Implement access token fetching · c24cbbc2
    Maksim Moskvitin authored
    This CL adds access token fetching functionality, that can be used on
    trusted vault backend sequence. Implementation consists of:
    
    TrustedVaultAccessTokenFetcherFrontend:
     * this class must be used on the UI thread
     * it allows asynchronous access token fetching
     * it supports multiple ongoing FetchAccessToken() calls (e.g. the
     method can be called before |callback| passed to the previous one was
     run)
     * it observes primary account changes and reply with empty access token
     to callbacks which correspond to non-primary account
    
    TrustedVaultAccessTokenFetcherImpl:
     * created on the UI thread and its ownership transferred to the backend
     sequence
     * plumbs backend FetchAccessToken() attempts to the frontend
     * handles invalidation of TrustedVaultAccessTokenFetcherFrontend
     WeakPtr
    
    Bug: 1113597
    Change-Id: I72d5962c374b3141d8a20a2ad2a4b42a378bbfde
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2379734
    Commit-Queue: Maksim Moskvitin <mmoskvitin@google.com>
    Reviewed-by: default avatarMarc Treib <treib@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#802650}
    c24cbbc2
BUILD.gn 1.08 KB