1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "components/signin/core/browser/profile_oauth2_token_service.h"
7 void ProfileOAuth2TokenService::OnRefreshTokenAvailable(
8 const std::string
& account_id
) {
9 CancelRequestsForAccount(account_id
);
10 ClearCacheForAccount(account_id
);
13 void ProfileOAuth2TokenService::OnRefreshTokenRevoked(
14 const std::string
& account_id
) {
15 CancelRequestsForAccount(account_id
);
16 ClearCacheForAccount(account_id
);
19 ProfileOAuth2TokenService::ProfileOAuth2TokenService(
20 OAuth2TokenServiceDelegate
* delegate
)
21 : OAuth2TokenService(delegate
) {
25 ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {
29 void ProfileOAuth2TokenService::Shutdown() {
31 GetDelegate()->Shutdown();
34 void ProfileOAuth2TokenService::LoadCredentials(
35 const std::string
& primary_account_id
) {
36 GetDelegate()->LoadCredentials(primary_account_id
);
39 void ProfileOAuth2TokenService::UpdateCredentials(
40 const std::string
& account_id
,
41 const std::string
& refresh_token
) {
42 GetDelegate()->UpdateCredentials(account_id
, refresh_token
);
45 void ProfileOAuth2TokenService::RevokeCredentials(
46 const std::string
& account_id
) {
47 GetDelegate()->RevokeCredentials(account_id
);