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

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

Issue 2963883002: Omnibox UI Experiments: Refactor HTTPS trimming into UrlFormatter. (Closed)
Patch Set: fix 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
« no previous file with comments | « components/omnibox/browser/titled_url_match_utils.cc ('k') | components/url_formatter/url_formatter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..45e7d86b1172c646767a6874edd5866065ef9424 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -375,8 +375,10 @@ 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::GetFormatTypes(true);
+ 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());
« no previous file with comments | « components/omnibox/browser/titled_url_match_utils.cc ('k') | components/url_formatter/url_formatter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698