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

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: Add a ping message renderer->browser for logging activity update 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..59bf8816bee1e934a456e7448224a7966ba0f68f 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_));
+ NotifyRendererAboutLoggingActivityState();
}
void ChromePasswordManagerClient::LogSavePasswordProgress(
@@ -251,6 +245,8 @@ bool ChromePasswordManagerClient::OnMessageReceived(
ShowPasswordEditingPopup)
IPC_MESSAGE_HANDLER(AutofillHostMsg_HidePasswordGenerationPopup,
HidePasswordGenerationPopup)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_UpdateLoggingState,
+ NotifyRendererAboutLoggingActivityState)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;
@@ -306,6 +302,16 @@ void ChromePasswordManagerClient::ShowPasswordEditingPopup(
#endif // defined(USE_AURA) || defined(OS_MACOSX)
}
+void ChromePasswordManagerClient::NotifyRendererAboutLoggingActivityState() {
Ilya Sherman 2014/06/14 00:50:39 Optional nit: "About" -> "Of" for a slightly short
vabr (Chromium) 2014/06/20 10:47:04 Done.
+ if (!web_contents())
+ return;
+
+ // Also inform the renderer process to start or stop logging.
Ilya Sherman 2014/06/14 00:50:39 nit: Please update this comment.
vabr (Chromium) 2014/06/20 10:47:04 Done. (Removed, since the whole method is just for
+ web_contents()->GetRenderViewHost()->Send(new AutofillMsg_ChangeLoggingState(
+ 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