Chromium Code Reviews| 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])) |