| 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 83239f480de44a2f013c5dd0a63bf809d0e65733..641e3d5b2892ad16e0979e4a8c53bcc33430e244 100644
|
| --- a/components/password_manager/content/browser/content_password_manager_driver.cc
|
| +++ b/components/password_manager/content/browser/content_password_manager_driver.cc
|
| @@ -9,6 +9,7 @@
|
| #include "components/autofill/core/common/password_form.h"
|
| #include "components/password_manager/content/browser/bad_message.h"
|
| #include "components/password_manager/content/browser/content_password_manager_driver_factory.h"
|
| +#include "components/password_manager/core/browser/password_manager.h"
|
| #include "components/password_manager/core/browser/password_manager_client.h"
|
| #include "content/public/browser/browser_context.h"
|
| #include "content/public/browser/child_process_security_policy.h"
|
| @@ -33,8 +34,7 @@ ContentPasswordManagerDriver::ContentPasswordManagerDriver(
|
| client_(client),
|
| password_generation_manager_(client, this),
|
| password_autofill_manager_(this, autofill_client),
|
| - next_free_key_(0) {
|
| -}
|
| + next_free_key_(0) {}
|
|
|
| ContentPasswordManagerDriver::~ContentPasswordManagerDriver() {
|
| }
|
| @@ -114,6 +114,19 @@ void ContentPasswordManagerDriver::ForceSavePassword() {
|
| host->Send(new AutofillMsg_FindFocusedPasswordForm(host->GetRoutingID()));
|
| }
|
|
|
| +void ContentPasswordManagerDriver::NotifyAboutLoggingAvailability(
|
| + bool is_available) {
|
| + if (is_available == logging_available_)
|
| + return;
|
| + logging_available_ = is_available;
|
| + SendLoggingAvailability();
|
| +}
|
| +
|
| +void ContentPasswordManagerDriver::SendLoggingAvailability() {
|
| + render_frame_host_->Send(new AutofillMsg_SetLoggingState(
|
| + render_frame_host_->GetRoutingID(), logging_available_));
|
| +}
|
| +
|
| PasswordGenerationManager*
|
| ContentPasswordManagerDriver::GetPasswordGenerationManager() {
|
| return &password_generation_manager_;
|
| @@ -145,8 +158,11 @@ bool ContentPasswordManagerDriver::HandleMessage(const IPC::Message& message) {
|
| IPC_MESSAGE_FORWARD(AutofillHostMsg_ShowPasswordSuggestions,
|
| &password_autofill_manager_,
|
| PasswordAutofillManager::OnShowPasswordSuggestions)
|
| - IPC_MESSAGE_FORWARD(AutofillHostMsg_RecordSavePasswordProgress, client_,
|
| - PasswordManagerClient::LogSavePasswordProgress)
|
| + IPC_MESSAGE_FORWARD(AutofillHostMsg_RecordSavePasswordProgress,
|
| + client_->GetPasswordManager(),
|
| + PasswordManager::LogSavePasswordProgress)
|
| + IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordAutofillAgentConstructed,
|
| + SendLoggingAvailability)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP()
|
| return handled;
|
|
|