Chromium Code Reviews| 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 != ':') |
| + inserted_text.append(url::kStandardSchemeSeparator); // Add "://". |
|
Peter Kasting
2016/10/05 00:56:30
Nit: After your explanation, I understand why this
brettw
2016/10/05 05:10:12
I did the second.
|
| std::string text_to_parse(text->begin(), first_nonwhite); |
| text_to_parse.append(inserted_text); |
| text_to_parse.append(first_nonwhite, text->end()); |