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

Unified Diff: chrome/browser/autofill/autofill_manager.cc

Issue 2842062: AutoFill: Record whether the user initiated the form submission and don't save form data if the form (Closed)
Patch Set: Relax DCHECK. Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_manager.cc
diff --git a/chrome/browser/autofill/autofill_manager.cc b/chrome/browser/autofill/autofill_manager.cc
index 127cc563655711ae8881ec8175ee90a1968cdac4..36ca761a131f11005f5f961710d5460245cba011 100644
--- a/chrome/browser/autofill/autofill_manager.cc
+++ b/chrome/browser/autofill/autofill_manager.cc
@@ -117,6 +117,10 @@ void AutoFillManager::FormSubmitted(const FormData& form) {
if (tab_contents_->profile()->IsOffTheRecord())
return;
+ // Don't save data that was submitted through JavaScript.
+ if (!form.user_submitted)
+ return;
+
// Grab a copy of the form data.
upload_form_structure_.reset(new FormStructure(form));
« no previous file with comments | « no previous file | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698