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

Unified Diff: components/autofill/core/browser/autofill_manager.cc

Issue 23432002: Generate passwords only for forms that autofill server marks as account creation forms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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/core/browser/autofill_manager.cc
diff --git a/components/autofill/core/browser/autofill_manager.cc b/components/autofill/core/browser/autofill_manager.cc
index 4c66699b8191cea5b268df8cd24d28ee40465556..b3d2c9b022bf4c4dffe9717865194258ce7f6977 100644
--- a/components/autofill/core/browser/autofill_manager.cc
+++ b/components/autofill/core/browser/autofill_manager.cc
@@ -20,6 +20,7 @@
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/sequenced_worker_pool.h"
+#include "chrome/browser/password_manager/password_generation_manager.h"
#include "components/autofill/content/browser/autocheckout/whitelist_manager.h"
#include "components/autofill/content/browser/autocheckout_manager.h"
#include "components/autofill/core/browser/autocomplete_history_manager.h"
@@ -744,6 +745,14 @@ void AutofillManager::OnLoadedServerPredictions(
page_meta_data.get(),
*metric_logger_);
+ // Forward form structures to the password generation manager to detect
+ // account creation form.
+ PasswordGenerationManager* manager =
+ PasswordGenerationManager::FromWebContents(driver_->GetWebContents());
+ if (manager) {
+ manager->DetectAccountCreationForms(form_structures_.get());
+ }
Ilya Sherman 2013/08/29 23:08:13 nit: No need for curly braces.
zysxqn 2013/09/03 23:00:20 NA now.
+
if (page_meta_data->IsInAutofillableFlow()) {
RenderViewHost* host = driver_->GetWebContents()->GetRenderViewHost();
if (host)

Powered by Google App Engine
This is Rietveld 408576698