Index: chrome/browser/password_manager/chrome_password_manager_client.cc |
diff --git a/chrome/browser/password_manager/chrome_password_manager_client.cc b/chrome/browser/password_manager/chrome_password_manager_client.cc |
index 52587233e8b435c41ed9917385372a5ad98e1f6c..48b26be65deddf98443c055936c09d188a84139e 100644 |
--- a/chrome/browser/password_manager/chrome_password_manager_client.cc |
+++ b/chrome/browser/password_manager/chrome_password_manager_client.cc |
@@ -189,13 +189,7 @@ void ChromePasswordManagerClient::OnLogRouterAvailabilityChanged( |
return; |
can_use_log_router_ = router_can_be_used; |
- if (!web_contents()) |
- return; |
- |
- // Also inform the renderer process to start or stop logging. |
- web_contents()->GetRenderViewHost()->Send(new AutofillMsg_ChangeLoggingState( |
- web_contents()->GetRenderViewHost()->GetRoutingID(), |
- can_use_log_router_)); |
+ NotifyRendererOfLoggingAvailability(); |
} |
void ChromePasswordManagerClient::LogSavePasswordProgress( |
@@ -251,6 +245,8 @@ bool ChromePasswordManagerClient::OnMessageReceived( |
ShowPasswordEditingPopup) |
IPC_MESSAGE_HANDLER(AutofillHostMsg_HidePasswordGenerationPopup, |
HidePasswordGenerationPopup) |
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordAutofillAgentConstructed, |
+ NotifyRendererOfLoggingAvailability) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -306,6 +302,15 @@ void ChromePasswordManagerClient::ShowPasswordEditingPopup( |
#endif // defined(USE_AURA) || defined(OS_MACOSX) |
} |
+void ChromePasswordManagerClient::NotifyRendererOfLoggingAvailability() { |
+ if (!web_contents()) |
+ return; |
+ |
+ web_contents()->GetRenderViewHost()->Send(new AutofillMsg_SetLoggingState( |
+ web_contents()->GetRenderViewHost()->GetRoutingID(), |
+ can_use_log_router_)); |
+} |
+ |
void ChromePasswordManagerClient::CommitFillPasswordForm( |
autofill::PasswordFormFillData* data) { |
driver_.FillPasswordForm(*data); |