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

Unified Diff: url/url_util.cc

Issue 23526048: Support URL fragment resolution againt non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clea Created 7 years, 3 months 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 | « url/url_util.h ('k') | url/url_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_util.cc
diff --git a/url/url_util.cc b/url/url_util.cc
index f16af98db85cc986a50af25630efa29da227d741..dc1d935ccdfc0a5b4e25be452475904429e96803 100644
--- a/url/url_util.cc
+++ b/url/url_util.cc
@@ -123,7 +123,8 @@ template<typename CHAR>
bool DoCanonicalize(const CHAR* in_spec, int in_spec_len,
url_canon::CharsetConverter* charset_converter,
url_canon::CanonOutput* output,
- url_parse::Parsed* output_parsed) {
+ url_parse::Parsed* output_parsed,
+ bool trim_tail = true) {
// Remove any whitespace from the middle of the relative URL, possibly
// copying to the new buffer.
url_canon::RawCanonOutputT<CHAR> whitespace_buffer;
@@ -188,7 +189,7 @@ bool DoCanonicalize(const CHAR* in_spec, int in_spec_len,
} else {
// "Weird" URLs like data: and javascript:
- url_parse::ParsePathURL(spec, spec_len, &parsed_input);
+ url_parse::ParsePathURL(spec, spec_len, &parsed_input, trim_tail);
success = url_canon::CanonicalizePathURL(spec, spec_len, parsed_input,
output, output_parsed);
}
@@ -431,18 +432,21 @@ bool Canonicalize(const char* spec,
int spec_len,
url_canon::CharsetConverter* charset_converter,
url_canon::CanonOutput* output,
- url_parse::Parsed* output_parsed) {
+ url_parse::Parsed* output_parsed,
+ bool trim_tail) {
return DoCanonicalize(spec, spec_len, charset_converter,
- output, output_parsed);
+ output, output_parsed,
+ trim_tail);
}
bool Canonicalize(const base::char16* spec,
int spec_len,
url_canon::CharsetConverter* charset_converter,
url_canon::CanonOutput* output,
- url_parse::Parsed* output_parsed) {
+ url_parse::Parsed* output_parsed,
+ bool trim_tail) {
return DoCanonicalize(spec, spec_len, charset_converter,
- output, output_parsed);
+ output, output_parsed, trim_tail);
}
bool ResolveRelative(const char* base_spec,
« no previous file with comments | « url/url_util.h ('k') | url/url_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698