summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorbrg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 22:40:27 +0000
committerbrg@chromium.com <brg@chromium.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-01 22:40:27 +0000
commit6e7a37818c0bffbd6cd2f500c37185f76d817337 (patch)
treef6adf9d42d648aa40dc61d99966686ef74a4847c /net
parent62d30f47055262ff3793ef0404e3de051680e8c9 (diff)
downloadchromium_src-6e7a37818c0bffbd6cd2f500c37185f76d817337.zip
chromium_src-6e7a37818c0bffbd6cd2f500c37185f76d817337.tar.gz
chromium_src-6e7a37818c0bffbd6cd2f500c37185f76d817337.tar.bz2
Rename EscapeUrl and expand the code comment.
BUG=none TEST=Escape.EscapeUrlEncodedData Review URL: http://codereview.chromium.org/257021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27782 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/base/escape.cc2
-rw-r--r--net/base/escape.h4
-rw-r--r--net/base/escape_unittest.cc4
3 files changed, 5 insertions, 5 deletions
diff --git a/net/base/escape.cc b/net/base/escape.cc
index 18b2e0b..615f062 100644
--- a/net/base/escape.cc
+++ b/net/base/escape.cc
@@ -192,7 +192,7 @@ static const Charmap kUrlEscape(
0xffffffffL, 0xffffffffL, 0xffffffffL, 0xffffffffL
);
-std::string EscapeUrl(const std::string& path) {
+std::string EscapeUrlEncodedData(const std::string& path) {
return Escape(path, kUrlEscape, true);
}
diff --git a/net/base/escape.h b/net/base/escape.h
index 597755f..8761d4d 100644
--- a/net/base/escape.h
+++ b/net/base/escape.h
@@ -15,10 +15,10 @@
// non-printable, non-7bit, and (including space) "#%:<>?[\]^`{|}
std::string EscapePath(const std::string& path);
-// Escape an url. This includes:
+// Escape application/x-www-form-urlencoded content. This includes:
// non-printable, non-7bit, and (including space) ?>=<;+'&%$#"![\]^`{|}
// Space is escaped as + and other special characters as %XX (hex).
-std::string EscapeUrl(const std::string& path);
+std::string EscapeUrlEncodedData(const std::string& path);
// Escape all non-ASCII input.
std::string EscapeNonASCII(const std::string& input);
diff --git a/net/base/escape_unittest.cc b/net/base/escape_unittest.cc
index 6601edc..3a9ed70 100644
--- a/net/base/escape_unittest.cc
+++ b/net/base/escape_unittest.cc
@@ -107,10 +107,10 @@ TEST(Escape, EscapePath) {
"%7B%7C%7D~%7F%80%FF");
}
-TEST(Escape, EscapeUrl) {
+TEST(Escape, EscapeUrlEncodedData) {
ASSERT_EQ(
// Most of the character space we care about, un-escaped
- EscapeUrl(
+ EscapeUrlEncodedData(
"\x02\n\x1d !\"#$%&'()*+,-./0123456789:;"
"<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"[\\]^_`abcdefghijklmnopqrstuvwxyz"