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 "google_apis/drive/dummy_auth_service.h" 6 7 namespace google_apis { 8 DummyAuthService()9DummyAuthService::DummyAuthService() { 10 set_access_token("dummy"); 11 set_refresh_token("dummy"); 12 } 13 AddObserver(AuthServiceObserver * observer)14void DummyAuthService::AddObserver(AuthServiceObserver* observer) { 15 } 16 RemoveObserver(AuthServiceObserver * observer)17void DummyAuthService::RemoveObserver(AuthServiceObserver* observer) { 18 } 19 StartAuthentication(const AuthStatusCallback & callback)20void DummyAuthService::StartAuthentication(const AuthStatusCallback& callback) { 21 } 22 HasAccessToken() const23bool DummyAuthService::HasAccessToken() const { 24 return !access_token_.empty(); 25 } 26 HasRefreshToken() const27bool DummyAuthService::HasRefreshToken() const { 28 return !refresh_token_.empty(); 29 } 30 access_token() const31const std::string& DummyAuthService::access_token() const { 32 return access_token_; 33 } 34 ClearAccessToken()35void DummyAuthService::ClearAccessToken() { 36 access_token_.clear(); 37 } 38 ClearRefreshToken()39void DummyAuthService::ClearRefreshToken() { 40 refresh_token_.clear(); 41 } 42 43 } // namespace google_apis 44