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)); |