Index: components/password_manager/content/browser/content_password_manager_driver.cc |
diff --git a/components/password_manager/content/browser/content_password_manager_driver.cc b/components/password_manager/content/browser/content_password_manager_driver.cc |
index 08bb4d9c6a5a86f93e01b91bfb43292cb9025c63..c74a99ea02576049c9bb0dea200137fe99e28a54 100644 |
--- a/components/password_manager/content/browser/content_password_manager_driver.cc |
+++ b/components/password_manager/content/browser/content_password_manager_driver.cc |
@@ -151,6 +151,10 @@ bool ContentPasswordManagerDriver::HandleMessage(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordFormSubmitted, |
OnPasswordFormSubmitted) |
IPC_MESSAGE_HANDLER(AutofillHostMsg_InPageNavigation, OnInPageNavigation) |
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_PresaveGeneratedPassword, |
+ OnPresaveGeneratedPassword) |
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_UpdatePresavedPassword, |
+ OnUpdatePresavedPassword) |
IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordNoLongerGenerated, |
OnPasswordNoLongerGenerated) |
IPC_MESSAGE_HANDLER(AutofillHostMsg_FocusedPasswordFormFound, |
@@ -231,6 +235,24 @@ void ContentPasswordManagerDriver::OnInPageNavigation( |
GetPasswordManager()->OnInPageNavigation(this, password_form); |
} |
+void ContentPasswordManagerDriver::OnPresaveGeneratedPassword( |
+ const autofill::PasswordForm& password_form) { |
+ if (!CheckChildProcessSecurityPolicy( |
+ password_form.origin, |
+ BadMessageReason::CPMD_BAD_ORIGIN_PRESAVE_GENERATED_PASSWORD)) |
+ return; |
+ GetPasswordManager()->OnPresaveGeneratedPassword(password_form); |
+} |
+ |
+void ContentPasswordManagerDriver::OnUpdatePresavedPassword( |
+ const autofill::PasswordForm& password_form) { |
+ if (!CheckChildProcessSecurityPolicy( |
+ password_form.origin, |
+ BadMessageReason::CPMD_BAD_ORIGIN_UPDATE_PRESAVED_PASSWORD)) |
+ return; |
+ GetPasswordManager()->OnUpdatePresavedPassword(password_form); |
+} |
+ |
void ContentPasswordManagerDriver::OnPasswordNoLongerGenerated( |
const autofill::PasswordForm& password_form) { |
if (!CheckChildProcessSecurityPolicy( |