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

Unified Diff: components/autofill/content/browser/autofill_driver_impl.cc

Issue 184103016: Autofill: Refactoring to support fetching password after a username is selected (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/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;

Powered by Google App Engine
This is Rietveld 408576698