• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2014 The Chromium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5syntax = "proto2";
6
7option optimize_for = LITE_RUNTIME;
8option java_package = "org.chromium.components.metrics";
9
10option java_outer_classname = "OmniboxEventProtos";
11
12package metrics;
13
14import "omnibox_input_type.proto";
15
16// Stores information about an omnibox interaction.
17// Next tag: 28
18message OmniboxEventProto {
19  // The timestamp for the event, in seconds.
20  // This value comes from Chromium's TimeTicks::Now(), which is an abstract
21  // time value that is guaranteed to always be non-decreasing (regardless of
22  // Daylight Saving Time or any other changes to the system clock).
23  // These numbers are only comparable within a session.  To sequence events
24  // across sessions, order by the |session_id| from the
25  // ChromeUserMetricsExtension message.
26  optional int64 time_sec = 1;
27
28  // The id of the originating tab for this omnibox interaction.
29  // This is the current tab *unless* the user opened the target in a new tab.
30  // In those cases, this is unset.  Tab ids are unique for a given session_id
31  // (in the containing protocol buffer ChromeUserMetricsExtensionProto).
32  optional int32 tab_id = 2;
33
34  // The number of characters the user had typed before autocompleting.
35  optional int32 typed_length = 3;
36
37  // Whether the user deleted text immediately before selecting an omnibox
38  // suggestion.  This is usually the result of pressing backspace or delete.
39  optional bool just_deleted_text = 11;
40
41  // The number of terms that the user typed in the omnibox.
42  optional int32 num_typed_terms = 4;
43
44  // The index of the item that the user selected in the omnibox popup list.
45  // This corresponds the index of the |suggestion| below.
46  optional int32 selected_index = 5;
47
48  // Whether the user selected the option to switch tabs (or ignored it
49  // and navigated). If true, one or more |Suggestions| will have
50  // |has_tab_match| set as well, which must include the |selected_index|.
51  optional bool selected_tab_match = 17;
52
53  // DEPRECATED. Whether or not the top match was hidden in the omnibox
54  // suggestions dropdown.
55  optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14
56      [deprecated = true];
57
58  // Whether the omnibox popup is open.  It can be closed if, for instance,
59  // the user clicks in the omnibox and hits return to reload the same page.
60  // If the popup is closed, the suggestion list will contain only one item
61  // and selected_index will be 0 (pointing to that single item).  Because
62  // paste-and-search/paste-and-go actions ignore the current content of the
63  // omnibox dropdown (if it is open) when they happen, we pretend the
64  // dropdown is closed when logging these.
65  optional bool is_popup_open = 15;
66
67  // True if this is a paste-and-search or paste-and-go action.  (The codebase
68  // refers to both these types as paste-and-go.)
69  optional bool is_paste_and_go = 16;
70
71  // The length of the inline autocomplete text in the omnibox.
72  // The sum |typed_length| + |completed_length| gives the full length of the
73  // user-visible text in the omnibox.
74  // This field is only set for suggestions that are allowed to be the default
75  // match and omitted otherwise.  The first suggestion is always allowed to
76  // be the default match.  (This is an enforced constraint.)  Hence, if
77  // |selected_index| == 0, then this field will always be set.
78  optional int32 completed_length = 6;
79
80  // The amount of time, in milliseconds, since the user first began modifying
81  // the text in the omnibox.  If at some point after modifying the text, the
82  // user reverts the modifications (thus seeing the current web page's URL
83  // again), then writes in the omnibox again, this elapsed time should start
84  // from the time of the second series of modification.
85  optional int64 typing_duration_ms = 7;
86
87  // The amount of time, in milliseconds, since the last time the default
88  // (inline) match changed.  This may be longer than the time since the
89  // last keystroke.  (The last keystroke may not have changed the default
90  // match.)  It may also be shorter than the time since the last keystroke
91  // because the default match might have come from an asynchronous
92  // provider.  Regardless, it should always be less than or equal to
93  // the field |typing_duration_ms|.
94  optional int64 duration_since_last_default_match_update_ms = 13;
95
96  // The type of page the user was on when they used the omnibox. Or the type of
97  // page for which suggestions were prefetched from the server.
98  enum PageClassification {
99    // An invalid URL; shouldn't happen.
100    INVALID_SPEC = 0;
101
102    // chrome://newtab/.  For modern versions of Chrome, this is only reported
103    // when an extension is replacing the new tab page. Otherwise, new tab
104    // page interactions will be reported as NTP_REALBOX, or
105    // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS.
106    // For old versions of Chrome, this was reported for the default New Tab
107    // Page.
108    NTP = 1;
109
110    // about:blank.
111    BLANK = 2;
112
113    // The user's home page.  Note that if the home page is set to any
114    // of the new tab page versions or to about:blank, then we'll
115    // classify the page into those categories, not HOME_PAGE.
116    HOME_PAGE = 3;
117
118    // The catch-all entry of everything not included somewhere else
119    // on this list.
120    OTHER = 4;
121
122    // The instant new tab page.
123    OBSOLETE_INSTANT_NTP = 5;  // DEPRECATED on August 2, 2013.
124
125    // The user is on a search result page that does search term replacement.
126    // This means the search terms are shown in the omnibox instead of the URL.
127    // In other words: Query in Omnibox is Active for this SRP.
128    SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6;
129
130    // The new tab page in which this omnibox interaction first started
131    // with the user having focus in the omnibox.
132    INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7;
133
134    // The new tab page in which this omnibox interaction first started with the
135    // user having focus in the fakebox. This is replaced by NTP_REALBOX.
136    // DEPRECATED on Aug 17, 2020.
137    OBSOLETE_INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8;
138
139    // The user is on a search result page that does not do search term
140    // replacement. This means the URL of the SRP is shown in the omnibox.
141    // In other words: Query in Omnibox is Inactive for this SRP.
142    SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9;
143
144    // The user is on the home screen.
145    APP_HOME = 10;
146
147    // The user is in the search app.
148    APP_SEARCH = 11;
149
150    // The user is in the maps app.
151    APP_MAPS = 12;
152
153    // This omnibox interaction started with the user tapping the search button.
154    SEARCH_BUTTON_AS_STARTING_FOCUS = 13;
155
156    // This interaction started with the user focusing or typing in the search
157    // box of the ChromeOS app list (a.k.a., launcher).
158    CHROMEOS_APP_LIST = 14;
159
160    // The new tab page in which this omnibox interaction started with the user
161    // having focus in the realbox.
162    NTP_REALBOX = 15;
163
164    // Android's Search Widget started directly from Launcher.
165    ANDROID_SEARCH_WIDGET = 16;
166
167    // Android's Start surface homepage.
168    START_SURFACE_HOMEPAGE = 17;  // DEPRECATED on Jun 17, 2022.
169
170    // New Tab with Omnibox focused with Android's start surface finale enabled.
171    START_SURFACE_NEW_TAB = 18;  // DEPRECATED on Jun 17, 2022.
172
173    // Android's improved Search Widget with new suggestions.
174    ANDROID_SHORTCUTS_WIDGET = 19;
175
176    // The New Tab Page zero-prefix suggestion prefetch.
177    // Used for prefetching suggestions and should never appear in an
178    // OmniboxEventProto or any of its derived histograms. (PageClassification
179    // enum is used in other places too, and not only OmniboxEventProto.)
180    NTP_ZPS_PREFETCH = 20;
181
182    // Used for Journeys requests in its landing page, side Panel or the NTP.
183    // Should never appear in an OmniboxEventProto or any of its derived
184    // histograms. (PageClassification enum is used in other places too, and not
185    // only OmniboxEventProto.)
186    JOURNEYS = 21;
187
188    // The Search Results Page zero-prefix suggestion prefetch.
189    // Used for prefetching suggestions and should never appear in an
190    // OmniboxEventProto or any of its derived histograms. (PageClassification
191    // enum is used in other places too, and not only OmniboxEventProto.)
192    SRP_ZPS_PREFETCH = 22;
193
194    // The catch-all zero-prefix suggestion prefetch for everything other than
195    // NTP and SRP.
196    // Used for prefetching suggestions and should never appear in an
197    // OmniboxEventProto or any of its derived histograms. (PageClassification
198    // enum is used in other places too, and not only OmniboxEventProto.)
199    OTHER_ZPS_PREFETCH = 23;
200
201    // The searchbox in the lens overlay.
202    CONTEXTUAL_SEARCHBOX = 24;
203
204    // The searchbox in the search side panel.
205    SEARCH_SIDE_PANEL_SEARCHBOX = 25;
206
207    // The searchbox in the lens side panel.
208    LENS_SIDE_PANEL_SEARCHBOX = 26;
209
210    // The user is visiting a search result page using Chrome Custom Tab.
211    // Equivalent of SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT for CCT.
212    SEARCH_RESULT_PAGE_ON_CCT = 27;
213
214    // The user is visiting a non DSE web page using Chrome Custom Tab.
215    // Equivalent of OTHER for CCT.
216    OTHER_ON_CCT = 28;
217
218    // The searchbox in the Android Hub.
219    ANDROID_HUB = 29;
220
221    // When adding new classifications, please consider adding them in
222    // chromium's chrome/browser/resources/omnibox/omnibox.html
223    // so that these new options are displayed on about:omnibox.
224  }
225
226  optional PageClassification current_page_classification = 10;
227
228  enum ModeType {
229    // Unknown type (should not be reported).
230    UNKNOWN_MODE = 0;
231
232    // This user is in web mode when looking for suggestions.
233    WEB_MODE = 1;
234
235    // This user is in image mode when looking for suggestions.
236    IMAGE_MODE = 2;
237  }
238
239  optional ModeType mode_type = 18;
240  optional OmniboxInputType input_type = 8;
241
242  // An enum used in multiple places below.
243  enum ProviderType {
244    UNKNOWN_PROVIDER = 0;  // Unknown provider (should not reach here)
245    HISTORY_URL = 1;       // URLs in history, or user-typed URLs
246    HISTORY_CONTENTS = 2;  // Matches for page contents of pages in history
247    HISTORY_QUICK = 3;     // Matches for recently or frequently visited pages
248                           // in history
249    SEARCH = 4;            // Search suggestions for the default search engine
250    KEYWORD = 5;           // Keyword-triggered searches
251    BUILTIN = 6;           // Built-in URLs, such as chrome://version
252    SHORTCUTS = 7;         // Recently selected omnibox suggestions
253    EXTENSION_APPS = 8;    // DEPRECATED. Suggestions from extensions or apps
254    CONTACT = 9;           // DEPRECATED. The user's contacts
255    BOOKMARK = 10;         // The user's bookmarks
256    ZERO_SUGGEST = 11;     // Suggestions based on the current page
257
258    // This enum value is currently only used by Android GSA. It represents
259    // a suggestion from the phone powered by go/icing.
260    ON_DEVICE = 12;
261
262    // This enum value is currently only used by Android GSA. It represents
263    // a suggestion powered by a Chrome content provider.
264    ON_DEVICE_CHROME = 13;
265    CLIPBOARD = 14;     // Suggestion coming from clipboard.
266    PHYSICAL_WEB = 15;  // DEPRECATED. Suggestions triggered by URLs broadcast
267                        // by nearby devices.
268    DOCUMENT = 16;      // Suggestions for documents in a cloud corpus.
269
270    // Non personalized query suggestions generated from a lightweight on device
271    // head model.
272    ON_DEVICE_HEAD = 17;
273
274    // Zero-prefix query suggestions based on device local history.
275    ZERO_SUGGEST_LOCAL_HISTORY = 18;
276
277    // Only used by Android Chrome. Represents a suggestion showing query tiles
278    // that users can tap on for building queries.
279    QUERY_TILE = 19;
280
281    // Clusters generated on-device from the user's Chrome history.
282    HISTORY_CLUSTER = 20;
283
284    // Suggestions from history derived from input with automatic corrections.
285    HISTORY_FUZZY = 21;
286
287    // URLs amongst the user's currently open tabs. These are not separately
288    // attached TAB_SWITCH actions; they're full dedicated suggestions produced
289    // by the OpenTabProvider (used by @tabs keyword scope and CrOS launcher).
290    OPEN_TAB = 22;
291
292    // Tab switch actions that attach to matches when the URL is equivalent
293    // to a URL in another open tab. Note this is distinct from OPEN_TAB above.
294    // This is a pseudo-provider for a TabSwitchAction attached to a suggestion
295    // when AutocompleteResult::ConvertOpenTabMatches finds matching open tabs.
296    TAB_SWITCH = 23;
297
298    // Omnibox Pedals: specialized actions that may be attached to matches.
299    // This is a pseudo-provider for actions produced by OmniboxPedalProvider
300    // and attached to suggestions by AutocompleteResult::AttachPedalsToMatches.
301    PEDALS = 24;
302
303    // Featured search that includes the starter pack and search engines created
304    // by the SiteSearchSettings Enterprise policy and marked as "featured" by
305    // an administrator.
306    FEATURED_SEARCH = 25;
307
308    // Compares the embeddings of the page contents of past visits with
309    // the embeddings of the input.
310    HISTORY_EMBEDDINGS = 26;
311
312    // Caches and suggests recent calculator answers from the search provider.
313    CALCULATOR = 27;
314
315    // URLs amongst the user's synced sessions.
316    CROSS_DEVICE_TAB = 28;
317  }
318
319  // The result set displayed on the completion popup
320  // Next tag: 11
321  message Suggestion {
322    // Where does this result come from?
323    optional ProviderType provider = 1;
324
325    // What kind of result this is.
326    // This corresponds to the AutocompleteMatch::Type enumeration in
327    // components/omnibox/autocomplete_match.h
328    // (except for Android GSA result types).
329    enum ResultType {
330      UNKNOWN_RESULT_TYPE = 0;    // Unknown type (should not reach here)
331      URL_WHAT_YOU_TYPED = 1;     // The input as a URL
332      HISTORY_URL = 2;            // A past page whose URL contains the input
333      HISTORY_TITLE = 3;          // A past page whose title contains the input
334      HISTORY_BODY = 4;           // DEPRECATED. A past page whose body
335                                  // contains the input
336      HISTORY_KEYWORD = 5;        // A past page whose keyword contains the
337                                  // input
338      NAVSUGGEST = 6;             // A suggested URL
339                                  //
340                                  // result_subtype_identifier is currently used
341                                  // for contextual zero-suggest suggestions
342                                  // provided by the experimental service (note
343                                  // that not all NAVSUUGGEST suggestions come
344                                  // from the experimental service).
345                                  // For subtype definitions, please contact
346                                  // gcomanici@chromium.org.
347      SEARCH_WHAT_YOU_TYPED = 7;  // The input as a search query (with the
348                                  // default engine)
349      SEARCH_HISTORY = 8;         // A past search (with the default engine)
350                                  // containing the input
351      SEARCH_SUGGEST = 9;         // A suggested search (with the default
352                                  // engine) for a query.
353      SEARCH_OTHER_ENGINE = 10;   // A search with a non-default engine
354      EXTENSION_APP = 11;         // DEPRECATED. An Extension App with a
355                                  // title/url that contains the input.
356      CONTACT = 12;               // One of the user's contacts
357      BOOKMARK_TITLE = 13;        // A bookmark with a title/url that contains
358                                  // the input.
359      SEARCH_SUGGEST_ENTITY = 14;  // A suggested search for an entity.
360      SEARCH_SUGGEST_TAIL = 15;    // A suggested search to complete the tail of
361                                   // the query.
362      SEARCH_SUGGEST_PERSONALIZED = 16;  // A personalized suggested search.
363      SEARCH_SUGGEST_PROFILE = 17;   // A personalized suggested search for a
364                                     // Google+ profile.
365      APP_RESULT = 18;               // Result from an installed app
366                                     // (eg: a gmail email).
367                                     // Used by Android GSA for on-device
368                                     // suggestion logging.
369      APP = 19;                      // An app result (eg: the gmail app).
370                                     // Used by Android GSA for on-device
371                                     // suggestion logging.
372      LEGACY_ON_DEVICE = 20;         // An on-device result from a legacy
373                                     // provider. That is, this result is not
374                                     // from the on-device suggestion provider
375                                     // (go/icing). This field is
376                                     // used by Android GSA for on-device
377                                     // suggestion logging.
378      NAVSUGGEST_PERSONALIZED = 21;  // A personalized url.
379      SEARCH_SUGGEST_ANSWER = 22;    // DEPRECATED. Answers no longer have their
380                                     // own type but instead can be attached to
381                                     // suggestions of any type.
382      CALCULATOR = 23;               // A calculator answer.
383      CLIPBOARD_URL = 24;            // An URL based on the clipboard.
384      PHYSICAL_WEB = 25;             // DEPRECATED. A Physical Web nearby URL.
385      PHYSICAL_WEB_OVERFLOW = 26;  // DEPRECATED. An item representing multiple
386                                   // Physical Web nearby URLs.
387      DOCUMENT = 27;               // An item representing a cloud document
388                                   // suggestion.
389      CLIPBOARD_TEXT = 28;         // Text based on the clipboard.
390      CLIPBOARD_IMAGE = 29;        // An image based on the clipboard.
391      TILE_SUGGESTION = 30;        // A search query from Chrome Query Tiles
392                                   // feature. Only used by Android.
393      HISTORY_CLUSTER = 31;        // A past page that is a member of a cluster
394                                   // (an aggregation of related searches and
395                                   // URLs from the user's history) that
396                                   // contains the input (the input might or
397                                   // might not also match the title or URL of
398                                   // this page).
399      OPEN_TAB = 32;      // A currently open tab whose URL contains the input.
400                          // Note: This is for dedicated matches produced by
401                          // OpenTabProvider, not a general TAB_SWITCH action.
402      STARTER_PACK = 33;  // A built-in URL suggestion specifically created for
403                          // the starter pack keyword mode chip to attach to.
404      TAB_SWITCH = 34;    // A tab-switch action (distinct from OPEN_TAB).
405      PEDAL = 35;         // A pedal action.
406      HISTORY_EMBEDDINGS = 36;  // A past page whose contents have similar
407                                // embeddings to the query.
408      FEATURED_ENTERPRISE_SEARCH = 37;  // Search engine set by the organization
409                                        // via the SiteSearchSettings policy and
410                                        // marked as featured.
411      NULL_RESULT_MESSAGE = 38;         // Informational messages that cannot be
412                                        // navigated to. IPH suggestions which
413                                        // use this type are deletable.
414      CROSS_DEVICE_TAB = 39;            // A URL opened on another device.
415      HISTORY_EMBEDDINGS_ANSWER = 40;   // A generated answer based on past
416                                        // visits with similar embeddings to the
417                                        // query.
418    }
419
420    optional ResultType result_type = 2;
421
422    // The relevance score for this suggestion.
423    optional int32 relevance = 3;
424
425    // How many times this result was typed in / selected from the omnibox
426    // in this profile.
427    // Only set for some providers and result_types.  At the time of
428    // writing this comment, it is only set for HistoryURL and
429    // HistoryQuickProvider matches.
430    optional int32 typed_count = 5;
431
432    // Whether this item is starred (bookmarked) in this profile.
433    optional bool is_starred = 4 [deprecated = true];
434
435    // Whether this item is disabled in the UI (not clickable).
436    optional bool is_disabled = 6;
437
438    // Used to identify the specific source / type for suggestions by the
439    // suggest server. The meaning of individual values is determined by the
440    // provider of each suggestion type and is different for every suggestion
441    // type. See enum ResultType above for more details.
442    optional int32 result_subtype_identifier = 7;
443
444    // Whether the suggestion presented in the match, regardless of type,
445    // matched an open tab.
446    optional bool has_tab_match = 8;
447
448    // Whether this suggestion came associated with a keyword.  Does not include
449    // suggestions that came from the default search engine unless the search
450    // engine was explicitly invoked.  As two common examples,
451    // |is_keyword_suggestion| will be true for suggestions from explicitly-
452    // invoked suggestions (whether from a search engine or an extension).  It
453    // will also be true for suggestions from a keyword that wasn't explicitly
454    // requested.  For example, if a user has Google as their default search
455    // engine, the input "bing testing" will often show a suggestion to "Search
456    // Bing for testing" in the dropdown.  This suggestion will be marked as
457    // |is_keyword_suggestion|.
458    optional bool is_keyword_suggestion = 9;
459
460    // Signals for machine learning scoring (logged by client code).
461    // See details: http://shortn/_B21YgmkLs9.
462    //
463    // Currently, this message is populated for both URL and Search suggestions
464    // and only when there is a click on an Omnibox suggestion.
465    message ScoringSignals {
466      // Number of times the URL was navigated to using the Omnibox for this
467      // profile on this device, and all other devices syncing with this
468      // profile. Only include typed visits from the last 90 days. Discounted by
469      // a time-decaying factor with a 30-day half-life based on the last visit
470      // timestamp.
471      optional int32 typed_count = 1;
472
473      // Number of times the URL was visited in general for this profile on this
474      // device. Note that this will soon be across syncing devices with the
475      // rollout of full history sync in 2023. Only include visits from the last
476      // 90 days. Discounted by a time-decaying factor with a 30-day half-life
477      // based on the last visit timestamp.
478      optional int32 visit_count = 2;
479
480      // Elapsed time since last visit for this profile on this device. Uses the
481      // local client-side timestamps. Can be unreliable as local times can
482      // change in between different runs of Chrome.
483      optional int64 elapsed_time_last_visit_secs = 3;
484
485      // Number of times the suggestion was visited with the current input or
486      // prefix of it for this profile on this device.
487      // Discounted by a time-decaying factor with a 1-week half-life based on
488      // the last visit timestamp.
489      optional int32 shortcut_visit_count = 4;
490
491      // Length of the shortest shortcut text.
492      // Useful in comparison with |typed_length|.
493      optional int32 shortest_shortcut_len = 5;
494
495      // Elapsed time since last shortcut visit for this profile on this device.
496      // Uses the local client-side timestamps. Can be unreliable as local times
497      // can change in between different runs of Chrome.
498      optional int64 elapsed_time_last_shortcut_visit_sec = 6;
499
500      // URL points to the root page of a website, i.e., no query, path words,
501      // or references after "/".
502      optional bool is_host_only = 7;
503
504      // Number of bookmarks for this profile with this URL.
505      optional int32 num_bookmarks_of_url = 8;
506
507      // Position of the first matched bookmark title term.
508      // E.g. 4 for input 'x' and title "0123x56".
509      // Not set when there is no match in the bookmark title.
510      optional int32 first_bookmark_title_match_position = 9;
511
512      // Total length of matched strings in the bookmark title. Can be larger
513      // than the input text length. The input text is split by whitespaces, and
514      // each input word is matched against the title separately. Their matching
515      // lengths are summed. Similarly for other text matching signals below.
516      // E.g. 9 for input "[abc] ijk [xyz]" and title "[abc] def [xyz] - [xyz]".
517      // Set to 0 when there is no match in the title.
518      optional int32 total_bookmark_title_match_length = 10;
519
520      // Number of input terms matched by bookmark title. Take the maximum when
521      // there are multiple matching bookmarks of this URL.
522      // E.g., 1 for input "[a] b" and bookmark title "[a] book title".
523      // Not set when the user does not have this URL bookmarked.
524      optional int32 num_input_terms_matched_by_bookmark_title = 11;
525
526      // Position of the first matched URL substring.
527      // URL scheme or TLD matches are excluded, though those characters are
528      // counted when assessing match position. E.g., 11 for 't' in
529      // "https://hos[t].com" Not set when there is no URL match.
530      optional int32 first_url_match_position = 12;
531
532      // Total length of the matched URL strings. Can be longer than the input
533      // string. E.g., Given input "ab abc" and url "abc.com/ab", total is 7 (4
534      // for "ab" in "[ab]c.com/[ab]" and 3 for "abc" in
535      // "[abc].com"). Set to 0 when there is no URL string match.
536      optional int32 total_url_match_length = 13;
537
538      // One word matches host at a word boundary. E.g., true for input "[h] a"
539      // and "[h].com", Set to false when there are matches in the host but none
540      // at word boundaries. E.g., false for input "a" and "h[a].com". Not set
541      // when there is no host match.
542      optional bool host_match_at_word_boundary = 14;
543
544      // Total length of the matched host substrings.
545      // Can be larger than the input text.
546      // E.g., 3 for input "h a" and "[h]ost[aa].com".
547      // Set to 0 when there is no host match.
548      optional int32 total_host_match_length = 15;
549
550      // Total length of the matched substrings in the path at word boundaries.
551      // Can be larger than the input text. E.g. 3 for 'p' in
552      // 'a.com/[p]ath_[p]ath/[p]ath'. Set to 0 when there are no such matches.
553      optional int32 total_path_match_length = 16;
554
555      // Total length of the matched substrings in the query_or_ref at word
556      // boundaries. Can be larger than the input text.
557      // E.g., 3 for input '[qu] [a]' and 'a.com/a?[qu]ery_[a]'.
558      // Set to 0 when there are no such matches.
559      optional int32 total_query_or_ref_match_length = 17;
560
561      // Total length of the matched substrings in the page title at word
562      // boundaries. Can be larger than the input text.
563      // E.g., 2 for input "[a] [t] x" and page title "[a]bc [t]itle".
564      // Set to 0 when there is no title match.
565      optional int32 total_title_match_length = 18;
566
567      // Has matches that are not in schemes (e.g., "https") or "www".
568      optional bool has_non_scheme_www_match = 19;
569
570      // Number of input terms matched by title.
571      // E.g., 1 for input "[a] b" and title "[a] title [a]".
572      // Useful in comparison with |num_typed_terms|.
573      optional int32 num_input_terms_matched_by_title = 20;
574
575      // Number of input terms matched by url.
576      // Useful in comparison with |num_typed_terms|.
577      // E.g., 1 for input "[a] b" and url "[a].com".
578      optional int32 num_input_terms_matched_by_url = 21;
579
580      // Length of url. E.g., 22 for "https://www.host.com/p".
581      optional int32 length_of_url = 22;
582
583      // Site engagement score for the site the URL is on. See
584      // https://www.chromium.org/developers/design-documents/site-engagement/
585      optional float site_engagement = 23;
586
587      // True if url can be default match.
588      // Currently, this requires single-term input, and match needs to begin
589      // immediately after '', scheme, or 'http://www' in the URL, e.g., given
590      // input 'w', true for "https://www.[w]sj.com" or "[w]ww.a.com", false for
591      // "host[w].com". ref:
592      // https://source.chromium.org/chromium/chromium/src/+/main:components/omnibox/browser/scored_history_match.cc;l=187?q=inline%20autocomplete
593      optional bool allowed_to_be_default_match = 24;
594
595      // Server-generated relevance score provided by the remote Suggest service
596      // for this suggestion.
597      // This signal contains the raw score received from the Suggest service
598      // ("google:suggestrelevance") and does not reflect any client-side
599      // adjustments (unlike the value of the `relevance` field above).
600      // As such, this signal will take on the following values:
601      //   - Non-zero: Search suggestion with `relevance_from_server` set to
602      //               `true`
603      //   - Zero:     Search suggestion with `relevance_from_server` set to
604      //               `false` OR non-Search suggestion (obtained from any
605      //               source)
606      //   - Unset:    Otherwise (due to unexpected client-side behavior)
607      optional int32 search_suggest_relevance = 25;
608
609      // Moved to OmniboxScoringSignals proto in cl/651828883:
610      optional bool is_search_suggest_entity = 26 [deprecated = true];
611
612      // Moved to OmniboxScoringSignals proto in cl/651828883:
613      optional bool is_verbatim = 27 [deprecated = true];
614    }
615
616    optional ScoringSignals scoring_signals = 10;
617  }
618
619  repeated Suggestion suggestion = 9;
620
621  // A data structure that holds per-provider information, general information
622  // not associated with a particular result.
623  // Next tag: 6
624  message ProviderInfo {
625    // Which provider generated this ProviderInfo entry.
626    optional ProviderType provider = 1;
627
628    // The provider's done() value, i.e., whether it's completed processing
629    // the query.  Providers which don't do any asynchronous processing
630    // will always be done.
631    optional bool provider_done = 2;
632
633    // The set of field trials that have triggered in the most recent query,
634    // possibly affecting the shown suggestions.  Each element is a hash
635    // of the corresponding field trial name.
636    // See chrome/browser/autocomplete/search_provider.cc for a specific usage
637    // DEPRECATED with crrev.com/c/4126664 1/4/23; replaced by
638    // `feature_triggered`.
639    // example.
640    repeated fixed32 field_trial_triggered = 3 [deprecated = true];
641
642    // Same as above except that the set of field trials is a union of all field
643    // trials that have triggered within the current omnibox session including
644    // the most recent query.
645    // See AutocompleteController::ResetSession() for more details on the
646    // definition of a session.
647    // See chrome/browser/autocomplete/search_provider.cc for a specific usage
648    // example.
649    // DEPRECATED with crrev.com/c/4126664 1/4/23; replaced by
650    // `feature_triggered_in_session`.
651    repeated fixed32 field_trial_triggered_in_session = 4 [deprecated = true];
652
653    // The number of times this provider returned a non-zero number of
654    // suggestions during this omnibox session.
655    // Note that each provider may define a session differently for its
656    // purposes.
657    optional int32 times_returned_results_in_session = 5;
658  }
659
660  // A list of diagnostic information about each provider.  Providers
661  // will appear at most once in this list.
662  repeated ProviderInfo provider_info = 12;
663
664  // Whether the Omnibox was in keyword mode, however it was entered.
665  optional bool in_keyword_mode = 19;
666
667  // How the Omnibox got into keyword mode. Not present if not in keyword
668  // mode.
669  enum KeywordModeEntryMethod {
670    INVALID = 0;
671    TAB = 1;                // Select a suggestion that provides a keyword hint
672                            // and press Tab.
673    SPACE_AT_END = 2;       // Type a complete keyword and press Space.
674    SPACE_IN_MIDDLE = 3;    // Press Space in the middle of an input in order to
675                            // separate it into a keyword and other text.
676    KEYBOARD_SHORTCUT = 4;  // Press ^K.
677    QUESTION_MARK = 5;      // Press Question-mark without any other input.
678    CLICK_HINT_VIEW = 6;    // Select a suggestion that provides a keyword hint
679                            // and click the reminder that one can press Tab.
680    TAP_HINT_VIEW = 7;      // Select a suggestion that provides a keyword hint
681                            // and touch the reminder that one can press Tab.
682    SELECT_SUGGESTION = 8;  // Select a keyword suggestion, such as by arrowing
683                            // or tabbing to it.
684  }
685
686  optional KeywordModeEntryMethod keyword_mode_entry_method = 20;
687
688  // Whether the omnibox input is a search query that is started
689  // by clicking on a image tile.
690  optional bool is_query_started_from_tile = 21;
691
692  enum Feature {
693    RICH_AUTOCOMPLETION = 0;
694
695    SHORT_BOOKMARK_SUGGESTIONS_BY_TOTAL_INPUT_LENGTH = 2;
696    FUZZY_URL_SUGGESTIONS = 3;
697    HISTORY_CLUSTER_SUGGESTION = 4;
698    DOMAIN_SUGGESTIONS = 5;
699
700    // Whether the `SearchProvider` response included:
701    // '"google:fieldtrialtriggered":true'.
702    REMOTE_SEARCH_FEATURE = 6;
703
704    // Like `REMOTE_SEARCH_FEATURE`, but for the `ZeroSearchProvider`.
705    REMOTE_ZERO_SUGGEST_FEATURE = 7;
706    SHORTCUT_BOOST = 8;
707    REMOTE_SECONDARY_ZERO_SUGGEST = 9;
708    ML_URL_SCORING = 10;
709    COMPANY_ENTITY_ADJUSTMENT = 11;
710
711    // Whether history embeddings model was ran in the omnibox. Logged even if
712    // the model returned 0 matches or its matches were hidden. Suffixed with
713    // '_FEATURE' to avoid name conflict with 'ProviderType.HISTORY_EMBEDDINGS'.
714    HISTORY_EMBEDDINGS_FEATURE = 12;
715  }
716
717  // The set of features triggered in the most recent query. Each element is a
718  // value of `Features` enum.
719  repeated int32 legacy_feature_triggered = 24 [deprecated = true];
720
721  // Like above except that the set of features is a union of all features that
722  // triggered within the current omnibox session including the most recent
723  // query. See `AutocompleteController::ResetSession()` for more details on the
724  // definition of a session.
725  repeated int32 legacy_feature_triggered_in_session = 22 [deprecated = true];
726
727  // The set of features triggered in the most recent query.
728  repeated Feature feature_triggered = 25;
729
730  // Like above except that the set of features is a union of all features that
731  // triggered within the current omnibox session including the most recent
732  // query. See `AutocompleteController::ResetSession()` for more details on the
733  // definition of a session.
734  repeated Feature feature_triggered_in_session = 26;
735
736  // Profile data of the user. Currently, only logged when there is a URL click.
737  message ProfileData {
738    // Total number of bookmarks in the profile this omnibox interaction took
739    // place in.
740    optional int32 total_num_bookmarks = 1;
741
742    // Total number of URLs stored in the history database in the profile this
743    // omnibox interaction took place in.
744    optional int32 total_num_history_urls = 2;
745
746    // Is signed into the browser. Set to false for Guest and Incognito
747    // profiles. Not set when signed-in status is unknown.
748    optional bool is_signed_into_browser = 3;
749
750    // Is sync-enabled.
751    optional bool is_sync_enabled = 4;
752  }
753
754  optional ProfileData profile_data = 23;
755
756  // The position of the omnibox.
757  enum OmniboxPosition {
758    // Unknown position (should not be reported).
759    UNKNOWN_POSITION = 0;
760
761    // The omnibox is on the top edge of the screen.
762    TOP_POSITION = 1;
763
764    // The omnibox is on the bottom edge of the screen.
765    BOTTOM_POSITION = 2;
766  }
767
768  // The position of the steady state (unfocused) omnibox.  Logged on iOS only;
769  // will be set on iOS with the BottomOmniboxSteadyStateIOS experiment.
770  // TODO(christianxu): Update this on experiment cleanup.
771  optional OmniboxPosition steady_state_omnibox_position = 27;
772}
773