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

Unified Diff: components/autofill/content/renderer/form_autofill_util.cc

Issue 2231753002: components: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: One more call site Created 4 years, 4 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/content/renderer/form_cache.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/form_autofill_util.cc
diff --git a/components/autofill/content/renderer/form_autofill_util.cc b/components/autofill/content/renderer/form_autofill_util.cc
index 35b23c2a5992665d1cd97c23669ea71554befe18..3de92a1d6cc1b9e83afae01b49ab6aeac2273459 100644
--- a/components/autofill/content/renderer/form_autofill_util.cc
+++ b/components/autofill/content/renderer/form_autofill_util.cc
@@ -229,7 +229,7 @@ base::string16 FindChildTextInner(const WebNode& node,
return base::string16();
}
- if (element.hasHTMLTagName("div") && ContainsKey(divs_to_skip, node))
+ if (element.hasHTMLTagName("div") && base::ContainsKey(divs_to_skip, node))
return base::string16();
}
@@ -675,9 +675,11 @@ std::vector<std::string> AncestorTagNames(
bool IsLabelValid(base::StringPiece16 inferred_label,
const std::vector<base::char16>& stop_words) {
// If |inferred_label| has any character other than those in |stop_words|.
- auto* first_non_stop_word = std::find_if(
- inferred_label.begin(), inferred_label.end(),
- [&stop_words](base::char16 c) { return !ContainsValue(stop_words, c); });
+ auto* first_non_stop_word =
+ std::find_if(inferred_label.begin(), inferred_label.end(),
+ [&stop_words](base::char16 c) {
+ return !base::ContainsValue(stop_words, c);
+ });
return first_non_stop_word != inferred_label.end();
}
@@ -707,7 +709,7 @@ base::string16 InferLabelForElement(const WebFormControlElement& element,
std::vector<std::string> tag_names = AncestorTagNames(element);
std::set<std::string> seen_tag_names;
for (const std::string& tag_name : tag_names) {
- if (ContainsKey(seen_tag_names, tag_name))
+ if (base::ContainsKey(seen_tag_names, tag_name))
continue;
seen_tag_names.insert(tag_name);
« no previous file with comments | « no previous file | components/autofill/content/renderer/form_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698