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/autofill_field.h" | 5 #include "components/autofill/core/browser/autofill_field.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/i18n/case_conversion.h" | 10 #include "base/i18n/case_conversion.h" |
11 #include "base/i18n/string_search.h" | 11 #include "base/i18n/string_search.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
18 #include "components/autofill/core/browser/autofill_country.h" | 18 #include "components/autofill/core/browser/autofill_country.h" |
19 #include "components/autofill/core/browser/autofill_type.h" | 19 #include "components/autofill/core/browser/autofill_type.h" |
20 #include "components/autofill/core/browser/country_names.h" | 20 #include "components/autofill/core/browser/country_names.h" |
21 #include "components/autofill/core/browser/credit_card.h" | 21 #include "components/autofill/core/browser/credit_card.h" |
22 #include "components/autofill/core/browser/phone_number.h" | 22 #include "components/autofill/core/browser/phone_number.h" |
23 #include "components/autofill/core/browser/proto/server.pb.h" | 23 #include "components/autofill/core/browser/proto/server.pb.h" |
24 #include "components/autofill/core/browser/state_names.h" | 24 #include "components/autofill/core/browser/state_names.h" |
25 #include "components/autofill/core/common/autofill_l10n_util.h" | 25 #include "components/autofill/core/common/autofill_l10n_util.h" |
26 #include "components/autofill/core/common/autofill_switches.h" | 26 #include "components/autofill/core/common/autofill_switches.h" |
27 #include "components/autofill/core/common/autofill_util.h" | 27 #include "components/autofill/core/common/autofill_util.h" |
28 #include "grit/components_strings.h" | 28 #include "components/strings/grit/components_strings.h" |
29 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_da
ta.h" | 29 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_da
ta.h" |
30 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_fo
rmatter.h" | 30 #include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_fo
rmatter.h" |
31 #include "ui/base/l10n/l10n_util.h" | 31 #include "ui/base/l10n/l10n_util.h" |
32 | 32 |
33 using ::i18n::addressinput::AddressData; | 33 using ::i18n::addressinput::AddressData; |
34 using ::i18n::addressinput::GetStreetAddressLinesAsSingleLine; | 34 using ::i18n::addressinput::GetStreetAddressLinesAsSingleLine; |
35 using base::ASCIIToUTF16; | 35 using base::ASCIIToUTF16; |
36 using base::StringToInt; | 36 using base::StringToInt; |
37 | 37 |
38 namespace autofill { | 38 namespace autofill { |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 } | 761 } |
762 return best_match; | 762 return best_match; |
763 } | 763 } |
764 | 764 |
765 bool AutofillField::IsCreditCardPrediction() const { | 765 bool AutofillField::IsCreditCardPrediction() const { |
766 return AutofillType(server_type_).group() == CREDIT_CARD || | 766 return AutofillType(server_type_).group() == CREDIT_CARD || |
767 AutofillType(heuristic_type_).group() == CREDIT_CARD; | 767 AutofillType(heuristic_type_).group() == CREDIT_CARD; |
768 } | 768 } |
769 | 769 |
770 } // namespace autofill | 770 } // namespace autofill |
OLD | NEW |