Chromium Code Reviews| Index: components/payments/content/payment_request.cc |
| diff --git a/components/payments/content/payment_request.cc b/components/payments/content/payment_request.cc |
| index 68da7ff714a86963414c53c99fe4d04bb5fcbb54..3b6141bdc4d49740f042a6e6cc37fa6dc561bac4 100644 |
| --- a/components/payments/content/payment_request.cc |
| +++ b/components/payments/content/payment_request.cc |
| @@ -99,6 +99,16 @@ void PaymentRequest::Show() { |
| return; |
| } |
| + // A tab can display only one PaymentRequest UI at a time. |
| + if (!manager_->CanShow(this)) { |
| + LOG(ERROR) << "A PaymentRequest UI is already showing"; |
| + client_->OnError(mojom::PaymentErrorReason::USER_CANCEL); |
| + client_.reset(); |
|
Mathieu
2017/05/08 13:01:42
I'm curious why not OnConnectionTerminated here? I
please use gerrit instead
2017/05/08 13:12:35
Done.
|
| + binding_.Close(); |
| + manager_->DestroyRequest(this); |
| + return; |
| + } |
| + |
| if (!state_->AreRequestedMethodsSupported()) { |
| client_->OnError(mojom::PaymentErrorReason::NOT_SUPPORTED); |
| if (observer_for_testing_) |