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

Unified Diff: content/renderer/pepper/url_request_info_util.cc

Issue 1878083002: Implement IsAsciiUpper and IsAsciiLower in base/strings/string_util.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git sync Created 4 years, 8 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: content/renderer/pepper/url_request_info_util.cc
diff --git a/content/renderer/pepper/url_request_info_util.cc b/content/renderer/pepper/url_request_info_util.cc
index 157fc9c0ee18a318542f2a67e63a76f2222fd467..4d8aa14f55f658f21fee93a0e3b137b1634dac3a 100644
--- a/content/renderer/pepper/url_request_info_util.cc
+++ b/content/renderer/pepper/url_request_info_util.cc
@@ -113,8 +113,8 @@ std::string FilterStringForXRequestedWithValue(const std::string& s) {
char c = s[i];
// Allow ASCII digits, letters, periods, commas, and underscores. (Ignore
// all other characters.)
- if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') ||
- (c >= 'a' && c <= 'z') || (c == '.') || (c == ',') || (c == '_'))
+ if (base::IsAsciiDigit(c) || base::IsAsciiAlpha(c) || (c == '.') ||
+ (c == ',') || (c == '_'))
rv.push_back(c);
}
return rv;

Powered by Google App Engine
This is Rietveld 408576698