OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #include "components/autofill/core/browser/credit_card.h" | 5 #include "components/autofill/core/browser/credit_card.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <ostream> | 10 #include <ostream> |
(...skipping 21 matching lines...) Expand all Loading... |
32 // TODO(blundell): Eliminate the need for this conditional include. | 32 // TODO(blundell): Eliminate the need for this conditional include. |
33 // crbug.com/328150 | 33 // crbug.com/328150 |
34 #if !defined(OS_IOS) | 34 #if !defined(OS_IOS) |
35 #include "grit/webkit_resources.h" | 35 #include "grit/webkit_resources.h" |
36 #endif | 36 #endif |
37 | 37 |
38 namespace autofill { | 38 namespace autofill { |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 const char16 kCreditCardObfuscationSymbol = '*'; | 42 const base::char16 kCreditCardObfuscationSymbol = '*'; |
43 | 43 |
44 // This is the maximum obfuscated symbols displayed. | 44 // This is the maximum obfuscated symbols displayed. |
45 // It is introduced to avoid rare cases where the credit card number is | 45 // It is introduced to avoid rare cases where the credit card number is |
46 // too large and fills the screen. | 46 // too large and fills the screen. |
47 const size_t kMaxObfuscationSize = 20; | 47 const size_t kMaxObfuscationSize = 20; |
48 | 48 |
49 bool ConvertYear(const base::string16& year, int* num) { | 49 bool ConvertYear(const base::string16& year, int* num) { |
50 // If the |year| is empty, clear the stored value. | 50 // If the |year| is empty, clear the stored value. |
51 if (year.empty()) { | 51 if (year.empty()) { |
52 *num = 0; | 52 *num = 0; |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 const char* const kAmericanExpressCard = "americanExpressCC"; | 698 const char* const kAmericanExpressCard = "americanExpressCC"; |
699 const char* const kDinersCard = "dinersCC"; | 699 const char* const kDinersCard = "dinersCC"; |
700 const char* const kDiscoverCard = "discoverCC"; | 700 const char* const kDiscoverCard = "discoverCC"; |
701 const char* const kGenericCard = "genericCC"; | 701 const char* const kGenericCard = "genericCC"; |
702 const char* const kJCBCard = "jcbCC"; | 702 const char* const kJCBCard = "jcbCC"; |
703 const char* const kMasterCard = "masterCardCC"; | 703 const char* const kMasterCard = "masterCardCC"; |
704 const char* const kUnionPay = "unionPayCC"; | 704 const char* const kUnionPay = "unionPayCC"; |
705 const char* const kVisaCard = "visaCC"; | 705 const char* const kVisaCard = "visaCC"; |
706 | 706 |
707 } // namespace autofill | 707 } // namespace autofill |
OLD | NEW |