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

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: Small fixes and sync. 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
« no previous file with comments | « components/omnibox/browser/search_suggestion_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8ca495ac321f51b61ea9ecf116e67e7d32ba89da 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.subtype_identifier = navigation.subtype_identifier();
return match;
}
@@ -447,7 +448,7 @@ void ZeroSuggestProvider::ConvertResultsToAutocompleteMatches() {
const history::MostVisitedURL& url = most_visited_urls_[i];
SearchSuggestionParser::NavigationResult nav(
client()->GetSchemeClassifier(), url.url,
- AutocompleteMatchType::NAVSUGGEST, url.title, std::string(), false,
+ AutocompleteMatchType::NAVSUGGEST, 0, url.title, std::string(), false,
relevance, true, current_query_string16);
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() {
« no previous file with comments | « components/omnibox/browser/search_suggestion_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698