OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser/address.h" | 5 #include "components/autofill/core/browser/address.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/strings/utf_string_conversions.h" | 12 #include "base/strings/utf_string_conversions.h" |
13 #include "components/autofill/browser/autofill_country.h" | 13 #include "components/autofill/core/browser/autofill_country.h" |
14 #include "components/autofill/browser/autofill_field.h" | 14 #include "components/autofill/core/browser/autofill_field.h" |
15 #include "components/autofill/browser/autofill_type.h" | 15 #include "components/autofill/core/browser/autofill_type.h" |
16 #include "components/autofill/browser/field_types.h" | 16 #include "components/autofill/core/browser/field_types.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 const char16 kAddressSplitChars[] = {'-', ',', '#', '.', ' ', 0}; | 20 const char16 kAddressSplitChars[] = {'-', ',', '#', '.', ' ', 0}; |
21 | 21 |
22 } // namespace | 22 } // namespace |
23 | 23 |
24 namespace autofill { | 24 namespace autofill { |
25 | 25 |
26 Address::Address() {} | 26 Address::Address() {} |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 FieldTypeSet* matching_types) const { | 124 FieldTypeSet* matching_types) const { |
125 FormGroup::GetMatchingTypes(text, app_locale, matching_types); | 125 FormGroup::GetMatchingTypes(text, app_locale, matching_types); |
126 | 126 |
127 // Check to see if the |text| canonicalized as a country name is a match. | 127 // Check to see if the |text| canonicalized as a country name is a match. |
128 std::string country_code = AutofillCountry::GetCountryCode(text, app_locale); | 128 std::string country_code = AutofillCountry::GetCountryCode(text, app_locale); |
129 if (!country_code.empty() && country_code_ == ASCIIToUTF16(country_code)) | 129 if (!country_code.empty() && country_code_ == ASCIIToUTF16(country_code)) |
130 matching_types->insert(ADDRESS_HOME_COUNTRY); | 130 matching_types->insert(ADDRESS_HOME_COUNTRY); |
131 } | 131 } |
132 | 132 |
133 } // namespace autofill | 133 } // namespace autofill |
OLD | NEW |