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.text.TextUtils; | 7 import android.text.TextUtils; |
8 import android.util.JsonWriter; | 8 import android.util.JsonWriter; |
9 | 9 |
10 import org.chromium.chrome.browser.autofill.PersonalDataManager; | 10 import org.chromium.chrome.browser.autofill.PersonalDataManager; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 public void completeInstrument(CreditCard card, AutofillProfile billingAddre
ss) { | 153 public void completeInstrument(CreditCard card, AutofillProfile billingAddre
ss) { |
154 assert card != null; | 154 assert card != null; |
155 assert billingAddress != null; | 155 assert billingAddress != null; |
156 assert card.getBillingAddressId() != null; | 156 assert card.getBillingAddressId() != null; |
157 assert card.getBillingAddressId().equals(billingAddress.getGUID()); | 157 assert card.getBillingAddressId().equals(billingAddress.getGUID()); |
158 | 158 |
159 mCard = card; | 159 mCard = card; |
160 mBillingAddress = billingAddress; | 160 mBillingAddress = billingAddress; |
161 mIsComplete = true; | 161 mIsComplete = true; |
162 updateIdentifierLabelsAndIcon(card.getGUID(), card.getObfuscatedNumber()
, card.getName(), | 162 updateIdentifierLabelsAndIcon(card.getGUID(), card.getObfuscatedNumber()
, card.getName(), |
163 null, card.getIssuerIconDrawableId()); | 163 card.getIssuerIconDrawableId()); |
164 } | 164 } |
165 | 165 |
166 /** @return The credit card represented by this payment instrument. */ | 166 /** @return The credit card represented by this payment instrument. */ |
167 public CreditCard getCard() { | 167 public CreditCard getCard() { |
168 return mCard; | 168 return mCard; |
169 } | 169 } |
170 } | 170 } |
OLD | NEW |