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..398ee4d43a0c7ba84d93a168e903157a1cc79287 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, |
+ PasswordManagerClient* password_manager_client, |
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_client, |
app_locale, |
enable_download_manager)); |
} |
@@ -56,12 +58,16 @@ AutofillDriverImpl* AutofillDriverImpl::FromWebContents( |
AutofillDriverImpl::AutofillDriverImpl( |
content::WebContents* web_contents, |
autofill::AutofillManagerDelegate* delegate, |
+ PasswordManagerClient* password_manager_client, |
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_client, this)), |
request_autocomplete_manager_(this) { |
autofill_manager_->SetExternalDelegate(&autofill_external_delegate_); |
} |
@@ -140,14 +146,17 @@ void AutofillDriverImpl::RendererShouldAcceptDataListSuggestion( |
value)); |
} |
-void AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion( |
- const base::string16& username) { |
+void |
+AutofillDriverImpl::RendererShouldAcceptPasswordAutofillSuggestion( |
+ const base::string16& username, |
+ const base::string16& password) { |
if (!RendererIsAvailable()) |
return; |
content::RenderViewHost* host = web_contents()->GetRenderViewHost(); |
host->Send( |
new AutofillMsg_AcceptPasswordAutofillSuggestion(host->GetRoutingID(), |
- username)); |
+ username, |
+ password)); |
} |
void AutofillDriverImpl::RendererShouldClearFilledForm() { |