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

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

Issue 2940973002: Omnibox UI Experiments: Implement scheme-trimming for suggested URLs. (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') | no next file » | 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 e900253dea908cdf38408db6dd87c23635c9a763..11fe0a0e0caa9561f97c4f0d8b8b0c9ab4d50173 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -375,9 +375,8 @@ AutocompleteMatch ZeroSuggestProvider::NavigationToMatch(
match.destination_url = navigation.url();
// Zero suggest results should always omit protocols and never appear bold.
- match.contents = url_formatter::FormatUrl(
- navigation.url(), url_formatter::kFormatUrlOmitAll,
- net::UnescapeRule::SPACES, nullptr, nullptr, nullptr);
+ match.contents = AutocompleteMatch::FormatUrlForSuggestionDisplay(
+ navigation.url(), true /* trim_scheme */, 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') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698