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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 } | 653 } |
654 | 654 |
655 std::string form_string = scheme + "://" + host + "&" + | 655 std::string form_string = scheme + "://" + host + "&" + |
656 UTF16ToUTF8(form_name_) + | 656 UTF16ToUTF8(form_name_) + |
657 form_signature_field_names_; | 657 form_signature_field_names_; |
658 | 658 |
659 return Hash64Bit(form_string); | 659 return Hash64Bit(form_string); |
660 } | 660 } |
661 | 661 |
662 bool FormStructure::ShouldSkipField(const FormFieldData& field) const { | 662 bool FormStructure::ShouldSkipField(const FormFieldData& field) const { |
663 return (field.is_checkable || field.form_control_type == "password"); | 663 return field.is_checkable; |
664 } | 664 } |
665 | 665 |
666 bool FormStructure::IsAutofillable(bool require_method_post) const { | 666 bool FormStructure::IsAutofillable(bool require_method_post) const { |
667 if (autofill_count() < kRequiredAutofillFields) | 667 if (autofill_count() < kRequiredAutofillFields) |
668 return false; | 668 return false; |
669 | 669 |
670 return ShouldBeParsed(require_method_post); | 670 return ShouldBeParsed(require_method_post); |
671 } | 671 } |
672 | 672 |
673 void FormStructure::UpdateAutofillCount() { | 673 void FormStructure::UpdateAutofillCount() { |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1201 field != fields_.end(); ++field) { | 1201 field != fields_.end(); ++field) { |
1202 FieldTypeGroup field_type_group = (*field)->Type().group(); | 1202 FieldTypeGroup field_type_group = (*field)->Type().group(); |
1203 if (field_type_group == CREDIT_CARD) | 1203 if (field_type_group == CREDIT_CARD) |
1204 (*field)->set_section((*field)->section() + "-cc"); | 1204 (*field)->set_section((*field)->section() + "-cc"); |
1205 else | 1205 else |
1206 (*field)->set_section((*field)->section() + "-default"); | 1206 (*field)->set_section((*field)->section() + "-default"); |
1207 } | 1207 } |
1208 } | 1208 } |
1209 | 1209 |
1210 } // namespace autofill | 1210 } // namespace autofill |
OLD | NEW |