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

Unified Diff: components/omnibox/browser/omnibox_metrics_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
Index: components/omnibox/browser/omnibox_metrics_provider.cc
diff --git a/components/omnibox/browser/omnibox_metrics_provider.cc b/components/omnibox/browser/omnibox_metrics_provider.cc
index 202dfce07dea75f1df60c30ab690e9e445b7422c..c6b081acc170656682a808342532c80824025066 100644
--- a/components/omnibox/browser/omnibox_metrics_provider.cc
+++ b/components/omnibox/browser/omnibox_metrics_provider.cc
@@ -154,11 +154,14 @@ void OmniboxMetricsProvider::RecordOmniboxOpenedURL(const OmniboxLog& log) {
for (AutocompleteResult::const_iterator i(log.result.begin());
i != log.result.end(); ++i) {
OmniboxEventProto::Suggestion* suggestion = omnibox_event->add_suggestion();
- suggestion->set_provider(i->provider->AsOmniboxEventProviderType());
+ const auto provider_type = i->provider->AsOmniboxEventProviderType();
+ suggestion->set_provider(provider_type);
suggestion->set_result_type(AsOmniboxEventResultType(i->type));
suggestion->set_relevance(i->relevance);
if (i->typed_count != -1)
suggestion->set_typed_count(i->typed_count);
+ if (i->subtype_identifier > 0)
+ suggestion->set_result_subtype_identifier(i->subtype_identifier);
}
for (ProvidersInfo::const_iterator i(log.providers_info.begin());
i != log.providers_info.end(); ++i) {
« no previous file with comments | « components/omnibox/browser/base_search_provider_unittest.cc ('k') | components/omnibox/browser/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698