| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ |
| 6 #define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ | 6 #define CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "chrome/browser/signin/signin_manager.h" | 11 #include "chrome/browser/signin/signin_manager.h" |
| 12 | 12 |
| 13 class Profile; | 13 class Profile; |
| 14 class ProfileKeyedService; | 14 class ProfileKeyedService; |
| 15 | 15 |
| 16 // Overrides InitTokenService to do-nothing in tests. |
| 16 class FakeSigninManagerBase : public SigninManagerBase { | 17 class FakeSigninManagerBase : public SigninManagerBase { |
| 17 public: | 18 public: |
| 18 explicit FakeSigninManagerBase(Profile* profile); | 19 explicit FakeSigninManagerBase(); |
| 19 virtual ~FakeSigninManagerBase(); | 20 virtual ~FakeSigninManagerBase(); |
| 20 | 21 |
| 21 virtual void SignOut() OVERRIDE; | 22 virtual void InitTokenService() OVERRIDE; |
| 22 | 23 |
| 23 // Helper function to be used with ProfileKeyedService::SetTestingFactory(). | 24 // Helper function to be used with ProfileKeyedService::SetTestingFactory(). |
| 24 static ProfileKeyedService* Build(content::BrowserContext* profile); | 25 static ProfileKeyedService* Build(content::BrowserContext* profile); |
| 25 }; | 26 }; |
| 26 | 27 |
| 27 #if !defined(OS_CHROMEOS) | 28 #if !defined(OS_CHROMEOS) |
| 28 | 29 |
| 29 // A signin manager that bypasses actual authentication routines with servers | 30 // A signin manager that bypasses actual authentication routines with servers |
| 30 // and accepts the credentials provided to StartSignIn. | 31 // and accepts the credentials provided to StartSignIn. |
| 31 class FakeSigninManager : public SigninManager { | 32 class FakeSigninManager : public SigninManager { |
| (...skipping 20 matching lines...) Expand all Loading... |
| 52 | 53 |
| 53 virtual void CompletePendingSignin() OVERRIDE; | 54 virtual void CompletePendingSignin() OVERRIDE; |
| 54 | 55 |
| 55 // Helper function to be used with ProfileKeyedService::SetTestingFactory(). | 56 // Helper function to be used with ProfileKeyedService::SetTestingFactory(). |
| 56 static ProfileKeyedService* Build(content::BrowserContext* profile); | 57 static ProfileKeyedService* Build(content::BrowserContext* profile); |
| 57 }; | 58 }; |
| 58 | 59 |
| 59 #endif // !defined (OS_CHROMEOS) | 60 #endif // !defined (OS_CHROMEOS) |
| 60 | 61 |
| 61 #endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ | 62 #endif // CHROME_BROWSER_SIGNIN_FAKE_SIGNIN_MANAGER_H_ |
| OLD | NEW |