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

Side by Side Diff: third_party/WebKit/Source/modules/payments/PaymentRequest.cpp

Issue 2861823002: Create google.com/pay alias for Android Pay PaymentRequest (Closed)
Patch Set: Create google.com/pay alias for Android Pay PaymentRequest Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/payments/PaymentRequest.h" 5 #include "modules/payments/PaymentRequest.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 #include "bindings/core/v8/ExceptionState.h" 9 #include "bindings/core/v8/ExceptionState.h"
10 #include "bindings/core/v8/ScriptPromiseResolver.h" 10 #include "bindings/core/v8/ScriptPromiseResolver.h"
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
410 "Unable to parse payment method specific data"); 410 "Unable to parse payment method specific data");
411 return; 411 return;
412 } 412 }
413 413
414 output->stringified_data = 414 output->stringified_data =
415 V8StringToWebCoreString<String>(value, kDoNotExternalize); 415 V8StringToWebCoreString<String>(value, kDoNotExternalize);
416 416
417 // Serialize payment method specific data to be sent to the payment apps. The 417 // Serialize payment method specific data to be sent to the payment apps. The
418 // payment apps are responsible for validating and processing their method 418 // payment apps are responsible for validating and processing their method
419 // data asynchronously. Do not throw exceptions here. 419 // data asynchronously. Do not throw exceptions here.
420 if (supported_methods.Contains("https://android.com/pay")) { 420 if (supported_methods.Contains("https://android.com/pay") ||
421 supported_methods.Contains("https://google.com/pay")) {
421 SetAndroidPayMethodData(input, output, exception_state); 422 SetAndroidPayMethodData(input, output, exception_state);
422 if (exception_state.HadException()) 423 if (exception_state.HadException())
423 exception_state.ClearException(); 424 exception_state.ClearException();
424 } 425 }
425 if (RuntimeEnabledFeatures::paymentRequestBasicCardEnabled() && 426 if (RuntimeEnabledFeatures::paymentRequestBasicCardEnabled() &&
426 supported_methods.Contains("basic-card")) { 427 supported_methods.Contains("basic-card")) {
427 SetBasicCardMethodData(input, output, execution_context, exception_state); 428 SetBasicCardMethodData(input, output, execution_context, exception_state);
428 if (exception_state.HadException()) 429 if (exception_state.HadException())
429 exception_state.ClearException(); 430 exception_state.ClearException();
430 } 431 }
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 complete_resolver_.Clear(); 1089 complete_resolver_.Clear();
1089 show_resolver_.Clear(); 1090 show_resolver_.Clear();
1090 abort_resolver_.Clear(); 1091 abort_resolver_.Clear();
1091 can_make_payment_resolver_.Clear(); 1092 can_make_payment_resolver_.Clear();
1092 if (client_binding_.is_bound()) 1093 if (client_binding_.is_bound())
1093 client_binding_.Close(); 1094 client_binding_.Close();
1094 payment_provider_.reset(); 1095 payment_provider_.reset();
1095 } 1096 }
1096 1097
1097 } // namespace blink 1098 } // namespace blink
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/payments/PaymentRequestImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698