Index: components/autofill/content/browser/autofill_driver_impl.cc |
diff --git a/components/autofill/content/browser/autofill_driver_impl.cc b/components/autofill/content/browser/autofill_driver_impl.cc |
index 359a2dd25aefde25f425b4aed213a83126e8a58e..895140c6ca9f4e0c4db18a25cf6f3199bc71058f 100644 |
--- a/components/autofill/content/browser/autofill_driver_impl.cc |
+++ b/components/autofill/content/browser/autofill_driver_impl.cc |
@@ -34,6 +34,7 @@ const char kAutofillDriverImplWebContentsUserDataKey[] = |
void AutofillDriverImpl::CreateForWebContentsAndDelegate( |
content::WebContents* contents, |
autofill::AutofillManagerDelegate* delegate, |
+ PasswordManagerDriver* password_manager_driver, |
const std::string& app_locale, |
AutofillManager::AutofillDownloadManagerState enable_download_manager) { |
if (FromWebContents(contents)) |
@@ -42,6 +43,7 @@ void AutofillDriverImpl::CreateForWebContentsAndDelegate( |
contents->SetUserData(kAutofillDriverImplWebContentsUserDataKey, |
new AutofillDriverImpl(contents, |
delegate, |
+ password_manager_driver, |
app_locale, |
enable_download_manager)); |
} |
@@ -56,12 +58,16 @@ AutofillDriverImpl* AutofillDriverImpl::FromWebContents( |
AutofillDriverImpl::AutofillDriverImpl( |
content::WebContents* web_contents, |
autofill::AutofillManagerDelegate* delegate, |
+ PasswordManagerDriver* password_manager_driver, |
const std::string& app_locale, |
AutofillManager::AutofillDownloadManagerState enable_download_manager) |
: content::WebContentsObserver(web_contents), |
autofill_manager_(new AutofillManager( |
this, delegate, app_locale, enable_download_manager)), |
- autofill_external_delegate_(autofill_manager_.get(), this), |
+ autofill_external_delegate_( |
+ autofill_manager_.get(), |
+ this, |
+ new PasswordAutofillManager(password_manager_driver)), |
request_autocomplete_manager_(this) { |
autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); |
} |
@@ -140,16 +146,6 @@ void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion( |
value)); |
} |
-void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion( |
- const base::string16& username) { |
- if (!RendererIsAvailable()) |
- return; |
- content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
- host->Send( |
- new AutofillMsg_AcceptPasswordAutofillSuggestion(host->GetRoutingID(), |
- username)); |
-} |
- |
void AutofillDriverImpl::RendererShouldClearFilledForm() { |
if (!RendererIsAvailable()) |
return; |