diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-09 21:02:31 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-09 21:02:31 +0000 |
commit | 30426c385b563f5014e81110b1f0d98c58100847 (patch) | |
tree | 274fb3dc5bad45f430b76b72e007f21edd600f9a /net/base | |
parent | f09d55d9bcd61359dc0fafcad4158d9946cd674e (diff) | |
download | chromium_src-30426c385b563f5014e81110b1f0d98c58100847.zip chromium_src-30426c385b563f5014e81110b1f0d98c58100847.tar.gz chromium_src-30426c385b563f5014e81110b1f0d98c58100847.tar.bz2 |
net: Move the last two Escape() functions into the net namespace.
BUG=64263
TEST=None
R=willchan@chromium.org
Review URL: http://codereview.chromium.org/8507011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109298 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/escape.cc | 4 | ||||
-rw-r--r-- | net/base/escape.h | 26 |
2 files changed, 15 insertions, 15 deletions
diff --git a/net/base/escape.cc b/net/base/escape.cc index 830d5c2..f607a0e 100644 --- a/net/base/escape.cc +++ b/net/base/escape.cc @@ -249,6 +249,8 @@ static const Charmap kExternalHandlerCharmap( } // namespace +namespace net { + std::string EscapePath(const std::string& path) { return Escape(path, kPathCharmap, false); } @@ -257,8 +259,6 @@ std::string EscapeUrlEncodedData(const std::string& path, bool use_plus) { return Escape(path, kUrlEscape, use_plus); } -namespace net { - std::string EscapeNonASCII(const std::string& input) { return Escape(input, kNonASCIICharmap, false); } diff --git a/net/base/escape.h b/net/base/escape.h index 0d2684a..9720a8d 100644 --- a/net/base/escape.h +++ b/net/base/escape.h @@ -13,19 +13,6 @@ #include "base/string16.h" #include "net/base/net_export.h" -// Escaping -------------------------------------------------------------------- - -// Escape a file. This includes: -// non-printable, non-7bit, and (including space) "#%:<>?[\]^`{|} -NET_EXPORT std::string EscapePath(const std::string& path); - -// Escape application/x-www-form-urlencoded content. This includes: -// non-printable, non-7bit, and (including space) ?>=<;+'&%$#"![\]^`{|} -// Space is escaped as + (if use_plus is true) and other special characters -// as %XX (hex). -NET_EXPORT std::string EscapeUrlEncodedData(const std::string& path, - bool use_plus); - // Unescaping ------------------------------------------------------------------ class UnescapeRule { @@ -70,6 +57,19 @@ class UnescapeRule { namespace net { +// Escaping -------------------------------------------------------------------- + +// escape a file. this includes: +// non-printable, non-7bit, and (including space) "#%:<>?[\]^`{|} +NET_EXPORT std::string EscapePath(const std::string& path); + +// Escape application/x-www-form-urlencoded content. This includes: +// non-printable, non-7bit, and (including space) ?>=<;+'&%$#"![\]^`{|} +// Space is escaped as + (if use_plus is true) and other special characters +// as %XX (hex). +NET_EXPORT std::string EscapeUrlEncodedData(const std::string& path, + bool use_plus); + // Escape all non-ASCII input. NET_EXPORT std::string EscapeNonASCII(const std::string& input); |