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

Unified Diff: components/omnibox/browser/clipboard_url_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
Index: components/omnibox/browser/clipboard_url_provider.cc
diff --git a/components/omnibox/browser/clipboard_url_provider.cc b/components/omnibox/browser/clipboard_url_provider.cc
index b3729328beefb959f6f9bf45f34d439effcd0d76..5c3b0792376126251ffb667a66ebf3875ab0fb73 100644
--- a/components/omnibox/browser/clipboard_url_provider.cc
+++ b/components/omnibox/browser/clipboard_url_provider.cc
@@ -86,8 +86,9 @@ void ClipboardURLProvider::Start(const AutocompleteInput& input,
// Add the clipboard match. The relevance is 800 to beat ZeroSuggest results.
AutocompleteMatch match(this, 800, false, AutocompleteMatchType::CLIPBOARD);
match.destination_url = url;
- match.contents.assign(AutocompleteMatch::FormatUrlForSuggestionDisplay(
- url, true /* trim_scheme */, nullptr));
+ auto format_types = AutocompleteMatch::GetFormatTypes(true);
+ match.contents.assign(url_formatter::FormatUrl(
+ url, format_types, net::UnescapeRule::SPACES, nullptr, nullptr, nullptr));
AutocompleteMatch::ClassifyLocationInString(
base::string16::npos, 0, match.contents.length(),
ACMatchClassification::URL, &match.contents_class);
« no previous file with comments | « components/omnibox/browser/autocomplete_match_unittest.cc ('k') | components/omnibox/browser/history_quick_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698