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

Unified Diff: components/password_manager/core/browser/password_form_manager.cc

Issue 2684033011: [Merge] [Password Manager] Fix sending votes for password generation. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_form_manager.cc
diff --git a/components/password_manager/core/browser/password_form_manager.cc b/components/password_manager/core/browser/password_form_manager.cc
index 152630f60f3c9a56ee0501cbae59e97d3dbcbbe6..f6670796b0ca25c19679bd1fba871ba121cf269e 100644
--- a/components/password_manager/core/browser/password_form_manager.cc
+++ b/components/password_manager/core/browser/password_form_manager.cc
@@ -178,14 +178,14 @@ void LabelFields(const FieldTypeMap& field_types,
autofill::ServerFieldTypeSet* available_field_types) {
for (size_t i = 0; i < form_structure->field_count(); ++i) {
autofill::AutofillField* field = form_structure->field(i);
- if (field->name.empty())
- continue;
autofill::ServerFieldType type = autofill::UNKNOWN_TYPE;
- auto iter = field_types.find(field->name);
- if (iter != field_types.end()) {
- type = iter->second;
- available_field_types->insert(type);
+ if (!field->name.empty()) {
+ auto iter = field_types.find(field->name);
+ if (iter != field_types.end()) {
+ type = iter->second;
+ available_field_types->insert(type);
+ }
}
autofill::ServerFieldTypeSet types;
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_form_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698