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.
4
5#include "components/signin/core/browser/profile_oauth2_token_service.h"
6
7#include "base/bind.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"
13
14ProfileOAuth2TokenService::ProfileOAuth2TokenService()
15    : client_(NULL) {}
16
17ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {
18  DCHECK(!signin_error_controller_.get()) <<
19      "ProfileOAuth2TokenService::Initialize called but not "
20      "ProfileOAuth2TokenService::Shutdown";
21}
22
23void ProfileOAuth2TokenService::Initialize(SigninClient* client) {
24  DCHECK(client);
25  DCHECK(!client_);
26  client_ = client;
27
28  signin_error_controller_.reset(new SigninErrorController());
29}
30
31void ProfileOAuth2TokenService::Shutdown() {
32  DCHECK(client_) << "Shutdown() called without matching call to Initialize()";
33  signin_error_controller_.reset();
34}
35
36net::URLRequestContextGetter* ProfileOAuth2TokenService::GetRequestContext() {
37  return NULL;
38}
39
40void ProfileOAuth2TokenService::UpdateAuthError(
41    const std::string& account_id,
42    const GoogleServiceAuthError& error) {
43  NOTREACHED();
44}
45
46std::vector<std::string> ProfileOAuth2TokenService::GetAccounts() {
47  NOTREACHED();
48  return std::vector<std::string>();
49}
50
51void ProfileOAuth2TokenService::LoadCredentials(
52    const std::string& primary_account_id) {
53  // Empty implementation by default.
54}
55
56void ProfileOAuth2TokenService::UpdateCredentials(
57    const std::string& account_id,
58    const std::string& refresh_token) {
59  NOTREACHED();
60}
61
62void ProfileOAuth2TokenService::RevokeAllCredentials() {
63  // Empty implementation by default.
64}
65
66