| Index: chrome/browser/net/url_fixer_upper.cc
|
| diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc
|
| index 2e025fcd6ee3b5452d684a482a18c6fc602cb50e..f295fd639016b5296766849ca2293e219268d80b 100644
|
| --- a/chrome/browser/net/url_fixer_upper.cc
|
| +++ b/chrome/browser/net/url_fixer_upper.cc
|
| @@ -412,6 +412,13 @@ std::string URLFixerUpper::SegmentURL(const std::string& text,
|
| url_parse::Component(0, static_cast<int>(scheme.length())))))
|
| return scheme;
|
|
|
| + if (scheme == chrome::kFileSystemScheme) {
|
| + // Have the GURL parser do the heavy lifting for us.
|
| + url_parse::ParseFileSystemURL(text.data(),
|
| + static_cast<int>(text.length()), parts);
|
| + return scheme;
|
| + }
|
| +
|
| if (parts->scheme.is_valid()) {
|
| // Have the GURL parser do the heavy lifting for us.
|
| url_parse::ParseStandardURL(text.data(), static_cast<int>(text.length()),
|
| @@ -478,6 +485,13 @@ GURL URLFixerUpper::FixupURL(const std::string& text,
|
| if (scheme == chrome::kFileScheme)
|
| return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
|
|
|
| + // We handle the filesystem scheme separately.
|
| + if (scheme == chrome::kFileSystemScheme) {
|
| + if (parts.inner_parsed() && parts.inner_parsed()->scheme.is_valid())
|
| + return GURL(text);
|
| + return GURL();
|
| + }
|
| +
|
| // Parse and rebuild about: and chrome: URLs, except about:blank.
|
| bool chrome_url = !LowerCaseEqualsASCII(trimmed, chrome::kAboutBlankURL) &&
|
| ((scheme == chrome::kAboutScheme) || (scheme == chrome::kChromeUIScheme));
|
|
|