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

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

Issue 2148303005: [Password Generation] Sends the flag whether a field has nonempty user input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes addressed to reviewer comments Created 4 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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <map> 10 #include <map>
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 added_field->set_type(field->form_control_type); 1163 added_field->set_type(field->form_control_type);
1164 1164
1165 if (!field->name.empty()) 1165 if (!field->name.empty())
1166 added_field->set_name(base::UTF16ToUTF8(field->name)); 1166 added_field->set_name(base::UTF16ToUTF8(field->name));
1167 1167
1168 if (!field->autocomplete_attribute.empty()) 1168 if (!field->autocomplete_attribute.empty())
1169 added_field->set_autocomplete(field->autocomplete_attribute); 1169 added_field->set_autocomplete(field->autocomplete_attribute);
1170 1170
1171 if (!field->css_classes.empty()) 1171 if (!field->css_classes.empty())
1172 added_field->set_css_classes(base::UTF16ToUTF8(field->css_classes)); 1172 added_field->set_css_classes(base::UTF16ToUTF8(field->css_classes));
1173
1174 if (field->properties_mask)
1175 added_field->set_properties_mask(field->properties_mask);
1173 } 1176 }
1174 } 1177 }
1175 } 1178 }
1176 } 1179 }
1177 1180
1178 uint64_t FormStructure::Hash64Bit(const std::string& str) { 1181 uint64_t FormStructure::Hash64Bit(const std::string& str) {
1179 std::string hash_bin = base::SHA1HashString(str); 1182 std::string hash_bin = base::SHA1HashString(str);
1180 DCHECK_EQ(base::kSHA1Length, hash_bin.length()); 1183 DCHECK_EQ(base::kSHA1Length, hash_bin.length());
1181 1184
1182 uint64_t hash64 = (((static_cast<uint64_t>(hash_bin[0])) & 0xFF) << 56) | 1185 uint64_t hash64 = (((static_cast<uint64_t>(hash_bin[0])) & 0xFF) << 56) |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 filtered_strings[0].at(prefix_len)) { 1357 filtered_strings[0].at(prefix_len)) {
1355 // Mismatch found. 1358 // Mismatch found.
1356 return filtered_strings[i].substr(0, prefix_len); 1359 return filtered_strings[i].substr(0, prefix_len);
1357 } 1360 }
1358 } 1361 }
1359 } 1362 }
1360 return filtered_strings[0]; 1363 return filtered_strings[0];
1361 } 1364 }
1362 1365
1363 } // namespace autofill 1366 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698