Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: components/autofill/core/browser/form_structure.cc

Issue 23432002: Generate passwords only for forms that autofill server marks as account creation forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix password generation manager browser test. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « components/autofill/core/browser/field_types.h ('k') | components/autofill/core/browser/form_structure_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698