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 // Whether or not the top match was hidden in the omnibox suggestions
44 optional bool is_top_result_hidden_in_dropdown = 14;
46 // Whether the omnibox popup is open. It can be closed if, for instance,
47 // the user clicks in the omnibox and hits return to reload the same page.
48 // If the popup is closed, the suggestion list will contain only one item
49 // and selected_index will be 0 (pointing to that single item). Because
50 // paste-and-search/paste-and-go actions ignore the current content of the
51 // omnibox dropdown (if it is open) when they happen, we pretend the
52 // dropdown is closed when logging these.
53 optional bool is_popup_open = 15;
55 // True if this is a paste-and-search or paste-and-go action. (The codebase
56 // refers to both these types as paste-and-go.)
57 optional bool is_paste_and_go = 16;
59 // The length of the inline autocomplete text in the omnibox.
60 // The sum |typed_length| + |completed_length| gives the full length of the
61 // user-visible text in the omnibox.
62 // This field is only set for suggestions that are allowed to be the default
63 // match and omitted otherwise. The first suggestion is always allowed to
64 // be the default match. (This is an enforced constraint.) Hence, if
65 // |selected_index| == 0, then this field will always be set.
66 optional int32 completed_length = 6;
68 // The amount of time, in milliseconds, since the user first began modifying
69 // the text in the omnibox. If at some point after modifying the text, the
70 // user reverts the modifications (thus seeing the current web page's URL
71 // again), then writes in the omnibox again, this elapsed time should start
72 // from the time of the second series of modification.
73 optional int64 typing_duration_ms = 7;
75 // The amount of time, in milliseconds, since the last time the default
76 // (inline) match changed. This may be longer than the time since the
77 // last keystroke. (The last keystroke may not have changed the default
78 // match.) It may also be shorter than the time since the last keystroke
79 // because the default match might have come from an asynchronous
80 // provider. Regardless, it should always be less than or equal to
81 // the field |typing_duration_ms|.
82 optional int64 duration_since_last_default_match_update_ms = 13;
84 // The type of page currently displayed when the user used the omnibox.
85 enum PageClassification {
86 // An invalid URL; shouldn't happen.
89 // chrome://newtab/. This can be either the built-in version or a
90 // replacement new tab page from an extension. Note that when Instant
91 // Extended is enabled, the new tab page will be reported as either
92 // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS or
93 // INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS below,
94 // unless an extension is replacing the new tab page, in which case
95 // it will still be reported as NTP.
101 // The user's home page. Note that if the home page is set to any
102 // of the new tab page versions or to about:blank, then we'll
103 // classify the page into those categories, not HOME_PAGE.
106 // The catch-all entry of everything not included somewhere else
110 // The instant new tab page enum value was deprecated on August 2, 2013.
111 OBSOLETE_INSTANT_NTP = 5;
113 // The user is on a search result page that's doing search term
114 // replacement, meaning the search terms should've appeared in the omnibox
115 // before the user started editing it, not the URL of the page.
116 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6;
118 // The new tab page in which this omnibox interaction first started
119 // with the user having focus in the omnibox.
120 INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7;
122 // The new tab page in which this omnibox interaction first started
123 // with the user having focus in the fakebox.
124 INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8;
126 // The user is on a search result page that's not doing search term
127 // replacement, meaning the URL of the page should've appeared in the
128 // omnibox before the user started editing it, not the search terms.
129 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9;
131 // The user is on the home screen.
134 // The user is in the search app.
137 // The user is in the maps app.
140 // When adding new classifications, please consider adding them in
141 // chrome/browser/resources/omnibox/omnibox.html
142 // so that these new options are displayed on about:omnibox.
144 optional PageClassification current_page_classification = 10;
146 optional OmniboxInputType.Type input_type = 8;
148 // An enum used in multiple places below.
150 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here)
151 HISTORY_URL = 1; // URLs in history, or user-typed URLs
152 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history
153 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages
155 SEARCH = 4; // Search suggestions for the default search engine
156 KEYWORD = 5; // Keyword-triggered searches
157 BUILTIN = 6; // Built-in URLs, such as chrome://version
158 SHORTCUTS = 7; // Recently selected omnibox suggestions
159 EXTENSION_APPS = 8; // DEPRECATED. Suggestions from extensions or apps
160 CONTACT = 9; // DEPRECATED. The user's contacts
161 BOOKMARK = 10; // The user's bookmarks
162 ZERO_SUGGEST = 11; // Suggestions based on the current page
163 // This enum value is currently only used by Android GSA. It represents
164 // a suggestion from the phone.
166 // This enum value is currently only used by Android GSA. It represents
167 // a suggestion powered by a Chrome content provider.
168 ON_DEVICE_CHROME = 13;
171 // The result set displayed on the completion popup
174 // Where does this result come from?
175 optional ProviderType provider = 1;
177 // What kind of result this is.
178 // This corresponds to the AutocompleteMatch::Type enumeration in
179 // components/omnibox/autocomplete_match.h (except for Android
180 // GSA result types).
182 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here)
183 URL_WHAT_YOU_TYPED = 1; // The input as a URL
184 HISTORY_URL = 2; // A past page whose URL contains the input
185 HISTORY_TITLE = 3; // A past page whose title contains the input
186 HISTORY_BODY = 4; // DEPRECATED. A past page whose body
187 // contains the input
188 HISTORY_KEYWORD = 5; // A past page whose keyword contains the
190 NAVSUGGEST = 6; // A suggested URL
191 SEARCH_WHAT_YOU_TYPED = 7; // The input as a search query (with the
193 SEARCH_HISTORY = 8; // A past search (with the default engine)
194 // containing the input
195 SEARCH_SUGGEST = 9; // A suggested search (with the default
196 // engine) for a query.
197 SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine
198 EXTENSION_APP = 11; // DEPRECATED. An Extension App with a
199 // title/url that contains the input.
200 CONTACT = 12; // One of the user's contacts
201 BOOKMARK_TITLE = 13; // A bookmark whose title contains the input.
202 SEARCH_SUGGEST_ENTITY = 14; // A suggested search for an entity.
203 SEARCH_SUGGEST_TAIL = 15; // A suggested search to complete the tail
205 SEARCH_SUGGEST_PERSONALIZED = 16; // A personalized suggested search.
206 SEARCH_SUGGEST_PROFILE = 17; // A personalized suggested search for a
208 APP_RESULT = 18; // Result from an installed app
209 // (eg: a gmail email).
210 // Used by Android GSA for on-device
211 // suggestion logging.
212 APP = 19; // An app result (eg: the gmail app).
213 // Used by Android GSA for on-device
214 // suggestion logging.
215 LEGACY_ON_DEVICE = 20; // An on-device result from a legacy
216 // provider. That is, this result is not
217 // from the on-device suggestion provider
218 // (go/icing). This field is
219 // used by Android GSA for on-device
220 // suggestion logging.
221 NAVSUGGEST_PERSONALIZED = 21; // A personalized url.
222 SEARCH_SUGGEST_ANSWER = 22; // DEPRECATED. Answers no longer have their
223 // own type but instead can be attached to
224 // suggestions of any type.
225 CALCULATOR = 23; // A calculator answer.
227 optional ResultType result_type = 2;
229 // The relevance score for this suggestion.
230 optional int32 relevance = 3;
232 // How many times this result was typed in / selected from the omnibox.
233 // Only set for some providers and result_types. At the time of
234 // writing this comment, it is only set for HistoryURL and
235 // HistoryQuickProvider matches.
236 optional int32 typed_count = 5;
238 // Whether this item is starred (bookmarked) or not.
239 optional bool is_starred = 4 [deprecated=true];
241 // Whether this item is disabled in the UI (not clickable).
242 optional bool is_disabled = 6;
244 repeated Suggestion suggestion = 9;
246 // A data structure that holds per-provider information, general information
247 // not associated with a particular result.
249 message ProviderInfo {
250 // Which provider generated this ProviderInfo entry.
251 optional ProviderType provider = 1;
253 // The provider's done() value, i.e., whether it's completed processing
254 // the query. Providers which don't do any asynchronous processing
255 // will always be done.
256 optional bool provider_done = 2;
258 // The set of field trials that have triggered in the most recent query,
259 // possibly affecting the shown suggestions. Each element is a hash
260 // of the corresponding field trial name.
261 // See chrome/browser/autocomplete/search_provider.cc for a specific usage
263 repeated fixed32 field_trial_triggered = 3;
265 // Same as above except that the set of field trials is a union of all field
266 // trials that have triggered within the current omnibox session including
267 // the most recent query.
268 // See AutocompleteController::ResetSession() for more details on the
269 // definition of a session.
270 // See chrome/browser/autocomplete/search_provider.cc for a specific usage
272 repeated fixed32 field_trial_triggered_in_session = 4;
274 // The number of times this provider returned a non-zero number of
275 // suggestions during this omnibox session.
276 // Note that each provider may define a session differently for its
278 optional int32 times_returned_results_in_session = 5;
280 // A list of diagnostic information about each provider. Providers
281 // will appear at most once in this list.
282 repeated ProviderInfo provider_info = 12;