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

Unified Diff: chrome/browser/net/url_fixer_upper.cc

Issue 7064052: Revert 88142 to fix sync_integration_tests offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 6 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 | « chrome/browser/net/url_fixer_upper.h ('k') | chrome/browser/net/url_fixer_upper_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/url_fixer_upper.cc
===================================================================
--- chrome/browser/net/url_fixer_upper.cc (revision 88158)
+++ chrome/browser/net/url_fixer_upper.cc (working copy)
@@ -406,10 +406,10 @@
chrome::kFtpScheme : chrome::kHttpScheme);
}
- // Proceed with about and chrome schemes, but not file or nonstandard schemes.
- if ((scheme != chrome::kAboutScheme) && (scheme != chrome::kChromeUIScheme) &&
- ((scheme == chrome::kFileScheme) || !url_util::IsStandard(scheme.c_str(),
- url_parse::Component(0, static_cast<int>(scheme.length())))))
+ // Not segmenting file schemes or nonstandard schemes.
+ if ((scheme == chrome::kFileScheme) ||
+ !url_util::IsStandard(scheme.c_str(),
+ url_parse::Component(0, static_cast<int>(scheme.length()))))
return scheme;
if (parts->scheme.is_valid()) {
@@ -427,7 +427,7 @@
// Construct the text to parse by inserting the scheme.
std::string inserted_text(scheme);
- inserted_text.append(chrome::kStandardSchemeSeparator);
+ inserted_text.append("://");
std::string text_to_parse(text.begin(), first_nonwhite);
text_to_parse.append(inserted_text);
text_to_parse.append(first_nonwhite, text.end());
@@ -478,16 +478,11 @@
if (scheme == chrome::kFileScheme)
return GURL(parts.scheme.is_valid() ? text : FixupPath(text));
- // Parse and rebuild about: and chrome: URLs, except about:blank.
- bool chrome_url = !LowerCaseEqualsASCII(trimmed, chrome::kAboutBlankURL) &&
- ((scheme == chrome::kAboutScheme) || (scheme == chrome::kChromeUIScheme));
-
// For some schemes whose layouts we understand, we rebuild it.
- if (chrome_url || url_util::IsStandard(scheme.c_str(),
+ if (url_util::IsStandard(scheme.c_str(),
url_parse::Component(0, static_cast<int>(scheme.length())))) {
- // Replace the about: scheme with the chrome: scheme.
- std::string url(chrome_url ? chrome::kChromeUIScheme : scheme);
- url.append(chrome::kStandardSchemeSeparator);
+ std::string url(scheme);
+ url.append("://");
// We need to check whether the |username| is valid because it is our
// responsibility to append the '@' to delineate the user information from
@@ -499,8 +494,6 @@
}
FixupHost(trimmed, parts.host, parts.scheme.is_valid(), desired_tld, &url);
- if (chrome_url && !parts.host.is_valid())
- url.append(chrome::kChromeUIDefaultHost);
FixupPort(trimmed, parts.port, &url);
FixupPath(trimmed, parts.path, &url);
FixupQuery(trimmed, parts.query, &url);
@@ -512,7 +505,7 @@
// In the worst-case, we insert a scheme if the URL lacks one.
if (!parts.scheme.is_valid()) {
std::string fixed_scheme(scheme);
- fixed_scheme.append(chrome::kStandardSchemeSeparator);
+ fixed_scheme.append("://");
trimmed.insert(0, fixed_scheme);
}
« no previous file with comments | « chrome/browser/net/url_fixer_upper.h ('k') | chrome/browser/net/url_fixer_upper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698