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"
8 #include "base/message_loop/message_loop.h"
9 #include "base/stl_util.h"
10 #include "base/time/time.h"
11 #include "components/signin/core/browser/signin_error_controller.h"
12 #include "net/url_request/url_request_context_getter.h"
14 ProfileOAuth2TokenService::ProfileOAuth2TokenService()
17 ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {
18 DCHECK(!signin_error_controller_
.get()) <<
19 "ProfileOAuth2TokenService::Initialize called but not "
20 "ProfileOAuth2TokenService::Shutdown";
23 void ProfileOAuth2TokenService::Initialize(SigninClient
* client
) {
28 signin_error_controller_
.reset(new SigninErrorController());
31 void ProfileOAuth2TokenService::Shutdown() {
32 DCHECK(client_
) << "Shutdown() called without matching call to Initialize()";
33 signin_error_controller_
.reset();
36 net::URLRequestContextGetter
* ProfileOAuth2TokenService::GetRequestContext() {
40 void ProfileOAuth2TokenService::UpdateAuthError(
41 const std::string
& account_id
,
42 const GoogleServiceAuthError
& error
) {
46 std::vector
<std::string
> ProfileOAuth2TokenService::GetAccounts() {
48 return std::vector
<std::string
>();
51 void ProfileOAuth2TokenService::LoadCredentials(
52 const std::string
& primary_account_id
) {
53 // Empty implementation by default.
56 void ProfileOAuth2TokenService::UpdateCredentials(
57 const std::string
& account_id
,
58 const std::string
& refresh_token
) {
62 void ProfileOAuth2TokenService::RevokeAllCredentials() {
63 // Empty implementation by default.