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

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

Issue 1279123004: Replace ToLower calls to the new format (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 // before any validation so that fields with invalid attributes still end up 1098 // before any validation so that fields with invalid attributes still end up
1099 // in the default section. These default section names will be overridden 1099 // in the default section. These default section names will be overridden
1100 // by subsequent heuristic parsing steps if there are no author-specified 1100 // by subsequent heuristic parsing steps if there are no author-specified
1101 // section names. 1101 // section names.
1102 field->set_section(kDefaultSection); 1102 field->set_section(kDefaultSection);
1103 1103
1104 // Canonicalize the attribute value by trimming whitespace, collapsing 1104 // Canonicalize the attribute value by trimming whitespace, collapsing
1105 // non-space characters (e.g. tab) to spaces, and converting to lowercase. 1105 // non-space characters (e.g. tab) to spaces, and converting to lowercase.
1106 std::string autocomplete_attribute = 1106 std::string autocomplete_attribute =
1107 base::CollapseWhitespaceASCII(field->autocomplete_attribute, false); 1107 base::CollapseWhitespaceASCII(field->autocomplete_attribute, false);
1108 autocomplete_attribute = base::StringToLowerASCII(autocomplete_attribute); 1108 autocomplete_attribute = base::ToLowerASCII(autocomplete_attribute);
1109 1109
1110 // The autocomplete attribute is overloaded: it can specify either a field 1110 // The autocomplete attribute is overloaded: it can specify either a field
1111 // type hint or whether autocomplete should be enabled at all. Ignore the 1111 // type hint or whether autocomplete should be enabled at all. Ignore the
1112 // latter type of attribute value. 1112 // latter type of attribute value.
1113 if (autocomplete_attribute.empty() || 1113 if (autocomplete_attribute.empty() ||
1114 autocomplete_attribute == "on" || 1114 autocomplete_attribute == "on" ||
1115 autocomplete_attribute == "off") { 1115 autocomplete_attribute == "off") {
1116 continue; 1116 continue;
1117 } 1117 }
1118 1118
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1332 for (AutofillField* field : fields_) { 1332 for (AutofillField* field : fields_) {
1333 FieldTypeGroup field_type_group = field->Type().group(); 1333 FieldTypeGroup field_type_group = field->Type().group();
1334 if (field_type_group == CREDIT_CARD) 1334 if (field_type_group == CREDIT_CARD)
1335 field->set_section(field->section() + "-cc"); 1335 field->set_section(field->section() + "-cc");
1336 else 1336 else
1337 field->set_section(field->section() + "-default"); 1337 field->set_section(field->section() + "-default");
1338 } 1338 }
1339 } 1339 }
1340 1340
1341 } // namespace autofill 1341 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698