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

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

Issue 2054823002: PaymentRequest: complete() method should take PaymentComplete enum value. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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/payments/PaymentRequest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
index de2c800083870b1cb7267b49f6a50978e9329054..e1a1812f8fa41d1a0efc0f4bb4d151e5f5deb606 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
+++ b/third_party/WebKit/Source/modules/payments/PaymentRequest.cpp
@@ -318,13 +318,13 @@ ExecutionContext* PaymentRequest::getExecutionContext() const
return ContextLifecycleObserver::getExecutionContext();
}
-ScriptPromise PaymentRequest::complete(ScriptState* scriptState, bool success)
+ScriptPromise PaymentRequest::complete(ScriptState* scriptState, PaymentComplete result)
{
if (m_completeResolver)
return ScriptPromise::rejectWithDOMException(scriptState, DOMException::create(InvalidStateError, "Already called complete() once"));
// The payment provider should respond in PaymentRequest::OnComplete().
- m_paymentProvider->Complete(success);
+ m_paymentProvider->Complete(mojom::blink::PaymentComplete(result));
m_completeResolver = ScriptPromiseResolver::create(scriptState);
return m_completeResolver->promise();

Powered by Google App Engine
This is Rietveld 408576698