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

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

Issue 2680163006: Eliminate PasswordAutofillAgentConstructed() in mojo interface PasswordManagerDriver (Closed)
Patch Set: Created 3 years, 10 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: 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 bdb9361bb0d4e59cc27bff2ced8df2865d9756d8..6fbb0d17d0c0aff67017684da6a8dce746413e2d 100644
--- a/components/password_manager/content/browser/content_password_manager_driver.cc
+++ b/components/password_manager/content/browser/content_password_manager_driver.cc
@@ -43,6 +43,17 @@ ContentPasswordManagerDriver::ContentPasswordManagerDriver(
// for this WebContents.
VisiblePasswordObserver::CreateForWebContents(
content::WebContents::FromRenderFrameHost(render_frame_host_));
+
+ // For some frames |this| may be instantiated before log manager creation, so
+ // here we can not send logging state to renderer process for them. For such
+ // cases, after the log manager got ready later,
+ // ContentPasswordManagerDriverFactory::RequestSendLoggingAvailability() will
+ // call ContentPasswordManagerDriver::SendLoggingAvailability() on |this| to
+ // do it actually.
+ if (client_->GetLogManager()) {
+ GetPasswordAutofillAgent()->SetLoggingState(
vabr (Chromium) 2017/02/12 18:48:12 I acknowledge that calling the SetLoggingState her
leonhsl(Using Gerrit) 2017/02/13 00:14:32 Done.
+ client_->GetLogManager()->IsLoggingActive());
+ }
}
ContentPasswordManagerDriver::~ContentPasswordManagerDriver() {
@@ -278,10 +289,6 @@ void ContentPasswordManagerDriver::ShowNotSecureWarning(
password_autofill_manager_.OnShowNotSecureWarning(text_direction, bounds);
}
-void ContentPasswordManagerDriver::PasswordAutofillAgentConstructed() {
- SendLoggingAvailability();
-}
-
void ContentPasswordManagerDriver::RecordSavePasswordProgress(
const std::string& log) {
client_->GetLogManager()->LogSavePasswordProgress(log);

Powered by Google App Engine
This is Rietveld 408576698