OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/password_manager/core/browser/password_form_manager.h" | 5 #include "components/password_manager/core/browser/password_form_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <map> | 10 #include <map> |
(...skipping 767 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 SetFieldLabelsOnSave(password_type, *submitted_form_, &field_types); | 778 SetFieldLabelsOnSave(password_type, *submitted_form_, &field_types); |
779 if (password_type == autofill::ACCOUNT_CREATION_PASSWORD) { | 779 if (password_type == autofill::ACCOUNT_CREATION_PASSWORD) { |
780 field_types[pending_credentials_.username_element] = autofill::USERNAME; | 780 field_types[pending_credentials_.username_element] = autofill::USERNAME; |
781 } | 781 } |
782 } | 782 } |
783 field_types[submitted_form_->confirmation_password_element] = | 783 field_types[submitted_form_->confirmation_password_element] = |
784 autofill::CONFIRMATION_PASSWORD; | 784 autofill::CONFIRMATION_PASSWORD; |
785 LabelFields(field_types, &form_structure, &available_field_types); | 785 LabelFields(field_types, &form_structure, &available_field_types); |
786 } | 786 } |
787 | 787 |
788 if (generation_popup_was_shown_) | 788 if (password_type != autofill::ACCOUNT_CREATION_PASSWORD) { |
789 AddGeneratedVote(&form_structure); | 789 if (generation_popup_was_shown_) |
790 if (form_classifier_outcome_ != kNoOutcome) | 790 AddGeneratedVote(&form_structure); |
791 AddFormClassifierVote(&form_structure); | 791 if (form_classifier_outcome_ != kNoOutcome) |
| 792 AddFormClassifierVote(&form_structure); |
| 793 } |
792 | 794 |
793 // Force uploading as these events are relatively rare and we want to make | 795 // Force uploading as these events are relatively rare and we want to make |
794 // sure to receive them. | 796 // sure to receive them. |
795 form_structure.set_upload_required(UPLOAD_REQUIRED); | 797 form_structure.set_upload_required(UPLOAD_REQUIRED); |
796 | 798 |
797 if (password_manager_util::IsLoggingActive(client_)) { | 799 if (password_manager_util::IsLoggingActive(client_)) { |
798 BrowserSavePasswordProgressLogger logger(client_->GetLogManager()); | 800 BrowserSavePasswordProgressLogger logger(client_->GetLogManager()); |
799 logger.LogFormStructure(Logger::STRING_FORM_VOTES, form_structure); | 801 logger.LogFormStructure(Logger::STRING_FORM_VOTES, form_structure); |
800 } | 802 } |
801 | 803 |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1316 credentials_to_update->back().password_value = | 1318 credentials_to_update->back().password_value = |
1317 pending_credentials_.password_value; | 1319 pending_credentials_.password_value; |
1318 } | 1320 } |
1319 } | 1321 } |
1320 } | 1322 } |
1321 | 1323 |
1322 return old_primary_key; | 1324 return old_primary_key; |
1323 } | 1325 } |
1324 | 1326 |
1325 } // namespace password_manager | 1327 } // namespace password_manager |
OLD | NEW |