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

Unified Diff: components/omnibox/browser/omnibox_field_trial.h

Issue 2755503002: Add a new entry to omnibox_event.proto to log specific type of contextual suggestions (Closed)
Patch Set: 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_field_trial.h
diff --git a/components/omnibox/browser/omnibox_field_trial.h b/components/omnibox/browser/omnibox_field_trial.h
index 2409711b18e74acf5538f06890b3bae1e0e47138..23afd4a00c514b3cc30c35e8a0625e07812b4662 100644
--- a/components/omnibox/browser/omnibox_field_trial.h
+++ b/components/omnibox/browser/omnibox_field_trial.h
@@ -133,6 +133,39 @@ class OmniboxFieldTrial {
EMPHASIZE_NEVER = 3
};
+ struct ContextualZeroSuggest {
+ enum Type {
+ NOT_SET = 0,
+ COOCCURENCE_PAGE = 1,
+ HIVEMIND_URL = 2,
+ LOCAL_STORE_MAP = 3,
+ LOCAL_STORE_WEBPAGE = 4,
+ LOCAL_STORE_RESERVATION = 5,
+ MOVIE_REVIEW = 6,
+ MOVIE_SHOWTIME = 7,
+ ON_THE_NEWS = 8,
+ POPULAR_DOMAINS = 9,
+ SIMILAR_PAGES = 10,
+ TOP_ENTITY_INFO = 11,
+ OTHER = 12,
+ NUM_TYPES,
+ };
+
+ // Converts |type| to a string representation.
+ static std::string ToString(const Type& type);
+
+ // Converts |type| from a string representation to Type.
+ static Type FromString(const std::string& type);
+
+ // Records the given type to the
+ // ZeroSuggest.ContextualSuggestType.SuggestionProvided histogram.
+ static void RecordTypeAsProvided(const std::string& type);
+
+ // Records the given type to the
+ // ZeroSuggest.ContextualSuggestType.SuggestionUsed histogram.
+ static void RecordTypeAsUsed(const std::string& type);
+ };
+
// ---------------------------------------------------------
// For any experiment that's part of the bundled omnibox field trial.

Powered by Google App Engine
This is Rietveld 408576698