Index: net/base/escape.cc |
diff --git a/net/base/escape.cc b/net/base/escape.cc |
index 7a068f87ee571ce555d5f063b7a0101ef280d1de..05cc2b591a44dc12185bec176b79f54be203b171 100644 |
--- a/net/base/escape.cc |
+++ b/net/base/escape.cc |
@@ -318,6 +318,14 @@ static const Charmap kPathCharmap = {{ |
0xffffffffL, 0xffffffffL, 0xffffffffL, 0xffffffffL |
}}; |
+#if defined(OS_MACOSX) |
+// non-printable, non-7bit, and (including space) "#%<>[\]^`{|} |
+static const Charmap kNSURLCharmap = {{ |
+ 0xffffffffL, 0x5000002dL, 0x78000000L, 0xb8000001L, |
+ 0xffffffffL, 0xffffffffL, 0xffffffffL, 0xffffffffL |
+}}; |
+#endif // defined(OS_MACOSX) |
+ |
// non-printable, non-7bit, and (including space) ?>=<;+'&%$#"![\]^`{|} |
static const Charmap kUrlEscape = {{ |
0xffffffffL, 0xf80008fdL, 0x78000001L, 0xb8000001L, |
@@ -347,6 +355,12 @@ std::string EscapePath(const std::string& path) { |
return Escape(path, kPathCharmap, false); |
} |
+#if defined(OS_MACOSX) |
+std::string EscapeNSURLPrecursor(const std::string& precursor) { |
+ return Escape(precursor, kNSURLCharmap, false, true); |
+} |
+#endif // defined(OS_MACOSX) |
+ |
std::string EscapeUrlEncodedData(const std::string& path, bool use_plus) { |
return Escape(path, kUrlEscape, use_plus); |
} |