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

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

Issue 2755503002: Add a new entry to omnibox_event.proto to log specific type of contextual suggestions (Closed)
Patch Set: specific_type_identifier can be used outside of contextual suggestions. Created 3 years, 9 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/zero_suggest_provider.cc
diff --git a/components/omnibox/browser/zero_suggest_provider.cc b/components/omnibox/browser/zero_suggest_provider.cc
index 3ab642a2f7b5cc66c5ef00b48626eba8b082ee38..b197b5b498f61bfbec68ec275b4dfd8850a1a440 100644
--- a/components/omnibox/browser/zero_suggest_provider.cc
+++ b/components/omnibox/browser/zero_suggest_provider.cc
@@ -363,6 +363,7 @@ AutocompleteMatch ZeroSuggestProvider::NavigationToMatch(
AutocompleteMatch::ClassifyLocationInString(base::string16::npos, 0,
match.description.length(), ACMatchClassification::NONE,
&match.description_class);
+ match.specific_type_identifier = navigation.specific_type_identifier();
return match;
}
@@ -448,7 +449,7 @@ void ZeroSuggestProvider::ConvertResultsToAutocompleteMatches() {
SearchSuggestionParser::NavigationResult nav(
client()->GetSchemeClassifier(), url.url,
AutocompleteMatchType::NAVSUGGEST, url.title, std::string(), false,
- relevance, true, current_query_string16);
+ relevance, true, current_query_string16, 0);
matches_.push_back(NavigationToMatch(nav));
--relevance;
}
@@ -468,8 +469,10 @@ void ZeroSuggestProvider::ConvertResultsToAutocompleteMatches() {
const SearchSuggestionParser::NavigationResults& nav_results(
results_.navigation_results);
for (SearchSuggestionParser::NavigationResults::const_iterator it(
- nav_results.begin()); it != nav_results.end(); ++it)
+ nav_results.begin());
+ it != nav_results.end(); ++it) {
matches_.push_back(NavigationToMatch(*it));
+ }
}
AutocompleteMatch ZeroSuggestProvider::MatchForCurrentURL() {

Powered by Google App Engine
This is Rietveld 408576698