Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(257)

Side by Side Diff: components/signin/core/browser/fake_signin_manager.h

Issue 1984733002: [Reland] GetAccountIdFromProfile() should not return an empty account id if a valid profile is prov… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/signin/core/browser/fake_signin_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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. 20 // Overrides InitTokenService to do-nothing in tests.
21 class FakeSigninManagerBase : public SigninManagerBase { 21 class FakeSigninManagerBase : public SigninManagerBase {
22 public: 22 public:
23 FakeSigninManagerBase(SigninClient* client, 23 FakeSigninManagerBase(SigninClient* client,
24 AccountTrackerService* account_tracker_service); 24 AccountTrackerService* account_tracker_service);
25 ~FakeSigninManagerBase() override; 25 ~FakeSigninManagerBase() override;
26
27 void SignIn(const std::string& account_id);
26 }; 28 };
27 29
28 #if !defined(OS_CHROMEOS) 30 #if !defined(OS_CHROMEOS)
29 31
30 // A signin manager that bypasses actual authentication routines with servers 32 // A signin manager that bypasses actual authentication routines with servers
31 // and accepts the credentials provided to StartSignIn. 33 // and accepts the credentials provided to StartSignIn.
32 class FakeSigninManager : public SigninManager { 34 class FakeSigninManager : public SigninManager {
33 public: 35 public:
34 FakeSigninManager(SigninClient* client, 36 FakeSigninManager(SigninClient* client,
35 ProfileOAuth2TokenService* token_service, 37 ProfileOAuth2TokenService* token_service,
(...skipping 27 matching lines...) Expand all
63 65
64 void CompletePendingSignin() override; 66 void CompletePendingSignin() override;
65 67
66 // Username specified in StartSignInWithRefreshToken() call. 68 // Username specified in StartSignInWithRefreshToken() call.
67 std::string username_; 69 std::string username_;
68 }; 70 };
69 71
70 #endif // !defined (OS_CHROMEOS) 72 #endif // !defined (OS_CHROMEOS)
71 73
72 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_ 74 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_FAKE_SIGNIN_MANAGER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/signin/core/browser/fake_signin_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698