| 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.os.Handler; | 8 import android.os.Handler; |
| 9 import android.text.TextUtils; | 9 import android.text.TextUtils; |
| 10 | 10 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 methods.add("unionpay"); | 85 methods.add("unionpay"); |
| 86 | 86 |
| 87 // The spec does not include "generic" card types. That's the type of ca
rd for which | 87 // The spec does not include "generic" card types. That's the type of ca
rd for which |
| 88 // Chrome cannot determine the type. | 88 // Chrome cannot determine the type. |
| 89 methods.add("generic"); | 89 methods.add("generic"); |
| 90 | 90 |
| 91 return methods; | 91 return methods; |
| 92 } | 92 } |
| 93 | 93 |
| 94 @Override | 94 @Override |
| 95 public boolean supportsMethodsAndData(Map<String, PaymentMethodData> methods
AndData) { |
| 96 assert methodsAndData != null; |
| 97 Set<String> methodNames = new HashSet<>(methodsAndData.keySet()); |
| 98 methodNames.retainAll(getAppMethodNames()); |
| 99 return !methodNames.isEmpty(); |
| 100 } |
| 101 |
| 102 @Override |
| 95 public String getAppIdentifier() { | 103 public String getAppIdentifier() { |
| 96 return "Chrome_Autofill_Payment_App"; | 104 return "Chrome_Autofill_Payment_App"; |
| 97 } | 105 } |
| 98 } | 106 } |
| OLD | NEW |