Chromium Code Reviews| 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); |