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

Unified Diff: components/omnibox/browser/history_quick_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
Index: components/omnibox/browser/history_quick_provider.cc
diff --git a/components/omnibox/browser/history_quick_provider.cc b/components/omnibox/browser/history_quick_provider.cc
index ea045ad37532f8057b98549775281066ed7d24d5..f8b9a767873392d2c9ba4774d7fd0e52c1f95262 100644
--- a/components/omnibox/browser/history_quick_provider.cc
+++ b/components/omnibox/browser/history_quick_provider.cc
@@ -200,14 +200,10 @@ AutocompleteMatch HistoryQuickProvider::QuickMatchToACMatch(
autocomplete_input_.text(), FixupUserInput(autocomplete_input_).second,
false, base::UTF8ToUTF16(info.url().spec()));
- // Format the URL autocomplete presentation.
- const url_formatter::FormatUrlTypes format_types =
- url_formatter::kFormatUrlOmitAll &
- ~(!history_match.match_in_scheme ? 0 : url_formatter::kFormatUrlOmitHTTP);
base::OffsetAdjuster::Adjustments adjustments;
- match.contents = url_formatter::FormatUrlWithAdjustments(
- info.url(), format_types, net::UnescapeRule::SPACES, nullptr,
- nullptr, &adjustments);
+ match.contents =
+ AutocompleteMatch::FormatUrlForSuggestionDisplayWithAdjustments(
+ info.url(), !history_match.match_in_scheme, &adjustments);
match.fill_into_edit =
AutocompleteInput::FormattedStringWithEquivalentMeaning(
info.url(), match.contents, client()->GetSchemeClassifier());
« no previous file with comments | « components/omnibox/browser/clipboard_url_provider.cc ('k') | components/omnibox/browser/history_url_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698