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

Unified Diff: components/plugins/renderer/plugin_placeholder.cc

Issue 1233043003: Remove some legacy versions of StartsWith and EndsWith. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « components/plugins/renderer/mobile_youtube_plugin.cc ('k') | components/search/search.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/plugins/renderer/plugin_placeholder.cc
diff --git a/components/plugins/renderer/plugin_placeholder.cc b/components/plugins/renderer/plugin_placeholder.cc
index 113cf8e71ad3adb241ff1f9dc3fa383136e3502e..04ceb826cd825e89b1ea8ab0d10e708bb3f81d05 100644
--- a/components/plugins/renderer/plugin_placeholder.cc
+++ b/components/plugins/renderer/plugin_placeholder.cc
@@ -78,14 +78,15 @@ void PluginPlaceholderBase::HidePlugin() {
if (element.hasAttribute("width") && element.hasAttribute("height")) {
std::string width_str("width:[\\s]*");
width_str += element.getAttribute("width").utf8().data();
- if (base::EndsWith(width_str, "px", false)) {
+ if (base::EndsWith(width_str, "px", base::CompareCase::INSENSITIVE_ASCII)) {
width_str = width_str.substr(0, width_str.length() - 2);
}
base::TrimWhitespace(width_str, base::TRIM_TRAILING, &width_str);
width_str += "[\\s]*px";
std::string height_str("height:[\\s]*");
height_str += element.getAttribute("height").utf8().data();
- if (base::EndsWith(height_str, "px", false)) {
+ if (base::EndsWith(height_str, "px",
+ base::CompareCase::INSENSITIVE_ASCII)) {
height_str = height_str.substr(0, height_str.length() - 2);
}
base::TrimWhitespace(height_str, base::TRIM_TRAILING, &height_str);
« no previous file with comments | « components/plugins/renderer/mobile_youtube_plugin.cc ('k') | components/search/search.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698