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

Unified Diff: url/url_parse_internal.h

Issue 23835019: Support URL fragment resolution againt non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: actually restore PS4 this time Created 7 years, 1 month 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
Index: url/url_parse_internal.h
diff --git a/url/url_parse_internal.h b/url/url_parse_internal.h
index 9c2b2b6889a93d50ad4a4e2f2a5473c42361c61a..d7a7ed5475aa5c21dd70251c9e67a6c112e2c2d1 100644
--- a/url/url_parse_internal.h
+++ b/url/url_parse_internal.h
@@ -28,11 +28,15 @@ inline bool ShouldTrimFromURL(base::char16 ch) {
// in the input string (so the string starts at character |*begin| in the spec,
// and goes until |*len|).
template<typename CHAR>
-inline void TrimURL(const CHAR* spec, int* begin, int* len) {
+inline void TrimURL(const CHAR* spec, int* begin, int* len,
+ bool trim_path_end = true) {
// Strip leading whitespace and control characters.
while (*begin < *len && ShouldTrimFromURL(spec[*begin]))
(*begin)++;
+ if (!trim_path_end)
brettw 2013/11/20 00:03:51 This would read a little easier for me with e cond
joth 2013/11/21 00:08:45 Done.
+ return;
+
// Strip trailing whitespace and control characters. We need the >i test for
// when the input string is all blanks; we don't want to back past the input.
while (*len > *begin && ShouldTrimFromURL(spec[*len - 1]))

Powered by Google App Engine
This is Rietveld 408576698