[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 1 | // Copyright 2013 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 "chrome/browser/google_apis/dummy_auth_service.h" | ||||
6 | |||||
7 | namespace google_apis { | ||||
8 | |||||
[email protected] | fedaeae | 2013-10-11 08:35:54 | [diff] [blame^] | 9 | DummyAuthService::DummyAuthService() { |
10 | set_access_token("dummy"); | ||||
11 | set_refresh_token("dummy"); | ||||
[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 12 | } |
13 | |||||
14 | void DummyAuthService::AddObserver(AuthServiceObserver* observer) { | ||||
15 | } | ||||
16 | |||||
17 | void DummyAuthService::RemoveObserver(AuthServiceObserver* observer) { | ||||
18 | } | ||||
19 | |||||
20 | void DummyAuthService::StartAuthentication(const AuthStatusCallback& callback) { | ||||
21 | } | ||||
22 | |||||
23 | bool DummyAuthService::HasAccessToken() const { | ||||
[email protected] | fedaeae | 2013-10-11 08:35:54 | [diff] [blame^] | 24 | return !access_token_.empty(); |
[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 25 | } |
26 | |||||
27 | bool DummyAuthService::HasRefreshToken() const { | ||||
[email protected] | fedaeae | 2013-10-11 08:35:54 | [diff] [blame^] | 28 | return !refresh_token_.empty(); |
[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 29 | } |
30 | |||||
31 | const std::string& DummyAuthService::access_token() const { | ||||
[email protected] | fedaeae | 2013-10-11 08:35:54 | [diff] [blame^] | 32 | return access_token_; |
[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 33 | } |
34 | |||||
35 | void DummyAuthService::ClearAccessToken() { | ||||
[email protected] | fedaeae | 2013-10-11 08:35:54 | [diff] [blame^] | 36 | access_token_.clear(); |
[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 37 | } |
38 | |||||
39 | void DummyAuthService::ClearRefreshToken() { | ||||
[email protected] | fedaeae | 2013-10-11 08:35:54 | [diff] [blame^] | 40 | refresh_token_.clear(); |
[email protected] | 7292162 | 2013-07-17 17:22:48 | [diff] [blame] | 41 | } |
42 | |||||
43 | } // namespace google_apis |