Fix infinite recursion on hiding panel when created during fullscreen mode.
[chromium-blink-merge.git] / components / signin / core / browser / profile_oauth2_token_service.cc
blob757d96e812785ff40e1f60ce09d540e8ce8a1c8d
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 #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"
14 ProfileOAuth2TokenService::ProfileOAuth2TokenService()
15 : client_(NULL) {}
17 ProfileOAuth2TokenService::~ProfileOAuth2TokenService() {
18 DCHECK(!signin_error_controller_.get()) <<
19 "ProfileOAuth2TokenService::Initialize called but not "
20 "ProfileOAuth2TokenService::Shutdown";
23 void ProfileOAuth2TokenService::Initialize(SigninClient* client) {
24 DCHECK(client);
25 DCHECK(!client_);
26 client_ = 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() {
37 return NULL;
40 void ProfileOAuth2TokenService::UpdateAuthError(
41 const std::string& account_id,
42 const GoogleServiceAuthError& error) {
43 NOTREACHED();
46 std::vector<std::string> ProfileOAuth2TokenService::GetAccounts() {
47 NOTREACHED();
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) {
59 NOTREACHED();
62 void ProfileOAuth2TokenService::RevokeAllCredentials() {
63 // Empty implementation by default.