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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp

Issue 2858773002: Revert of PaymentHandler: Implement PaymentInstruments.keys(). (Closed)
Patch Set: Created 3 years, 8 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/payments/PaymentInstruments.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp b/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
index 746145fa308068cbf8cc372bbb85aaf110dcf8e8..829a852b2c9f100a3642c7bbcf2f0f4106675b28 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentInstruments.cpp
@@ -89,20 +89,9 @@
return promise;
}
-ScriptPromise PaymentInstruments::keys(ScriptState* script_state) {
- if (!manager_.is_bound()) {
- return ScriptPromise::RejectWithDOMException(
- script_state,
- DOMException::Create(kInvalidStateError, kPaymentManagerUnavailable));
- }
-
- ScriptPromiseResolver* resolver = ScriptPromiseResolver::Create(script_state);
- ScriptPromise promise = resolver->Promise();
-
- manager_->KeysOfPaymentInstruments(ConvertToBaseCallback(
- WTF::Bind(&PaymentInstruments::onKeysOfPaymentInstruments,
- WrapPersistent(this), WrapPersistent(resolver))));
- return promise;
+ScriptPromise PaymentInstruments::keys() {
+ NOTIMPLEMENTED();
+ return ScriptPromise();
}
ScriptPromise PaymentInstruments::has(ScriptState* script_state,
@@ -208,16 +197,6 @@
resolver->Resolve(instrument);
}
-void PaymentInstruments::onKeysOfPaymentInstruments(
- ScriptPromiseResolver* resolver,
- const Vector<String>& keys,
- payments::mojom::blink::PaymentHandlerStatus status) {
- DCHECK(resolver);
- if (rejectError(resolver, status))
- return;
- resolver->Resolve(keys);
-}
-
void PaymentInstruments::onHasPaymentInstrument(
ScriptPromiseResolver* resolver,
payments::mojom::blink::PaymentHandlerStatus status) {

Powered by Google App Engine
This is Rietveld 408576698