1 // Copyright 2014 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;
10 option java_outer_classname = "OmniboxEventProtos";
11 option java_package = "org.chromium.components.metrics";
15 import "omnibox_input_type.proto";
18 message OmniboxEventProto {
19 // The timestamp for the event, in seconds since the epoch.
20 optional int64 time = 1;
22 // The id of the originating tab for this omnibox interaction.
23 // This is the current tab *unless* the user opened the target in a new tab.
24 // In those cases, this is unset. Tab ids are unique for a given session_id
25 // (in the containing protocol buffer ChromeUserMetricsExtensionProto).
26 optional int32 tab_id = 2;
28 // The number of characters the user had typed before autocompleting.
29 optional int32 typed_length = 3;
31 // Whether the user deleted text immediately before selecting an omnibox
32 // suggestion. This is usually the result of pressing backspace or delete.
33 optional bool just_deleted_text = 11;
35 // The number of terms that the user typed in the omnibox.
36 optional int32 num_typed_terms = 4;
38 // The index of the item that the user selected in the omnibox popup list.
39 // This corresponds the index of the |suggestion| below.
40 optional int32 selected_index = 5;
42 // DEPRECATED. Whether or not the top match was hidden in the omnibox
43 // suggestions dropdown.
44 optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14
47 // Whether the omnibox popup is open. It can be closed if, for instance,
48 // the user clicks in the omnibox and hits return to reload the same page.
49 // If the popup is closed, the suggestion list will contain only one item
50 // and selected_index will be 0 (pointing to that single item). Because
51 // paste-and-search/paste-and-go actions ignore the current content of the
52 // omnibox dropdown (if it is open) when they happen, we pretend the
53 // dropdown is closed when logging these.
54 optional bool is_popup_open = 15;
56 // True if this is a paste-and-search or paste-and-go action. (The codebase
57 // refers to both these types as paste-and-go.)
58 optional bool is_paste_and_go = 16;
60 // The length of the inline autocomplete text in the omnibox.
61 // The sum |typed_length| + |completed_length| gives the full length of the
62 // user-visible text in the omnibox.
63 // This field is only set for suggestions that are allowed to be the default
64 // match and omitted otherwise. The first suggestion is always allowed to
65 // be the default match. (This is an enforced constraint.) Hence, if
66 // |selected_index| == 0, then this field will always be set.
67 optional int32 completed_length = 6;
69 // The amount of time, in milliseconds, since the user first began modifying
70 // the text in the omnibox. If at some point after modifying the text, the
71 // user reverts the modifications (thus seeing the current web page's URL
72 // again), then writes in the omnibox again, this elapsed time should start
73 // from the time of the second series of modification.
74 optional int64 typing_duration_ms = 7;
76 // The amount of time, in milliseconds, since the last time the default
77 // (inline) match changed. This may be longer than the time since the
78 // last keystroke. (The last keystroke may not have changed the default
79 // match.) It may also be shorter than the time since the last keystroke
80 // because the default match might have come from an asynchronous
81 // provider. Regardless, it should always be less than or equal to
82 // the field |typing_duration_ms|.
83 optional int64 duration_since_last_default_match_update_ms = 13;
85 // The type of page currently displayed when the user used the omnibox.
86 enum PageClassification {
87 // An invalid URL; shouldn't happen.
90 // chrome://newtab/. This can be either the built-in version or a
91 // replacement new tab page from an extension. Note that when Instant
92 // Extended is enabled, the new tab page will be reported as either
93 // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS or
94 // INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS below,
95 // unless an extension is replacing the new tab page, in which case
96 // it will still be reported as NTP.
102 // The user's home page. Note that if the home page is set to any
103 // of the new tab page versions or to about:blank, then we'll
104 // classify the page into those categories, not HOME_PAGE.
107 // The catch-all entry of everything not included somewhere else
111 // The instant new tab page enum value was deprecated on August 2, 2013.
112 OBSOLETE_INSTANT_NTP = 5;
114 // The user is on a search result page that's doing search term
115 // replacement, meaning the search terms should've appeared in the omnibox
116 // before the user started editing it, not the URL of the page.
117 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6;
119 // The new tab page in which this omnibox interaction first started
120 // with the user having focus in the omnibox.
121 INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7;
123 // The new tab page in which this omnibox interaction first started
124 // with the user having focus in the fakebox.
125 INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8;
127 // The user is on a search result page that's not doing search term
128 // replacement, meaning the URL of the page should've appeared in the
129 // omnibox before the user started editing it, not the search terms.
130 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9;
132 // The user is on the home screen.
135 // The user is in the search app.
138 // The user is in the maps app.
141 // When adding new classifications, please consider adding them in
142 // chrome/browser/resources/omnibox/omnibox.html
143 // so that these new options are displayed on about:omnibox.
145 optional PageClassification current_page_classification = 10;
147 optional OmniboxInputType.Type input_type = 8;
149 // An enum used in multiple places below.
151 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here)
152 HISTORY_URL = 1; // URLs in history, or user-typed URLs
153 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history
154 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages
156 SEARCH = 4; // Search suggestions for the default search engine
157 KEYWORD = 5; // Keyword-triggered searches
158 BUILTIN = 6; // Built-in URLs, such as chrome://version
159 SHORTCUTS = 7; // Recently selected omnibox suggestions
160 EXTENSION_APPS = 8; // DEPRECATED. Suggestions from extensions or apps
161 CONTACT = 9; // DEPRECATED. The user's contacts
162 BOOKMARK = 10; // The user's bookmarks
163 ZERO_SUGGEST = 11; // Suggestions based on the current page
164 // This enum value is currently only used by Android GSA. It represents
165 // a suggestion from the phone.
167 // This enum value is currently only used by Android GSA. It represents
168 // a suggestion powered by a Chrome content provider.
169 ON_DEVICE_CHROME = 13;
172 // The result set displayed on the completion popup
175 // Where does this result come from?
176 optional ProviderType provider = 1;
178 // What kind of result this is.
179 // This corresponds to the AutocompleteMatch::Type enumeration in
180 // components/omnibox/autocomplete_match.h (except for Android
181 // GSA result types).
183 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here)
184 URL_WHAT_YOU_TYPED = 1; // The input as a URL
185 HISTORY_URL = 2; // A past page whose URL contains the input
186 HISTORY_TITLE = 3; // A past page whose title contains the input
187 HISTORY_BODY = 4; // DEPRECATED. A past page whose body
188 // contains the input
189 HISTORY_KEYWORD = 5; // A past page whose keyword contains the
191 NAVSUGGEST = 6; // A suggested URL
192 SEARCH_WHAT_YOU_TYPED = 7; // The input as a search query (with the
194 SEARCH_HISTORY = 8; // A past search (with the default engine)
195 // containing the input
196 SEARCH_SUGGEST = 9; // A suggested search (with the default
197 // engine) for a query.
198 SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine
199 EXTENSION_APP = 11; // DEPRECATED. An Extension App with a
200 // title/url that contains the input.
201 CONTACT = 12; // One of the user's contacts
202 BOOKMARK_TITLE = 13; // A bookmark whose title contains the input.
203 SEARCH_SUGGEST_ENTITY = 14; // A suggested search for an entity.
204 SEARCH_SUGGEST_TAIL = 15; // A suggested search to complete the tail
206 SEARCH_SUGGEST_PERSONALIZED = 16; // A personalized suggested search.
207 SEARCH_SUGGEST_PROFILE = 17; // A personalized suggested search for a
209 APP_RESULT = 18; // Result from an installed app
210 // (eg: a gmail email).
211 // Used by Android GSA for on-device
212 // suggestion logging.
213 APP = 19; // An app result (eg: the gmail app).
214 // Used by Android GSA for on-device
215 // suggestion logging.
216 LEGACY_ON_DEVICE = 20; // An on-device result from a legacy
217 // provider. That is, this result is not
218 // from the on-device suggestion provider
219 // (go/icing). This field is
220 // used by Android GSA for on-device
221 // suggestion logging.
222 NAVSUGGEST_PERSONALIZED = 21; // A personalized url.
223 SEARCH_SUGGEST_ANSWER = 22; // DEPRECATED. Answers no longer have their
224 // own type but instead can be attached to
225 // suggestions of any type.
226 CALCULATOR = 23; // A calculator answer.
228 optional ResultType result_type = 2;
230 // The relevance score for this suggestion.
231 optional int32 relevance = 3;
233 // How many times this result was typed in / selected from the omnibox.
234 // Only set for some providers and result_types. At the time of
235 // writing this comment, it is only set for HistoryURL and
236 // HistoryQuickProvider matches.
237 optional int32 typed_count = 5;
239 // Whether this item is starred (bookmarked) or not.
240 optional bool is_starred = 4 [deprecated=true];
242 // Whether this item is disabled in the UI (not clickable).
243 optional bool is_disabled = 6;
245 repeated Suggestion suggestion = 9;
247 // A data structure that holds per-provider information, general information
248 // not associated with a particular result.
250 message ProviderInfo {
251 // Which provider generated this ProviderInfo entry.
252 optional ProviderType provider = 1;
254 // The provider's done() value, i.e., whether it's completed processing
255 // the query. Providers which don't do any asynchronous processing
256 // will always be done.
257 optional bool provider_done = 2;
259 // The set of field trials that have triggered in the most recent query,
260 // possibly affecting the shown suggestions. Each element is a hash
261 // of the corresponding field trial name.
262 // See chrome/browser/autocomplete/search_provider.cc for a specific usage
264 repeated fixed32 field_trial_triggered = 3;
266 // Same as above except that the set of field trials is a union of all field
267 // trials that have triggered within the current omnibox session including
268 // the most recent query.
269 // See AutocompleteController::ResetSession() for more details on the
270 // definition of a session.
271 // See chrome/browser/autocomplete/search_provider.cc for a specific usage
273 repeated fixed32 field_trial_triggered_in_session = 4;
275 // The number of times this provider returned a non-zero number of
276 // suggestions during this omnibox session.
277 // Note that each provider may define a session differently for its
279 optional int32 times_returned_results_in_session = 5;
281 // A list of diagnostic information about each provider. Providers
282 // will appear at most once in this list.
283 repeated ProviderInfo provider_info = 12;