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

Unified Diff: components/omnibox/base_search_provider.cc

Issue 911723002: Provide description_class in search provider. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 5 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/omnibox/base_search_provider.cc
diff --git a/components/omnibox/base_search_provider.cc b/components/omnibox/base_search_provider.cc
index a18b66c2e26c79041a53e8865af383cdfdb94f4d..bfedaf4ce7d6ce9ef12175e897d230774995149a 100644
--- a/components/omnibox/base_search_provider.cc
+++ b/components/omnibox/base_search_provider.cc
@@ -222,8 +222,11 @@ AutocompleteMatch BaseSearchProvider::CreateSearchSuggestion(
suggestion.suggestion().length() - match.contents.length()));
}
- if (!suggestion.annotation().empty())
+ if (!suggestion.annotation().empty()) {
match.description = suggestion.annotation();
+ AutocompleteMatch::AddLastClassificationIfNecessary(
+ &match.description_class, 0, ACMatchClassification::NONE);
+ }
// suggestion.match_contents() should have already been collapsed.
match.allowed_to_be_default_match =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698