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

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

Issue 891983002: [Autofill] Take into account autocomplete prediction in Quality* metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: initial Created 5 years, 10 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 724 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 if (cached_field != cached_fields.end()) { 735 if (cached_field != cached_fields.end()) {
736 if (field->form_control_type != "select-one" && 736 if (field->form_control_type != "select-one" &&
737 field->value == cached_field->second->value) { 737 field->value == cached_field->second->value) {
738 // From the perspective of learning user data, text fields containing 738 // From the perspective of learning user data, text fields containing
739 // default values are equivalent to empty fields. 739 // default values are equivalent to empty fields.
740 field->value = base::string16(); 740 field->value = base::string16();
741 } 741 }
742 742
743 field->set_heuristic_type(cached_field->second->heuristic_type()); 743 field->set_heuristic_type(cached_field->second->heuristic_type());
744 field->set_server_type(cached_field->second->server_type()); 744 field->set_server_type(cached_field->second->server_type());
745 field->SetHtmlType(cached_field->second->html_type(),
746 cached_field->second->html_mode());
745 } 747 }
746 } 748 }
747 749
748 UpdateAutofillCount(); 750 UpdateAutofillCount();
749 751
750 // The form signature should match between query and upload requests to the 752 // The form signature should match between query and upload requests to the
751 // server. On many websites, form elements are dynamically added, removed, or 753 // server. On many websites, form elements are dynamically added, removed, or
752 // rearranged via JavaScript between page load and form submission, so we 754 // rearranged via JavaScript between page load and form submission, so we
753 // copy over the |form_signature_field_names_| corresponding to the query 755 // copy over the |form_signature_field_names_| corresponding to the query
754 // request. 756 // request.
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 for (AutofillField* field : fields_) { 1247 for (AutofillField* field : fields_) {
1246 FieldTypeGroup field_type_group = field->Type().group(); 1248 FieldTypeGroup field_type_group = field->Type().group();
1247 if (field_type_group == CREDIT_CARD) 1249 if (field_type_group == CREDIT_CARD)
1248 field->set_section(field->section() + "-cc"); 1250 field->set_section(field->section() + "-cc");
1249 else 1251 else
1250 field->set_section(field->section() + "-default"); 1252 field->set_section(field->section() + "-default");
1251 } 1253 }
1252 } 1254 }
1253 1255
1254 } // namespace autofill 1256 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698