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

Unified Diff: components/autofill/core/common/autofill_util.cc

Issue 2411333004: Make HasAutocompleteAttributeValue handle multi-valued strings (Closed)
Patch Set: Created 4 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
Index: components/autofill/core/common/autofill_util.cc
diff --git a/components/autofill/core/common/autofill_util.cc b/components/autofill/core/common/autofill_util.cc
index faf019e8cdbecb36a56069c90ca5113bf30f1746..b0a29d9f14d7f3fd8210dbee47b9afb026cceb44 100644
--- a/components/autofill/core/common/autofill_util.cc
+++ b/components/autofill/core/common/autofill_util.cc
@@ -132,4 +132,11 @@ void SetCheckStatus(FormFieldData* form_field_data,
}
}
+std::vector<std::string> LowercaseAndTokenizeAttributeString(
+ const std::string& attribute) {
+ return base::SplitString(base::ToLowerASCII(attribute),
+ base::kWhitespaceASCII, base::KEEP_WHITESPACE,
vabr (Chromium) 2016/10/13 12:49:31 I'm curious about the KEEP_WHITESPACE: Because whi
jdoerrie 2016/10/13 13:45:07 I agree, changed it to TRIM_WHITESPACE.
+ base::SPLIT_WANT_NONEMPTY);
+}
+
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698