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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/AutofillPaymentInstrument.java

Issue 2770193003: Implement request id in PaymentDetailsInit (Closed)
Patch Set: Rebase once more since mojom file moved 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
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 package org.chromium.chrome.browser.payments; 5 package org.chromium.chrome.browser.payments;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.text.TextUtils; 8 import android.text.TextUtils;
9 import android.util.JsonWriter; 9 import android.util.JsonWriter;
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 @Override 76 @Override
77 public Set<String> getInstrumentMethodNames() { 77 public Set<String> getInstrumentMethodNames() {
78 Set<String> result = new HashSet<>(); 78 Set<String> result = new HashSet<>();
79 result.add(mMethodName); 79 result.add(mMethodName);
80 return result; 80 return result;
81 } 81 }
82 82
83 @Override 83 @Override
84 public void invokePaymentApp(String unusedMerchantName, String unusedOrigin, 84 public void invokePaymentApp(String unusedRequestId, String unusedMerchantNa me,
85 String unusedIFrameOrigin, byte[][] unusedCertificateChain, 85 String unusedOrigin, String unusedIFrameOrigin, byte[][] unusedCerti ficateChain,
86 Map<String, PaymentMethodData> unusedMethodDataMap, PaymentItem unus edTotal, 86 Map<String, PaymentMethodData> unusedMethodDataMap, PaymentItem unus edTotal,
87 List<PaymentItem> unusedDisplayItems, 87 List<PaymentItem> unusedDisplayItems,
88 Map<String, PaymentDetailsModifier> unusedModifiers, 88 Map<String, PaymentDetailsModifier> unusedModifiers,
89 InstrumentDetailsCallback callback) { 89 InstrumentDetailsCallback callback) {
90 // The billing address should never be null for a credit card at this po int. 90 // The billing address should never be null for a credit card at this po int.
91 assert mBillingAddress != null; 91 assert mBillingAddress != null;
92 assert AutofillAddress.checkAddressCompletionStatus( 92 assert AutofillAddress.checkAddressCompletionStatus(
93 mBillingAddress, AutofillAddress.IGNORE_PHONE_COMPLETENESS_CHECK ) 93 mBillingAddress, AutofillAddress.IGNORE_PHONE_COMPLETENESS_CHECK )
94 == AutofillAddress.COMPLETE; 94 == AutofillAddress.COMPLETE;
95 assert mIsComplete; 95 assert mIsComplete;
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 341
342 int networkNameEndIndex = previewString.indexOf(" "); 342 int networkNameEndIndex = previewString.indexOf(" ");
343 if (networkNameEndIndex > 0) { 343 if (networkNameEndIndex > 0) {
344 // Only display card network name. 344 // Only display card network name.
345 previewString.delete(networkNameEndIndex, previewString.length()); 345 previewString.delete(networkNameEndIndex, previewString.length());
346 } 346 }
347 if (previewString.length() < maxLength) return previewString.toString(); 347 if (previewString.length() < maxLength) return previewString.toString();
348 return previewString.substring(0, maxLength / 2); 348 return previewString.substring(0, maxLength / 2);
349 } 349 }
350 } 350 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698