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

Unified Diff: net/base/escape.cc

Issue 1200053004: Move more string_util functions to base namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « net/base/data_url.cc ('k') | net/base/mime_sniffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/escape.cc
diff --git a/net/base/escape.cc b/net/base/escape.cc
index 8e6f870fa8b7beca15ab608136148193230892a7..972c285d6a3e80e62141bf8a3ec3c49f71b3a93d 100644
--- a/net/base/escape.cc
+++ b/net/base/escape.cc
@@ -52,7 +52,7 @@ std::string Escape(const std::string& text,
if (use_plus && ' ' == c) {
escaped.push_back('+');
} else if (keep_escaped && '%' == c && i + 2 < text.length() &&
- IsHexDigit(text[i + 1]) && IsHexDigit(text[i + 2])) {
+ base::IsHexDigit(text[i + 1]) && base::IsHexDigit(text[i + 2])) {
escaped.push_back('%');
} else if (charmap.Contains(c)) {
escaped.push_back('%');
@@ -118,9 +118,9 @@ bool UnescapeUnsignedCharAtIndex(const STR& escaped_text,
static_cast<typename STR::value_type>(escaped_text[index + 1]));
const typename STR::value_type least_sig_digit(
static_cast<typename STR::value_type>(escaped_text[index + 2]));
- if (IsHexDigit(most_sig_digit) && IsHexDigit(least_sig_digit)) {
- *value = HexDigitToInt(most_sig_digit) * 16 +
- HexDigitToInt(least_sig_digit);
+ if (base::IsHexDigit(most_sig_digit) && base::IsHexDigit(least_sig_digit)) {
+ *value = base::HexDigitToInt(most_sig_digit) * 16 +
+ base::HexDigitToInt(least_sig_digit);
return true;
}
return false;
« no previous file with comments | « net/base/data_url.cc ('k') | net/base/mime_sniffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698