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

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

Issue 688543002: [Autofill] Don't save autocomplete text entered into fields with autocomplete="off" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | components/autofill/core/browser/autocomplete_history_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/autocomplete_history_manager.cc
diff --git a/components/autofill/core/browser/autocomplete_history_manager.cc b/components/autofill/core/browser/autocomplete_history_manager.cc
index 5b8bbb48644b12c40c06c7216339a7f4787204a9..e7081c0f9053b3d2967690233e72c83b7b3d90a9 100644
--- a/components/autofill/core/browser/autocomplete_history_manager.cc
+++ b/components/autofill/core/browser/autocomplete_history_manager.cc
@@ -126,6 +126,7 @@ void AutocompleteHistoryManager::OnFormSubmitted(const FormData& form) {
// - non-empty name
// - non-empty value
// - text field
+ // - autocomplete is not disabled
// - value is not a credit card number
// - value is not a SSN
std::vector<FormFieldData> values;
@@ -135,6 +136,7 @@ void AutocompleteHistoryManager::OnFormSubmitted(const FormData& form) {
if (!iter->value.empty() &&
!iter->name.empty() &&
IsTextField(*iter) &&
+ iter->should_autocomplete &&
!autofill::IsValidCreditCardNumber(iter->value) &&
!autofill::IsSSN(iter->value)) {
values.push_back(*iter);
« no previous file with comments | « no previous file | components/autofill/core/browser/autocomplete_history_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698