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

Unified Diff: chrome/browser/password_manager/password_generation_manager.h

Issue 23432002: Generate passwords only for forms that autofill server marks as account creation forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 7 years, 3 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: chrome/browser/password_manager/password_generation_manager.h
diff --git a/chrome/browser/password_manager/password_generation_manager.h b/chrome/browser/password_manager/password_generation_manager.h
index b699c2e66d4204675ca0230afd9a9aca0865283d..b1877b9b16be4ba52d5b6be9defb617573c158bc 100644
--- a/chrome/browser/password_manager/password_generation_manager.h
+++ b/chrome/browser/password_manager/password_generation_manager.h
@@ -14,6 +14,8 @@
#include "content/public/browser/web_contents_user_data.h"
namespace autofill {
+class FormData;
+class FormStructure;
class PasswordGenerator;
}
@@ -49,6 +51,10 @@ class PasswordGenerationManager
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
virtual ~PasswordGenerationManager();
+ // Detect account creation forms from forms with autofill type annotated.
+ void DetectAccountCreationForms(
+ const std::vector<autofill::FormStructure*>& forms);
+
protected:
explicit PasswordGenerationManager(content::WebContents* contents);
@@ -81,6 +87,10 @@ class PasswordGenerationManager
// is a separate function to aid in testing.
virtual void SendStateToRenderer(content::RenderViewHost* host, bool enabled);
+ virtual void SendAccountCreationFormsToRenderer(
+ content::RenderViewHost* host,
+ const std::vector<autofill::FormData>& forms);
+
// Causes the password generation bubble UI to be shown for the specified
// form. The popup will be anchored at |icon_bounds|. The generated
// password will be no longer than |max_length|.

Powered by Google App Engine
This is Rietveld 408576698