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

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

Issue 2411333004: Make HasAutocompleteAttributeValue handle multi-valued strings (Closed)
Patch Set: Make HasAutocompleteAttributeValue handle multi-valued strings 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.h
diff --git a/components/autofill/core/common/autofill_util.h b/components/autofill/core/common/autofill_util.h
index 519b3cbe4f3b33563352796517d30fee1a4f7396..fccd473af203a6aaa5ce9d2a8038684437e50071 100644
--- a/components/autofill/core/common/autofill_util.h
+++ b/components/autofill/core/common/autofill_util.h
@@ -7,6 +7,9 @@
#include <stddef.h>
+#include <string>
+#include <vector>
+
#include "base/strings/string16.h"
#include "components/autofill/core/common/form_field_data.h"
@@ -51,6 +54,12 @@ void SetCheckStatus(FormFieldData* form_field_data,
bool isCheckable,
bool isChecked);
+// Lowercases and tokenizes a given |attribute| string.
+// Considers any ASCII whitespace character as a possible separator.
+// Also ignores empty tokens, resulting in a collapsing of whitespace.
+std::vector<std::string> LowercaseAndTokenizeAttributeString(
+ const std::string& attribute);
+
} // namespace autofill
#endif // COMPONENTS_AUTOFILL_CORE_COMMON_AUTOFILL_UTIL_H_
« no previous file with comments | « components/autofill/core/browser/form_structure.cc ('k') | components/autofill/core/common/autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698