| OLD | NEW |
| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 unusedMerchantName, String unusedOrigin, |
| 85 byte[][] unusedCertificateChain, Map<String, PaymentMethodData> unus
edMethodDataMap, | 85 String unusedIFrameOrigin, byte[][] unusedCertificateChain, |
| 86 PaymentItem unusedTotal, List<PaymentItem> unusedDisplayItems, | 86 Map<String, PaymentMethodData> unusedMethodDataMap, PaymentItem unus
edTotal, |
| 87 List<PaymentItem> unusedDisplayItems, |
| 87 Map<String, PaymentDetailsModifier> unusedModifiers, | 88 Map<String, PaymentDetailsModifier> unusedModifiers, |
| 88 InstrumentDetailsCallback callback) { | 89 InstrumentDetailsCallback callback) { |
| 89 // 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. |
| 90 assert mBillingAddress != null; | 91 assert mBillingAddress != null; |
| 91 assert AutofillAddress.checkAddressCompletionStatus( | 92 assert AutofillAddress.checkAddressCompletionStatus( |
| 92 mBillingAddress, AutofillAddress.IGNORE_PHONE_COMPLETENESS_CHECK
) | 93 mBillingAddress, AutofillAddress.IGNORE_PHONE_COMPLETENESS_CHECK
) |
| 93 == AutofillAddress.COMPLETE; | 94 == AutofillAddress.COMPLETE; |
| 94 assert mIsComplete; | 95 assert mIsComplete; |
| 95 assert mHasValidNumberAndName; | 96 assert mHasValidNumberAndName; |
| 96 assert mCallback == null; | 97 assert mCallback == null; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 /** @return The credit card represented by this payment instrument. */ | 327 /** @return The credit card represented by this payment instrument. */ |
| 327 public CreditCard getCard() { | 328 public CreditCard getCard() { |
| 328 return mCard; | 329 return mCard; |
| 329 } | 330 } |
| 330 | 331 |
| 331 /** @return The billing address associated with this credit card. */ | 332 /** @return The billing address associated with this credit card. */ |
| 332 public AutofillProfile getBillingAddress() { | 333 public AutofillProfile getBillingAddress() { |
| 333 return mBillingAddress; | 334 return mBillingAddress; |
| 334 } | 335 } |
| 335 } | 336 } |
| OLD | NEW |