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

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

Issue 1817483002: [Password Manager] Presave the form with generated password till successful login (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed CPMD_BAD_ORIGIN_UPDATE_PRESAVED_PASSWORD in bad_message.h Created 4 years, 8 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/password_manager/core/browser/password_form_manager.h
diff --git a/components/password_manager/core/browser/password_form_manager.h b/components/password_manager/core/browser/password_form_manager.h
index 0cf54a306af532f33ed821eb5060f414baef258d..c3421b881075d8460c08f2d2de68ef7a21371807 100644
--- a/components/password_manager/core/browser/password_form_manager.h
+++ b/components/password_manager/core/browser/password_form_manager.h
@@ -254,6 +254,15 @@ class PasswordFormManager : public PasswordStoreConsumer {
// Called when the user didn't interact with Update UI.
void OnNoInteractionOnUpdate();
+ // Called when the user accepts a generated password or change it.
+ void PresaveGeneratedPassword(const autofill::PasswordForm& form);
+
+ // Called when the user removes the generated password.
+ void RemovePresavedPassword();
+
+ // Called after successful login on the form with a generated password.
+ void ReplacePresavedPasswordWithPendingCredentials(PasswordStore* store);
+
private:
// ManagerAction - What does the manager do with this form? Either it
// fills it, or it doesn't. If it doesn't fill it, that's either
@@ -493,6 +502,10 @@ class PasswordFormManager : public PasswordStoreConsumer {
// |provisionally_saved_form_| and |best_matches_|.
autofill::PasswordForm pending_credentials_;
+ // Stores the form with generated password till the user makes successful
+ // login or removes the generated password.
+ std::unique_ptr<autofill::PasswordForm> presaved_form_;
+
// Whether pending_credentials_ stores a new login or is an update
// to an existing one.
bool is_new_login_;

Powered by Google App Engine
This is Rietveld 408576698