Commit b6ad4da4 authored by Callum May's avatar Callum May Committed by Commit Bot

Remove unused testing hooks in WinWebAuthnApi

This is a follow up to https://crrev.com/c/1789751 that removes the unused testing hooks for the fake WinWebAuthnApi since the fake is now injected via the FidoDiscoveryFactory

Change-Id: Iadfc043d0836e7640e75981c4d49e59c2d079c5a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1815880
Commit-Queue: Martin Kreichgauer <martinkr@google.com>
Reviewed-by: default avatarMartin Kreichgauer <martinkr@google.com>
Cr-Commit-Position: refs/heads/master@{#698780}
parent 90c6c958
......@@ -162,30 +162,12 @@ class WinWebAuthnApiImpl : public WinWebAuthnApi {
decltype(&WebAuthNGetApiVersionNumber) get_api_version_number_ = nullptr;
};
static WinWebAuthnApi* kDefaultForTesting = nullptr;
// static
WinWebAuthnApi* WinWebAuthnApi::GetDefault() {
if (kDefaultForTesting) {
return kDefaultForTesting;
}
static base::NoDestructor<WinWebAuthnApiImpl> api;
return api.get();
}
// static
void WinWebAuthnApi::SetDefaultForTesting(WinWebAuthnApi* api) {
DCHECK(!kDefaultForTesting);
kDefaultForTesting = api;
}
// static
void WinWebAuthnApi::ClearDefaultForTesting() {
DCHECK(kDefaultForTesting);
kDefaultForTesting = nullptr;
}
WinWebAuthnApi::WinWebAuthnApi() = default;
WinWebAuthnApi::~WinWebAuthnApi() = default;
......
......@@ -70,11 +70,6 @@ class COMPONENT_EXPORT(DEVICE_FIDO) WinWebAuthnApi {
protected:
WinWebAuthnApi();
private:
friend class ScopedFakeWinWebAuthnApi;
static void SetDefaultForTesting(WinWebAuthnApi* api);
static void ClearDefaultForTesting();
};
std::pair<CtapDeviceResponseCode,
......
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