summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc')
-rw-r--r--chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc b/chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc
index a2baf10f47b..92e86937a7d 100644
--- a/chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc
+++ b/chromium/third_party/blink/renderer/modules/payments/payment_request_update_event.cc
@@ -6,13 +6,12 @@
#include "base/location.h"
#include "third_party/blink/public/platform/task_type.h"
-#include "third_party/blink/renderer/bindings/core/v8/exception_state.h"
#include "third_party/blink/renderer/bindings/core/v8/script_function.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
-#include "third_party/blink/renderer/core/dom/exception_code.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/modules/payments/payment_updater.h"
+#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
@@ -20,7 +19,7 @@ namespace {
// Reject the payment request if the page does not resolve the promise from
// updateWith within 60 seconds.
-static const int kAbortTimeout = 60;
+constexpr TimeDelta kAbortTimeout = TimeDelta::FromSeconds(60);
class UpdatePaymentDetailsFunction : public ScriptFunction {
public:
@@ -104,7 +103,7 @@ void PaymentRequestUpdateEvent::updateWith(ScriptState* script_state,
ExceptionState& exception_state) {
if (!isTrusted()) {
exception_state.ThrowDOMException(
- kInvalidStateError,
+ DOMExceptionCode::kInvalidStateError,
"Cannot update details when the event is not trusted");
return;
}
@@ -113,7 +112,7 @@ void PaymentRequestUpdateEvent::updateWith(ScriptState* script_state,
return;
if (wait_for_update_) {
- exception_state.ThrowDOMException(kInvalidStateError,
+ exception_state.ThrowDOMException(DOMExceptionCode::kInvalidStateError,
"Cannot update details twice");
return;
}