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

Unified Diff: chrome/browser/password_manager/chrome_password_manager_client.cc

Issue 336763002: Password internals page: notify renderer about logging state on client construction (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 6 years, 6 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/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);

Powered by Google App Engine
This is Rietveld 408576698