| 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/form_structure.h" | 5 #include "chrome/browser/autofill/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" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/sha1.h" | 13 #include "base/sha1.h" |
| 14 #include "base/string_util.h" | 14 #include "base/string_util.h" |
| 15 #include "base/stringprintf.h" | 15 #include "base/stringprintf.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/time.h" | 17 #include "base/time.h" |
| 18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
| 19 #include "chrome/browser/autofill/autocheckout_page_meta_data.h" | 19 #include "chrome/browser/autofill/autocheckout_page_meta_data.h" |
| 20 #include "chrome/browser/autofill/autofill_metrics.h" | 20 #include "chrome/browser/autofill/autofill_metrics.h" |
| 21 #include "chrome/browser/autofill/autofill_type.h" | 21 #include "chrome/browser/autofill/autofill_type.h" |
| 22 #include "chrome/browser/autofill/autofill_xml_parser.h" | 22 #include "chrome/browser/autofill/autofill_xml_parser.h" |
| 23 #include "chrome/browser/autofill/field_types.h" | 23 #include "chrome/browser/autofill/field_types.h" |
| 24 #include "chrome/browser/autofill/form_field.h" | 24 #include "chrome/browser/autofill/form_field.h" |
| 25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/form_data.h" | 26 #include "components/autofill/common/form_data.h" |
| 27 #include "chrome/common/form_data_predictions.h" | 27 #include "components/autofill/common/form_data_predictions.h" |
| 28 #include "chrome/common/form_field_data.h" | 28 #include "components/autofill/common/form_field_data.h" |
| 29 #include "chrome/common/form_field_data_predictions.h" | 29 #include "components/autofill/common/form_field_data_predictions.h" |
| 30 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" | 30 #include "third_party/libjingle/source/talk/xmllite/xmlelement.h" |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 const char kFormMethodPost[] = "post"; | 34 const char kFormMethodPost[] = "post"; |
| 35 | 35 |
| 36 // XML elements and attributes. | 36 // XML elements and attributes. |
| 37 const char kAttributeAcceptedFeatures[] = "accepts"; | 37 const char kAttributeAcceptedFeatures[] = "accepts"; |
| 38 const char kAttributeAutofillUsed[] = "autofillused"; | 38 const char kAttributeAutofillUsed[] = "autofillused"; |
| 39 const char kAttributeAutofillType[] = "autofilltype"; | 39 const char kAttributeAutofillType[] = "autofilltype"; |
| (...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1148 for (std::vector<AutofillField*>::iterator field = fields_.begin(); | 1148 for (std::vector<AutofillField*>::iterator field = fields_.begin(); |
| 1149 field != fields_.end(); ++field) { | 1149 field != fields_.end(); ++field) { |
| 1150 AutofillType::FieldTypeGroup field_type_group = | 1150 AutofillType::FieldTypeGroup field_type_group = |
| 1151 AutofillType((*field)->type()).group(); | 1151 AutofillType((*field)->type()).group(); |
| 1152 if (field_type_group == AutofillType::CREDIT_CARD) | 1152 if (field_type_group == AutofillType::CREDIT_CARD) |
| 1153 (*field)->set_section((*field)->section() + "-cc"); | 1153 (*field)->set_section((*field)->section() + "-cc"); |
| 1154 else | 1154 else |
| 1155 (*field)->set_section((*field)->section() + "-default"); | 1155 (*field)->set_section((*field)->section() + "-default"); |
| 1156 } | 1156 } |
| 1157 } | 1157 } |
| OLD | NEW |