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

Unified Diff: third_party/WebKit/Source/modules/webauth/WebAuthentication.h

Issue 2966523002: Blink-layer update to match WebAuthN spec (Closed)
Patch Set: Modify browser-side impl and unittests. Address mkwst comments. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webauth/WebAuthentication.h
diff --git a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h
index 0c0c2b3d6c85c69db7d8c5fe1f71f25150ec14c6..0a5b08826c6fffd110ba7d614270295069df97d4 100644
--- a/third_party/WebKit/Source/modules/webauth/WebAuthentication.h
+++ b/third_party/WebKit/Source/modules/webauth/WebAuthentication.h
@@ -9,18 +9,16 @@
#include "bindings/core/v8/ScriptPromise.h"
engedy 2017/07/05 18:51:08 nit: I think the complete type is not needed in th
kpaulhamus 2017/07/12 21:21:48 Done.
#include "core/dom/ContextLifecycleObserver.h"
#include "core/dom/DOMArrayBuffer.h"
engedy 2017/07/05 18:51:08 nit: No longer used in the header, move to .cpp.
kpaulhamus 2017/07/12 21:21:48 Done.
-#include "modules/webauth/AuthenticationAssertionOptions.h"
-#include "modules/webauth/ScopedCredentialInfo.h"
+#include "modules/webauth/MakeCredentialOptions.h"
engedy 2017/07/05 18:51:08 nit: Fwd-declaration suffices in the header, move
kpaulhamus 2017/07/12 21:21:48 Done.
#include "platform/bindings/ScriptWrappable.h"
#include "public/platform/modules/webauth/authenticator.mojom-blink.h"
namespace blink {
-class RelyingPartyAccount;
-class AuthenticationAssertionOptions;
-class ScopedCredentialOptions;
-class ScopedCredentialParameters;
-class ScriptPromiseResolver;
+class LocalFrame;
+class MakeCredentialOptions;
+class PublicKeyCredentialRequestOptions;
+class ScriptState;
typedef ArrayBufferOrArrayBufferView BufferSource;
engedy 2017/07/05 18:51:08 nit: No longer used in the header, move to .cpp.
kpaulhamus 2017/07/12 21:21:48 Done.
@@ -39,35 +37,28 @@ class WebAuthentication final
virtual ~WebAuthentication();
// WebAuthentication.idl
- ScriptPromise makeCredential(ScriptState*,
- const RelyingPartyAccount&,
- const HeapVector<ScopedCredentialParameters>,
- const BufferSource&,
- ScopedCredentialOptions&);
+ ScriptPromise makeCredential(ScriptState*, MakeCredentialOptions&);
engedy 2017/07/05 18:51:08 nit: Can the second argument be const too here?
kpaulhamus 2017/07/12 21:21:49 Done.
+
ScriptPromise getAssertion(ScriptState*,
- const BufferSource&,
- const AuthenticationAssertionOptions&);
+ const PublicKeyCredentialRequestOptions&);
webauth::mojom::blink::Authenticator* Authenticator() const {
return authenticator_.get();
}
- // ContextLifecycleObserver overrides.
- void ContextDestroyed(ExecutionContext*) override;
-
- DECLARE_VIRTUAL_TRACE();
-
- private:
- explicit WebAuthentication(LocalFrame&);
-
void OnMakeCredential(ScriptPromiseResolver*,
engedy 2017/07/05 18:51:08 nit: Need fwd-declaration for class ScriptPromiseR
engedy 2017/07/05 18:51:08 nit: Do these need to be public?
kpaulhamus 2017/07/12 21:21:48 Done.
kpaulhamus 2017/07/12 21:21:48 Done.
webauth::mojom::blink::AuthenticatorStatus,
- webauth::mojom::blink::ScopedCredentialInfoPtr);
+ webauth::mojom::blink::PublicKeyCredentialInfoPtr);
ScriptPromise RejectIfNotSupported(ScriptState*);
void OnAuthenticatorConnectionError();
bool MarkRequestComplete(ScriptPromiseResolver*);
void Cleanup();
+ DECLARE_VIRTUAL_TRACE();
+
+ private:
+ explicit WebAuthentication(LocalFrame&);
+
webauth::mojom::blink::AuthenticatorPtr authenticator_;
HeapHashSet<Member<ScriptPromiseResolver>> authenticator_requests_;
};

Powered by Google App Engine
This is Rietveld 408576698