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

Unified Diff: net/base/escape.cc

Issue 773373002: Update from https://crrev.com/306706 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/escape.h ('k') | net/base/mac/README » ('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 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);
}
« no previous file with comments | « net/base/escape.h ('k') | net/base/mac/README » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698