• davidroche@chromium.org's avatar
    Refactor OAuth2TokenService to have profile- and device-based implementations. · a28c45a9
    davidroche@chromium.org authored
    OAuth2TokenService was refactored into an abstract base class without
    dependencies on Profile and the TokenService's OAuth2 login refresh token.
    
    Added ProfileOAuth2TokenService as an implementation of OAuth2TokenService
    that requires a Profile and the user's login refresh token from
    TokenService. Migrated the existing OAuth2TokenServiceFactory and
    OAuth2TokenServiceRequest to Profile* varients that use this new class.
    
    Added DeviceOAuth2TokenService that serves up API access tokens for
    enterprise enrolled devices (via a robot account with an any-api refresh
    token). These tokens are global to all accounts on the device including
    Public Accounts, and hence don't depend on a particular profile's login
    credentials.
    
    BUG=164606
    
    Review URL: https://chromiumcodereview.appspot.com/12647008
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@194796 0039d316-1c4b-4281-b951-d872f2087c98
    a28c45a9
oauth2_token_service_unittest.cc 16.5 KB