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

Side by Side Diff: components/autofill/core/common/autofill_util.cc

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/autofill/core/common/autofill_util.h" 5 #include "components/autofill/core/common/autofill_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector>
9 8
10 #include "base/command_line.h" 9 #include "base/command_line.h"
11 #include "base/i18n/case_conversion.h" 10 #include "base/i18n/case_conversion.h"
12 #include "base/metrics/field_trial.h" 11 #include "base/metrics/field_trial.h"
13 #include "base/strings/string_piece.h" 12 #include "base/strings/string_piece.h"
14 #include "base/strings/string_split.h" 13 #include "base/strings/string_split.h"
15 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
16 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
17 #include "build/build_config.h" 16 #include "build/build_config.h"
18 #include "components/autofill/core/common/autofill_switches.h" 17 #include "components/autofill/core/common/autofill_switches.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } else { 124 } else {
126 if (isCheckable) { 125 if (isCheckable) {
127 form_field_data->check_status = 126 form_field_data->check_status =
128 FormFieldData::CheckStatus::CHECKABLE_BUT_UNCHECKED; 127 FormFieldData::CheckStatus::CHECKABLE_BUT_UNCHECKED;
129 } else { 128 } else {
130 form_field_data->check_status = FormFieldData::CheckStatus::NOT_CHECKABLE; 129 form_field_data->check_status = FormFieldData::CheckStatus::NOT_CHECKABLE;
131 } 130 }
132 } 131 }
133 } 132 }
134 133
134 std::vector<std::string> LowercaseAndTokenizeAttributeString(
135 const std::string& attribute) {
136 return base::SplitString(base::ToLowerASCII(attribute),
137 base::kWhitespaceASCII, base::TRIM_WHITESPACE,
138 base::SPLIT_WANT_NONEMPTY);
139 }
140
135 } // namespace autofill 141 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/common/autofill_util.h ('k') | components/autofill/core/common/autofill_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698