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

Unified Diff: components/omnibox/browser/titled_url_match_utils.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/titled_url_match_utils.cc
diff --git a/components/omnibox/browser/titled_url_match_utils.cc b/components/omnibox/browser/titled_url_match_utils.cc
index 8c6063065dccf592f2411d8fdc30965e51da1ae4..8c0ea8d27de1efa4f925563cfbcf465989cc039e 100644
--- a/components/omnibox/browser/titled_url_match_utils.cc
+++ b/components/omnibox/browser/titled_url_match_utils.cc
@@ -85,8 +85,10 @@ AutocompleteMatch TitledUrlMatchToAutocompleteMatch(
// |offsets|, compute how everything is transformed, then remove it from the
// end.
offsets.push_back(inline_autocomplete_offset);
- match.contents = AutocompleteMatch::FormatUrlForSuggestionDisplayWithOffsets(
- url, trim_http, &offsets);
+ auto format_types =
+ AutocompleteMatch::GetFormatForSuggestionDisplay(trim_http);
+ match.contents = url_formatter::FormatUrlWithOffsets(
+ url, format_types, net::UnescapeRule::SPACES, nullptr, nullptr, &offsets);
inline_autocomplete_offset = offsets.back();
offsets.pop_back();
TitledUrlMatch::MatchPositions new_url_match_positions =

Powered by Google App Engine
This is Rietveld 408576698