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

Unified Diff: components/password_manager/content/browser/content_password_manager_driver.cc

Issue 1415533013: Fix password manager internals renderer reporting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Separate dummy log manager Created 5 years, 1 month 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: 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..52c5a0d78db4526b79625626c0b3f2ad53018011 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,8 @@
#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/log_manager.h"
+#include "components/password_manager/core/browser/password_manager.h"
vasilii 2015/11/13 12:17:31 Why do you need this guy here?
vabr (Chromium) 2015/11/13 20:48:18 Line 184 (existing code) calls a method of the Pas
#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 +35,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 +115,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() {
vasilii 2015/11/13 12:17:31 Declaration order should match the definition orde
vabr (Chromium) 2015/11/13 20:48:18 Done.
+ render_frame_host_->Send(new AutofillMsg_SetLoggingState(
+ render_frame_host_->GetRoutingID(), logging_available_));
+}
+
PasswordGenerationManager*
ContentPasswordManagerDriver::GetPasswordGenerationManager() {
return &password_generation_manager_;
@@ -145,8 +159,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_->GetLogManager(),
+ LogManager::LogSavePasswordProgress)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordAutofillAgentConstructed,
+ SendLoggingAvailability)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
return handled;

Powered by Google App Engine
This is Rietveld 408576698