blob: 7360e41bc1d1a3e90ab044fae9327416d561cc24 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "google_apis/gaia/fake_identity_provider.h"
#include "google_apis/gaia/oauth2_token_service.h"
FakeIdentityProvider::FakeIdentityProvider(OAuth2TokenService* token_service)
: token_service_(token_service) {
}
FakeIdentityProvider::~FakeIdentityProvider() {
}
void FakeIdentityProvider::LogIn(const std::string& account_id) {
account_id_ = account_id;
FireOnActiveAccountLogin();
}
void FakeIdentityProvider::LogOut() {
account_id_.clear();
FireOnActiveAccountLogout();
}
std::string FakeIdentityProvider::GetActiveUsername() {
return account_id_;
}
std::string FakeIdentityProvider::GetActiveAccountId() {
return account_id_;
}
OAuth2TokenService* FakeIdentityProvider::GetTokenService() {
return token_service_;
}
bool FakeIdentityProvider::RequestLogin() {
return false;
}
|