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

Unified Diff: components/autofill/core/browser/autofill_data_util.cc

Issue 2289263003: Revert of Add support for method selection in the Payment Request UI on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/browser/autofill_data_util.cc
diff --git a/components/autofill/core/browser/autofill_data_util.cc b/components/autofill/core/browser/autofill_data_util.cc
index ef61655371fbcbd01689204c0033b4f09b30c70e..955a6c20f8d2970e212d61ae6febe04dd7643ddf 100644
--- a/components/autofill/core/browser/autofill_data_util.cc
+++ b/components/autofill/core/browser/autofill_data_util.cc
@@ -18,21 +18,6 @@
namespace data_util {
namespace {
-// Mappings from Chrome card types to Payment Request API basic card payment
-// spec types and icons. Note that "generic" is not in the spec.
-// https://w3c.github.io/webpayments-methods-card/#method-id
-const PaymentRequestData kPaymentRequestData[]{
- {"americanExpressCC", "amex", IDR_AUTOFILL_PR_AMEX},
- {"dinersCC", "diners", IDR_AUTOFILL_PR_DINERS},
- {"discoverCC", "discover", IDR_AUTOFILL_PR_DISCOVER},
- {"jcbCC", "jcb", IDR_AUTOFILL_PR_JCB},
- {"masterCardCC", "mastercard", IDR_AUTOFILL_PR_MASTERCARD},
- {"unionPayCC", "unionpay", IDR_AUTOFILL_PR_UNIONPAY},
- {"visaCC", "visa", IDR_AUTOFILL_PR_VISA},
-};
-const PaymentRequestData kGenericPaymentRequestData = {"genericCC", "generic",
- IDR_AUTOFILL_PR_GENERIC};
-
const char* const name_prefixes[] = {
"1lt", "1st", "2lt", "2nd", "3rd", "admiral", "capt",
"captain", "col", "cpt", "dr", "gen", "general", "lcdr",
@@ -398,24 +383,5 @@
return false;
}
-const PaymentRequestData& GetPaymentRequestData(const std::string& type) {
- for (size_t i = 0; i < arraysize(kPaymentRequestData); ++i) {
- if (type == kPaymentRequestData[i].card_type)
- return kPaymentRequestData[i];
- }
- return kGenericPaymentRequestData;
-}
-
-const char* GetCardTypeForBasicCardPaymentType(
- const std::string& basic_card_payment_type) {
- for (size_t i = 0; i < arraysize(kPaymentRequestData); ++i) {
- if (basic_card_payment_type ==
- kPaymentRequestData[i].basic_card_payment_type) {
- return kPaymentRequestData[i].card_type;
- }
- }
- return kGenericPaymentRequestData.card_type;
-}
-
} // namespace data_util
} // namespace autofill
« no previous file with comments | « components/autofill/core/browser/autofill_data_util.h ('k') | components/resources/autofill_scaled_resources.grdp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698