| 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 239 | 239 |
| 240 if (autocomplete_attribute_value == "country-name") | 240 if (autocomplete_attribute_value == "country-name") |
| 241 return HTML_TYPE_COUNTRY_NAME; | 241 return HTML_TYPE_COUNTRY_NAME; |
| 242 | 242 |
| 243 if (autocomplete_attribute_value == "postal-code") | 243 if (autocomplete_attribute_value == "postal-code") |
| 244 return HTML_TYPE_POSTAL_CODE; | 244 return HTML_TYPE_POSTAL_CODE; |
| 245 | 245 |
| 246 // content_switches.h isn't accessible from here, hence we have | 246 // content_switches.h isn't accessible from here, hence we have |
| 247 // to copy the string literal. This should be removed soon anyway. | 247 // to copy the string literal. This should be removed soon anyway. |
| 248 if (autocomplete_attribute_value == "address" && | 248 if (autocomplete_attribute_value == "address" && |
| 249 CommandLine::ForCurrentProcess()->HasSwitch( | 249 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 250 "enable-experimental-web-platform-features")) { | 250 "enable-experimental-web-platform-features")) { |
| 251 return HTML_TYPE_FULL_ADDRESS; | 251 return HTML_TYPE_FULL_ADDRESS; |
| 252 } | 252 } |
| 253 | 253 |
| 254 if (autocomplete_attribute_value == "cc-name") | 254 if (autocomplete_attribute_value == "cc-name") |
| 255 return HTML_TYPE_CREDIT_CARD_NAME; | 255 return HTML_TYPE_CREDIT_CARD_NAME; |
| 256 | 256 |
| 257 if (autocomplete_attribute_value == "cc-number") | 257 if (autocomplete_attribute_value == "cc-number") |
| 258 return HTML_TYPE_CREDIT_CARD_NUMBER; | 258 return HTML_TYPE_CREDIT_CARD_NUMBER; |
| 259 | 259 |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 for (AutofillField* field : fields_) { | 1246 for (AutofillField* field : fields_) { |
| 1247 FieldTypeGroup field_type_group = field->Type().group(); | 1247 FieldTypeGroup field_type_group = field->Type().group(); |
| 1248 if (field_type_group == CREDIT_CARD) | 1248 if (field_type_group == CREDIT_CARD) |
| 1249 field->set_section(field->section() + "-cc"); | 1249 field->set_section(field->section() + "-cc"); |
| 1250 else | 1250 else |
| 1251 field->set_section(field->section() + "-default"); | 1251 field->set_section(field->section() + "-default"); |
| 1252 } | 1252 } |
| 1253 } | 1253 } |
| 1254 | 1254 |
| 1255 } // namespace autofill | 1255 } // namespace autofill |
| OLD | NEW |