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

Unified Diff: components/omnibox/browser/zero_suggest_provider.cc

Issue 2963883002: Omnibox UI Experiments: Refactor HTTPS trimming into UrlFormatter. (Closed)
Patch Set: update comment Created 3 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
Index: components/omnibox/browser/zero_suggest_provider.cc
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc
index 11fe0a0e0caa9561f97c4f0d8b8b0c9ab4d50173..338afc14cadf6ce302cfd4f3b8e9db8a4edcbd55 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -375,8 +375,11 @@ AutocompleteMatch ZeroSuggestProvider::NavigationToMatch(
match.destination_url = navigation.url();
// Zero suggest results should always omit protocols and never appear bold.
- match.contents = AutocompleteMatch::FormatUrlForSuggestionDisplay(
- navigation.url(), true /* trim_scheme */, nullptr);
+ auto format_types =
+ AutocompleteMatch::GetFormatForSuggestionDisplay(true /* trim_scheme */);
+ match.contents = url_formatter::FormatUrl(navigation.url(), format_types,
+ net::UnescapeRule::SPACES, nullptr,
+ nullptr, nullptr);
match.fill_into_edit +=
AutocompleteInput::FormattedStringWithEquivalentMeaning(
navigation.url(), match.contents, client()->GetSchemeClassifier());

Powered by Google App Engine
This is Rietveld 408576698