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 COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ |
6 #define COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "components/signin/core/browser/signin_manager.h" | 13 #include "components/signin/core/browser/signin_manager.h" |
14 #include "components/signin/core/browser/signin_metrics.h" | 14 #include "components/signin/core/browser/signin_metrics.h" |
15 | 15 |
16 // SigninManager to use for testing. Tests should use the type | 16 // SigninManager to use for testing. Tests should use the type |
17 // SigninManagerForTesting to ensure that the right type for their platform is | 17 // SigninManagerForTesting to ensure that the right type for their platform is |
18 // used. | 18 // used. |
19 | 19 |
20 // Overrides InitTokenService to do-nothing in tests. | |
21 class FakeSigninManagerBase : public SigninManagerBase { | 20 class FakeSigninManagerBase : public SigninManagerBase { |
22 public: | 21 public: |
23 FakeSigninManagerBase(SigninClient* client, | 22 FakeSigninManagerBase(SigninClient* client, |
24 AccountTrackerService* account_tracker_service); | 23 AccountTrackerService* account_tracker_service); |
25 ~FakeSigninManagerBase() override; | 24 ~FakeSigninManagerBase() override; |
26 | 25 |
27 void SignIn(const std::string& account_id); | 26 void SignIn(const std::string& account_id); |
28 }; | 27 }; |
29 | 28 |
30 #if !defined(OS_CHROMEOS) | 29 #if !defined(OS_CHROMEOS) |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 64 |
66 void CompletePendingSignin() override; | 65 void CompletePendingSignin() override; |
67 | 66 |
68 // Username specified in StartSignInWithRefreshToken() call. | 67 // Username specified in StartSignInWithRefreshToken() call. |
69 std::string username_; | 68 std::string username_; |
70 }; | 69 }; |
71 | 70 |
72 #endif // !defined (OS_CHROMEOS) | 71 #endif // !defined (OS_CHROMEOS) |
73 | 72 |
74 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ | 73 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ |
OLD | NEW |