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

Unified Diff: components/autofill/content/renderer/password_generation_agent.h

Issue 2073143002: [Password Generation] Run the form classifier only if AutofillMetadata is enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pg_classifier_votes
Patch Set: Removed unnecessary ';' Created 4 years, 6 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
Index: components/autofill/content/renderer/password_generation_agent.h
diff --git a/components/autofill/content/renderer/password_generation_agent.h b/components/autofill/content/renderer/password_generation_agent.h
index 9e1bda376e4c9ea8dd7145941aad8a69464dbfd2..47f3a912e3e6da05d171765c93e1f8cd697a7d8a 100644
--- a/components/autofill/content/renderer/password_generation_agent.h
+++ b/components/autofill/content/renderer/password_generation_agent.h
@@ -107,7 +107,12 @@ class PasswordGenerationAgent : public content::RenderFrameObserver {
// generation popup at this field.
void OnUserTriggeredGeneratePassword();
+ // Enables the form classifier.
+ void OnAllowToRunFormClassifier();
+
// Runs HTML parsing based classifier and saves its outcome to proto.
+ // TODO(crbug.com/621442): Remove client-side form classifier when server-side
+ // classifier is ready.
void RunFormClassifierAndSaveVote(const blink::WebFormElement& web_form,
const PasswordForm& form);
@@ -165,6 +170,9 @@ class PasswordGenerationAgent : public content::RenderFrameObserver {
// If this feature is enabled. Controlled by Finch.
bool enabled_;
+ // If the form classifier should run.
+ bool form_classifier_enabled_;
+
// Unowned pointer. Used to notify PassowrdAutofillAgent when values
// in password fields are updated.
PasswordAutofillAgent* password_agent_;

Powered by Google App Engine
This is Rietveld 408576698