Home | History | Annotate | Download | only in google_apis
      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 #ifndef CHROME_BROWSER_GOOGLE_APIS_DUMMY_AUTH_SERVICE_H_
      6 #define CHROME_BROWSER_GOOGLE_APIS_DUMMY_AUTH_SERVICE_H_
      7 
      8 #include "base/compiler_specific.h"
      9 #include "chrome/browser/google_apis/auth_service_interface.h"
     10 
     11 namespace google_apis {
     12 
     13 // Dummy implementation of AuthServiceInterface that always return a dummy
     14 // access token.
     15 class DummyAuthService : public AuthServiceInterface {
     16  public:
     17   DummyAuthService();
     18 
     19   // AuthServiceInterface overrides.
     20   virtual void AddObserver(AuthServiceObserver* observer) OVERRIDE;
     21   virtual void RemoveObserver(AuthServiceObserver* observer) OVERRIDE;
     22   virtual void StartAuthentication(const AuthStatusCallback& callback) OVERRIDE;
     23   virtual bool HasAccessToken() const OVERRIDE;
     24   virtual bool HasRefreshToken() const OVERRIDE;
     25   virtual const std::string& access_token() const OVERRIDE;
     26   virtual void ClearAccessToken() OVERRIDE;
     27   virtual void ClearRefreshToken() OVERRIDE;
     28 
     29  private:
     30   const std::string dummy_token;
     31 };
     32 
     33 }  // namespace google_apis
     34 
     35 #endif  // CHROME_BROWSER_GOOGLE_APIS_DUMMY_AUTH_SERVICE_H_
     36