summaryrefslogtreecommitdiff
path: root/chromium/google_apis/drive/dummy_auth_service.cc
blob: e1b6891f969674523439e7ea918a37642de0c12a (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
41
42
43
// Copyright 2013 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/drive/dummy_auth_service.h"

namespace google_apis {

DummyAuthService::DummyAuthService() {
  set_access_token("dummy");
  set_refresh_token("dummy");
}

void DummyAuthService::AddObserver(AuthServiceObserver* observer) {
}

void DummyAuthService::RemoveObserver(AuthServiceObserver* observer) {
}

void DummyAuthService::StartAuthentication(const AuthStatusCallback& callback) {
}

bool DummyAuthService::HasAccessToken() const {
  return !access_token_.empty();
}

bool DummyAuthService::HasRefreshToken() const {
  return !refresh_token_.empty();
}

const std::string& DummyAuthService::access_token() const {
  return access_token_;
}

void DummyAuthService::ClearAccessToken() {
  access_token_.clear();
}

void DummyAuthService::ClearRefreshToken() {
  refresh_token_.clear();
}

}  // namespace google_apis