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

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

Issue 2652763007: Send site certificate chain to android payment app (Closed)
Patch Set: Probable fix Created 3 years, 11 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.os.Handler; 8 import android.os.Handler;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 10
(...skipping 28 matching lines...) Expand all
39 * @param context The context. 39 * @param context The context.
40 * @param webContents The web contents where PaymentRequest was invoked. 40 * @param webContents The web contents where PaymentRequest was invoked.
41 */ 41 */
42 public AutofillPaymentApp(Context context, WebContents webContents) { 42 public AutofillPaymentApp(Context context, WebContents webContents) {
43 mContext = context; 43 mContext = context;
44 mWebContents = webContents; 44 mWebContents = webContents;
45 } 45 }
46 46
47 @Override 47 @Override
48 public void getInstruments(Map<String, PaymentMethodData> methodDataMap, Str ing unusedOrigin, 48 public void getInstruments(Map<String, PaymentMethodData> methodDataMap, Str ing unusedOrigin,
49 final InstrumentsCallback callback) { 49 byte[][] unusedCertificateChain, final InstrumentsCallback callback) {
50 PersonalDataManager pdm = PersonalDataManager.getInstance(); 50 PersonalDataManager pdm = PersonalDataManager.getInstance();
51 List<CreditCard> cards = pdm.getCreditCardsToSuggest(); 51 List<CreditCard> cards = pdm.getCreditCardsToSuggest();
52 final List<PaymentInstrument> instruments = new ArrayList<>(cards.size() ); 52 final List<PaymentInstrument> instruments = new ArrayList<>(cards.size() );
53 53
54 Set<String> basicCardSupportedNetworks = 54 Set<String> basicCardSupportedNetworks =
55 convertBasicCardToNetworks(methodDataMap.get(BASIC_CARD_METHOD_N AME)); 55 convertBasicCardToNetworks(methodDataMap.get(BASIC_CARD_METHOD_N AME));
56 56
57 for (int i = 0; i < cards.size(); i++) { 57 for (int i = 0; i < cards.size(); i++) {
58 CreditCard card = cards.get(i); 58 CreditCard card = cards.get(i);
59 AutofillProfile billingAddress = TextUtils.isEmpty(card.getBillingAd dressId()) 59 AutofillProfile billingAddress = TextUtils.isEmpty(card.getBillingAd dressId())
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 Set<String> methodNames = new HashSet<>(methodDataMap.keySet()); 162 Set<String> methodNames = new HashSet<>(methodDataMap.keySet());
163 methodNames.retainAll(getNetworks().values()); 163 methodNames.retainAll(getNetworks().values());
164 return !methodNames.isEmpty(); 164 return !methodNames.isEmpty();
165 } 165 }
166 166
167 @Override 167 @Override
168 public String getAppIdentifier() { 168 public String getAppIdentifier() {
169 return "Chrome_Autofill_Payment_App"; 169 return "Chrome_Autofill_Payment_App";
170 } 170 }
171 } 171 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698