Index: components/url_formatter/url_fixer.cc |
diff --git a/components/url_formatter/url_fixer.cc b/components/url_formatter/url_fixer.cc |
index 53abe4e0c4a910aa2a065160af3f35c0533352be..cf60f43d3b57874a0ebe1c5ccda1e2817ea3e961 100644 |
--- a/components/url_formatter/url_fixer.cc |
+++ b/components/url_formatter/url_fixer.cc |
@@ -480,7 +480,8 @@ std::string SegmentURLInternal(std::string* text, url::Parsed* parts) { |
// Construct the text to parse by inserting the scheme. |
std::string inserted_text(scheme); |
- inserted_text.append(url::kStandardSchemeSeparator); |
+ if (first_nonwhite == text->end() || *first_nonwhite != ':') |
Peter Kasting
2016/09/29 04:54:12
Not sure I really understand this change. Why con
|
+ inserted_text.append(url::kStandardSchemeSeparator); // Add "://". |
std::string text_to_parse(text->begin(), first_nonwhite); |
text_to_parse.append(inserted_text); |
text_to_parse.append(first_nonwhite, text->end()); |