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/form_structure.h" | 5 #include "components/autofill/core/browser/form_structure.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 if (autocomplete_attribute_value == "street-address") | 211 if (autocomplete_attribute_value == "street-address") |
212 return HTML_TYPE_STREET_ADDRESS; | 212 return HTML_TYPE_STREET_ADDRESS; |
213 | 213 |
214 if (autocomplete_attribute_value == "address-line1") | 214 if (autocomplete_attribute_value == "address-line1") |
215 return HTML_TYPE_ADDRESS_LINE1; | 215 return HTML_TYPE_ADDRESS_LINE1; |
216 | 216 |
217 if (autocomplete_attribute_value == "address-line2") | 217 if (autocomplete_attribute_value == "address-line2") |
218 return HTML_TYPE_ADDRESS_LINE2; | 218 return HTML_TYPE_ADDRESS_LINE2; |
219 | 219 |
| 220 if (autocomplete_attribute_value == "address-line3") |
| 221 return HTML_TYPE_ADDRESS_LINE3; |
| 222 |
| 223 // TODO(estade): remove support for "locality" and "region". |
220 if (autocomplete_attribute_value == "locality") | 224 if (autocomplete_attribute_value == "locality") |
221 return HTML_TYPE_LOCALITY; | 225 return HTML_TYPE_ADDRESS_LEVEL2; |
222 | 226 |
223 if (autocomplete_attribute_value == "region") | 227 if (autocomplete_attribute_value == "region") |
224 return HTML_TYPE_REGION; | 228 return HTML_TYPE_ADDRESS_LEVEL1; |
| 229 |
| 230 if (autocomplete_attribute_value == "address-level1") |
| 231 return HTML_TYPE_ADDRESS_LEVEL1; |
| 232 |
| 233 if (autocomplete_attribute_value == "address-level2") |
| 234 return HTML_TYPE_ADDRESS_LEVEL2; |
| 235 |
| 236 if (autocomplete_attribute_value == "address-level3") |
| 237 return HTML_TYPE_ADDRESS_LEVEL3; |
225 | 238 |
226 if (autocomplete_attribute_value == "country") | 239 if (autocomplete_attribute_value == "country") |
227 return HTML_TYPE_COUNTRY_CODE; | 240 return HTML_TYPE_COUNTRY_CODE; |
228 | 241 |
229 if (autocomplete_attribute_value == "country-name") | 242 if (autocomplete_attribute_value == "country-name") |
230 return HTML_TYPE_COUNTRY_NAME; | 243 return HTML_TYPE_COUNTRY_NAME; |
231 | 244 |
232 if (autocomplete_attribute_value == "postal-code") | 245 if (autocomplete_attribute_value == "postal-code") |
233 return HTML_TYPE_POSTAL_CODE; | 246 return HTML_TYPE_POSTAL_CODE; |
234 | 247 |
(...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 field != fields_.end(); ++field) { | 1218 field != fields_.end(); ++field) { |
1206 FieldTypeGroup field_type_group = (*field)->Type().group(); | 1219 FieldTypeGroup field_type_group = (*field)->Type().group(); |
1207 if (field_type_group == CREDIT_CARD) | 1220 if (field_type_group == CREDIT_CARD) |
1208 (*field)->set_section((*field)->section() + "-cc"); | 1221 (*field)->set_section((*field)->section() + "-cc"); |
1209 else | 1222 else |
1210 (*field)->set_section((*field)->section() + "-default"); | 1223 (*field)->set_section((*field)->section() + "-default"); |
1211 } | 1224 } |
1212 } | 1225 } |
1213 | 1226 |
1214 } // namespace autofill | 1227 } // namespace autofill |
OLD | NEW |