Commit 4e99609d authored by Colin Blundell's avatar Colin Blundell Committed by Commit Bot

IdentityManager: Enforce that FakePO2TS uses fake delegate

We are in the process of clarifying the use cases and usage model of
FakeProfileOAuth2TokenService within the IdentityManager test
infrastructure. This CL eliminates the FakePO2TS constructor that takes
in a ProfileOAuth2TokenServiceDelegate, leaving only the one that
internally creates a FakePO2TSDelegate. It turns out that there is no
longer any usage of the constructor being eliminated here.

Bug: 982751
Change-Id: If3dec3754887a62ef9564e50b64f0d8192907723
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819313Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699258}
parent 418b512a
......@@ -10,14 +10,9 @@
FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService(
PrefService* user_prefs)
: FakeProfileOAuth2TokenService(
: ProfileOAuth2TokenService(
user_prefs,
std::make_unique<FakeProfileOAuth2TokenServiceDelegate>()) {}
FakeProfileOAuth2TokenService::FakeProfileOAuth2TokenService(
PrefService* user_prefs,
std::unique_ptr<ProfileOAuth2TokenServiceDelegate> delegate)
: ProfileOAuth2TokenService(user_prefs, std::move(delegate)) {
std::make_unique<FakeProfileOAuth2TokenServiceDelegate>()) {
OverrideAccessTokenManagerForTesting(
std::make_unique<FakeOAuth2AccessTokenManager>(
this /* OAuth2AccessTokenManager::Delegate* */));
......
......@@ -36,9 +36,6 @@
class FakeProfileOAuth2TokenService : public ProfileOAuth2TokenService {
public:
explicit FakeProfileOAuth2TokenService(PrefService* user_prefs);
FakeProfileOAuth2TokenService(
PrefService* user_prefs,
std::unique_ptr<ProfileOAuth2TokenServiceDelegate> delegate);
~FakeProfileOAuth2TokenService() override;
// Gets a list of active requests (can be used by tests to validate that the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment