OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/autofill/credit_card.h" | 5 #include "chrome/browser/autofill/credit_card.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <ostream> | 9 #include <ostream> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/guid.h" | 13 #include "base/guid.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "base/string16.h" | 15 #include "base/string16.h" |
16 #include "base/string_number_conversions.h" | 16 #include "base/string_number_conversions.h" |
17 #include "base/string_split.h" | 17 #include "base/string_split.h" |
18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
19 #include "base/utf_string_conversions.h" | 19 #include "base/utf_string_conversions.h" |
20 #include "chrome/browser/autofill/autofill_country.h" | 20 #include "chrome/browser/autofill/autofill_country.h" |
21 #include "chrome/browser/autofill/autofill_field.h" | 21 #include "chrome/browser/autofill/autofill_field.h" |
22 #include "chrome/browser/autofill/autofill_regexes.h" | 22 #include "chrome/browser/autofill/autofill_regexes.h" |
23 #include "chrome/browser/autofill/autofill_type.h" | 23 #include "chrome/browser/autofill/autofill_type.h" |
24 #include "chrome/browser/autofill/field_types.h" | 24 #include "chrome/browser/autofill/field_types.h" |
25 #include "chrome/common/form_field_data.h" | 25 #include "chrome/common/form_field_data.h" |
26 #include "grit/generated_resources.h" | 26 #include "grit/generated_resources.h" |
| 27 #include "third_party/icu/public/common/unicode/uloc.h" |
| 28 #include "third_party/icu/public/i18n/unicode/dtfmtsym.h" |
27 #include "ui/base/l10n/l10n_util.h" | 29 #include "ui/base/l10n/l10n_util.h" |
28 #include "unicode/dtfmtsym.h" | |
29 #include "unicode/uloc.h" | |
30 | 30 |
31 namespace { | 31 namespace { |
32 | 32 |
33 const char16 kCreditCardObfuscationSymbol = '*'; | 33 const char16 kCreditCardObfuscationSymbol = '*'; |
34 | 34 |
35 // Returns a version of |number| that has any separator characters removed. | 35 // Returns a version of |number| that has any separator characters removed. |
36 const string16 StripSeparators(const string16& number) { | 36 const string16 StripSeparators(const string16& number) { |
37 const char16 kSeparators[] = {'-', ' ', '\0'}; | 37 const char16 kSeparators[] = {'-', ' ', '\0'}; |
38 string16 stripped; | 38 string16 stripped; |
39 RemoveChars(number, kSeparators, &stripped); | 39 RemoveChars(number, kSeparators, &stripped); |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
656 // webkit/glue. We send these strings to WebKit, which then asks | 656 // webkit/glue. We send these strings to WebKit, which then asks |
657 // WebKitPlatformSupportImpl to load the image data. | 657 // WebKitPlatformSupportImpl to load the image data. |
658 const char* const kAmericanExpressCard = "americanExpressCC"; | 658 const char* const kAmericanExpressCard = "americanExpressCC"; |
659 const char* const kDinersCard = "dinersCC"; | 659 const char* const kDinersCard = "dinersCC"; |
660 const char* const kDiscoverCard = "discoverCC"; | 660 const char* const kDiscoverCard = "discoverCC"; |
661 const char* const kGenericCard = "genericCC"; | 661 const char* const kGenericCard = "genericCC"; |
662 const char* const kJCBCard = "jcbCC"; | 662 const char* const kJCBCard = "jcbCC"; |
663 const char* const kMasterCard = "masterCardCC"; | 663 const char* const kMasterCard = "masterCardCC"; |
664 const char* const kSoloCard = "soloCC"; | 664 const char* const kSoloCard = "soloCC"; |
665 const char* const kVisaCard = "visaCC"; | 665 const char* const kVisaCard = "visaCC"; |
OLD | NEW |