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 "google_apis/gaia/fake_identity_provider.h"
7 #include "google_apis/gaia/oauth2_token_service.h"
9 FakeIdentityProvider::FakeIdentityProvider(OAuth2TokenService
* token_service
)
10 : token_service_(token_service
) {
13 FakeIdentityProvider::~FakeIdentityProvider() {
16 void FakeIdentityProvider::LogIn(const std::string
& account_id
) {
17 account_id_
= account_id
;
18 FireOnActiveAccountLogin();
21 void FakeIdentityProvider::LogOut() {
23 FireOnActiveAccountLogout();
26 std::string
FakeIdentityProvider::GetActiveUsername() {
30 std::string
FakeIdentityProvider::GetActiveAccountId() {
34 OAuth2TokenService
* FakeIdentityProvider::GetTokenService() {
35 return token_service_
;
38 bool FakeIdentityProvider::RequestLogin() {