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

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

Issue 1686063004: Sending generated vote on password generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix BUILD.gn Created 4 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 | « components/password_manager/core/browser/password_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index ad3e723f2382147f28515fedf2ec3c9066f000f3..02164e3547ae2395ee5e01d3b058a450c3558cc9 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -211,9 +211,21 @@ void PasswordManager::SetHasGeneratedPasswordForForm(
UMA_HISTOGRAM_BOOLEAN("PasswordManager.GeneratedFormHasNoFormManager",
password_is_generated);
+}
+
+void PasswordManager::SetGenerationElementAndReasonForForm(
+ password_manager::PasswordManagerDriver* driver,
+ const autofill::PasswordForm& form,
+ const base::string16& generation_element,
+ bool is_manually_triggered) {
+ DCHECK(client_->IsSavingAndFillingEnabledForCurrentPage());
- if (!password_is_generated)
+ PasswordFormManager* form_manager = GetMatchingPendingManager(form);
+ if (form_manager) {
+ form_manager->set_generation_element(generation_element);
+ form_manager->set_is_manual_generation(is_manually_triggered);
return;
+ }
// If there is no corresponding PasswordFormManager, we create one. This is
// not the common case, and should only happen when there is a bug in our
« no previous file with comments | « components/password_manager/core/browser/password_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698