1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Stores information about an omnibox interaction.
9 option optimize_for = LITE_RUNTIME;
14 message OmniboxEventProto {
15 // The timestamp for the event, in seconds since the epoch.
16 optional int64 time = 1;
18 // The id of the originating tab for this omnibox interaction.
19 // This is the current tab *unless* the user opened the target in a new tab.
20 // In those cases, this is unset. Tab ids are unique for a given session_id
21 // (in the containing protocol buffer ChromeUserMetricsExtensionsProto).
22 optional int32 tab_id = 2;
24 // The number of characters the user had typed before autocompleting.
25 optional int32 typed_length = 3;
27 // Whether the user deleted text immediately before selecting an omnibox
28 // suggestion. This is usually the result of pressing backspace or delete.
29 optional bool just_deleted_text = 11;
31 // The number of terms that the user typed in the omnibox.
32 optional int32 num_typed_terms = 4;
34 // The index of the item that the user selected in the omnibox popup list.
35 // This corresponds the index of the |suggestion| below.
36 optional int32 selected_index = 5;
38 // Whether or not the top match was hidden in the omnibox suggestions
40 optional bool is_top_result_hidden_in_dropdown = 14;
42 // The length of the inline autocomplete text in the omnibox.
43 // The sum |typed_length| + |completed_length| gives the full length of the
44 // user-visible text in the omnibox.
45 // This field is only set for inlineable suggestions selected at position 0
46 // (|selected_index| = 0) and will be omitted otherwise.
47 optional int32 completed_length = 6;
49 // The amount of time, in milliseconds, since the user first began modifying
50 // the text in the omnibox. If at some point after modifying the text, the
51 // user reverts the modifications (thus seeing the current web page's URL
52 // again), then writes in the omnibox again, this elapsed time should start
53 // from the time of the second series of modification.
54 optional int64 typing_duration_ms = 7;
56 // The amount of time, in milliseconds, since the last time the default
57 // (inline) match changed. This may be longer than the time since the
58 // last keystroke. (The last keystroke may not have changed the default
59 // match.) It may also be shorter than the time since the last keystroke
60 // because the default match might have come from an asynchronous
61 // provider. Regardless, it should always be less than or equal to
62 // the field |typing_duration_ms|.
63 optional int64 duration_since_last_default_match_update_ms = 13;
65 // The type of page currently displayed when the user used the omnibox.
66 enum PageClassification {
67 // An invalid URL; shouldn't happen.
70 // chrome://newtab/. This can be either the built-in version or a
71 // replacement new tab page from an extension. Note that when Instant
72 // Extended is enabled, the new tab page will be reported as either
73 // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS or
74 // INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS below,
75 // unless an extension is replacing the new tab page, in which case
76 // it will still be reported as NTP.
82 // The user's home page. Note that if the home page is set to any
83 // of the new tab page versions or to about:blank, then we'll
84 // classify the page into those categories, not HOME_PAGE.
87 // The catch-all entry of everything not included somewhere else
91 // The instant new tab page enum value was deprecated on August 2, 2013.
92 OBSOLETE_INSTANT_NTP = 5;
94 // The user is on a search result page that's doing search term
95 // replacement, meaning the search terms should've appeared in the omnibox
96 // before the user started editing it, not the URL of the page.
97 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6;
99 // The new tab page in which this omnibox interaction first started
100 // with the user having focus in the omnibox.
101 INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7;
103 // The new tab page in which this omnibox interaction first started
104 // with the user having focus in the fakebox.
105 INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8;
107 // The user is on a search result page that's not doing search term
108 // replacement, meaning the URL of the page should've appeared in the
109 // omnibox before the user started editing it, not the search terms.
110 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9;
112 optional PageClassification current_page_classification = 10;
114 // What kind of input the user provided.
116 INVALID = 0; // Empty input (should not reach here)
117 UNKNOWN = 1; // Valid input whose type cannot be determined
118 REQUESTED_URL = 2; // DEPRECATED. Input autodetected as UNKNOWN, which the
119 // user wants to treat as an URL by specifying a
121 URL = 3; // Input autodetected as a URL
122 QUERY = 4; // Input autodetected as a query
123 FORCED_QUERY = 5; // Input forced to be a query by an initial '?'
125 optional InputType input_type = 8;
127 // An enum used in multiple places below.
129 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here)
130 HISTORY_URL = 1; // URLs in history, or user-typed URLs
131 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history
132 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages
134 SEARCH = 4; // Search suggestions for the default search engine
135 KEYWORD = 5; // Keyword-triggered searches
136 BUILTIN = 6; // Built-in URLs, such as chrome://version
137 SHORTCUTS = 7; // Recently selected omnibox suggestions
138 EXTENSION_APPS = 8; // Custom suggestions from extensions and/or apps
139 CONTACT = 9; // The user's contacts
140 BOOKMARK = 10; // The user's bookmarks
141 ZERO_SUGGEST = 11; // Suggestions based on the current page
142 // This enum value is currently only used by Android GSA. It represents
143 // a suggestion from the phone.
147 // The result set displayed on the completion popup
150 // Where does this result come from?
151 optional ProviderType provider = 1;
153 // What kind of result this is.
154 // This corresponds to the AutocompleteMatch::Type enumeration in
155 // chrome/browser/autocomplete/autocomplete_match.h (except for Android
156 // GSA result types).
158 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here)
159 URL_WHAT_YOU_TYPED = 1; // The input as a URL
160 HISTORY_URL = 2; // A past page whose URL contains the input
161 HISTORY_TITLE = 3; // A past page whose title contains the input
162 HISTORY_BODY = 4; // A past page whose body contains the input
163 HISTORY_KEYWORD = 5; // A past page whose keyword contains the
165 NAVSUGGEST = 6; // A suggested URL
166 SEARCH_WHAT_YOU_TYPED = 7; // The input as a search query (with the
168 SEARCH_HISTORY = 8; // A past search (with the default engine)
169 // containing the input
170 SEARCH_SUGGEST = 9; // A suggested search (with the default
171 // engine) query that doesn't fall into one of
172 // the more specific suggestion categories
174 SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine
175 EXTENSION_APP = 11; // An Extension App with a title/url that
176 // contains the input
177 CONTACT = 12; // One of the user's contacts
178 BOOKMARK_TITLE = 13; // A bookmark whose title contains the input.
179 SEARCH_SUGGEST_ENTITY = 14; // A suggested search for an entity.
180 SEARCH_SUGGEST_INFINITE = 15; // A suggested search to complete the tail
182 SEARCH_SUGGEST_PERSONALIZED = 16; // A personalized suggested search.
183 SEARCH_SUGGEST_PROFILE = 17; // A personalized suggested search for a
185 APP_RESULT = 18; // Result from an installed app
186 // (eg: a gmail email).
187 // Used by Android GSA for on-device
188 // suggestion logging.
189 APP = 19; // An app result (eg: the gmail app).
190 // Used by Android GSA for on-device
191 // suggestion logging.
193 optional ResultType result_type = 2;
195 // The relevance score for this suggestion.
196 optional int32 relevance = 3;
198 // How many times this result was typed in / selected from the omnibox.
199 // Only set for some providers and result_types. At the time of
200 // writing this comment, it is only set for HistoryURL and
201 // HistoryQuickProvider matches.
202 optional int32 typed_count = 5;
204 // Whether this item is starred (bookmarked) or not.
205 optional bool is_starred = 4;
207 repeated Suggestion suggestion = 9;
209 // A data structure that holds per-provider information, general information
210 // not associated with a particular result.
212 message ProviderInfo {
213 // Which provider generated this ProviderInfo entry.
214 optional ProviderType provider = 1;
216 // The provider's done() value, i.e., whether it's completed processing
217 // the query. Providers which don't do any asynchronous processing
218 // will always be done.
219 optional bool provider_done = 2;
221 // The set of field trials that have triggered in the most recent query,
222 // possibly affecting the shown suggestions. Each element is a hash
223 // of the corresponding field trial name.
224 // See chrome/browser/autocomplete/search_provider.cc for a specific usage
226 repeated fixed32 field_trial_triggered = 3;
228 // Same as above except that the set of field trials is a union of all field
229 // trials that have triggered within the current omnibox session including
230 // the most recent query.
231 // See AutocompleteController::ResetSession() for more details on the
232 // definition of a session.
233 // See chrome/browser/autocomplete/search_provider.cc for a specific usage
235 repeated fixed32 field_trial_triggered_in_session = 4;
237 // A list of diagnostic information about each provider. Providers
238 // will appear at most once in this list.
239 repeated ProviderInfo provider_info = 12;