| Index: components/omnibox/browser/history_url_provider.cc
|
| diff --git a/components/omnibox/browser/history_url_provider.cc b/components/omnibox/browser/history_url_provider.cc
|
| index ed391c9a21932d0cf29c89abd33773372ac1cdc8..d9f6b7e887db0827d39ba5cba82a1fbc7e936936 100644
|
| --- a/components/omnibox/browser/history_url_provider.cc
|
| +++ b/components/omnibox/browser/history_url_provider.cc
|
| @@ -571,10 +571,9 @@ AutocompleteMatch HistoryURLProvider::SuggestExactInput(
|
| // Trim off "http://" if the user didn't type it.
|
| DCHECK(!trim_http ||
|
| !AutocompleteInput::HasHTTPScheme(input.text()));
|
| - base::string16 display_string(url_formatter::FormatUrl(
|
| - destination_url,
|
| - url_formatter::kFormatUrlOmitAll & ~url_formatter::kFormatUrlOmitHTTP,
|
| - net::UnescapeRule::SPACES, nullptr, nullptr, nullptr));
|
| + base::string16 display_string(
|
| + AutocompleteMatch::FormatUrlForSuggestionDisplay(
|
| + destination_url, false /* trim_scheme */, nullptr));
|
| const size_t offset = trim_http ? TrimHttpPrefix(&display_string) : 0;
|
| match.fill_into_edit =
|
| AutocompleteInput::FormattedStringWithEquivalentMeaning(
|
| @@ -1174,9 +1173,9 @@ AutocompleteMatch HistoryURLProvider::HistoryMatchToACMatch(
|
| (inline_autocomplete_offset >= match.fill_into_edit.length()));
|
|
|
| size_t match_start = history_match.input_location;
|
| - match.contents = url_formatter::FormatUrl(info.url(), format_types,
|
| - net::UnescapeRule::SPACES, nullptr,
|
| - nullptr, &match_start);
|
| + match.contents = AutocompleteMatch::FormatUrlForSuggestionDisplay(
|
| + info.url(), params.trim_http && !history_match.match_in_scheme,
|
| + &match_start);
|
| if ((match_start != base::string16::npos) && autocomplete_offset_valid &&
|
| (inline_autocomplete_offset != match_start)) {
|
| DCHECK(inline_autocomplete_offset > match_start);
|
|
|