File: omnibox_event.proto

package info (click to toggle)
chromium 139.0.7258.127-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 6,122,068 kB
  • sloc: cpp: 35,100,771; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (856 lines) | stat: -rw-r--r-- 40,201 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

syntax = "proto2";

option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.components.metrics";

option java_outer_classname = "OmniboxEventProtos";

package metrics;

import "omnibox_input_type.proto";

// Stores information about an omnibox interaction.
// Next tag: 29
message OmniboxEventProto {
  // The timestamp for the event, in seconds.
  // This value comes from Chromium's TimeTicks::Now(), which is an abstract
  // time value that is guaranteed to always be non-decreasing (regardless of
  // Daylight Saving Time or any other changes to the system clock).
  // These numbers are only comparable within a session.  To sequence events
  // across sessions, order by the |session_id| from the
  // ChromeUserMetricsExtension message.
  optional int64 time_sec = 1;

  // The id of the originating tab for this omnibox interaction.
  // This is the current tab *unless* the user opened the target in a new tab.
  // In those cases, this is unset.  Tab ids are unique for a given session_id
  // (in the containing protocol buffer ChromeUserMetricsExtensionProto).
  optional int32 tab_id = 2;

  // The number of characters the user had typed before autocompleting.
  optional int32 typed_length = 3;

  // Whether the user deleted text immediately before selecting an omnibox
  // suggestion.  This is usually the result of pressing backspace or delete.
  optional bool just_deleted_text = 11;

  // The number of terms that the user typed in the omnibox.
  optional int32 num_typed_terms = 4;

  // The index of the item that the user selected in the omnibox popup list.
  // This corresponds the index of the |suggestion| below.
  optional int32 selected_index = 5;

  // Whether the user selected the option to switch tabs (or ignored it
  // and navigated). If true, one or more |Suggestions| will have
  // |has_tab_match| set as well, which must include the |selected_index|.
  optional bool selected_tab_match = 17;

  // DEPRECATED. Whether or not the top match was hidden in the omnibox
  // suggestions dropdown.
  optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14
      [deprecated = true];

  // Whether the omnibox popup is open.  It can be closed if, for instance,
  // the user clicks in the omnibox and hits return to reload the same page.
  // If the popup is closed, the suggestion list will contain only one item
  // and selected_index will be 0 (pointing to that single item).  Because
  // paste-and-search/paste-and-go actions ignore the current content of the
  // omnibox dropdown (if it is open) when they happen, we pretend the
  // dropdown is closed when logging these.
  optional bool is_popup_open = 15;

  // True if this is a paste-and-search or paste-and-go action.  (The codebase
  // refers to both these types as paste-and-go.)
  optional bool is_paste_and_go = 16;

  // The length of the inline autocomplete text in the omnibox.
  // The sum |typed_length| + |completed_length| gives the full length of the
  // user-visible text in the omnibox.
  // This field is only set for suggestions that are allowed to be the default
  // match and omitted otherwise.  The first suggestion is always allowed to
  // be the default match.  (This is an enforced constraint.)  Hence, if
  // |selected_index| == 0, then this field will always be set.
  optional int32 completed_length = 6;

  // The amount of time, in milliseconds, since the user first began modifying
  // the text in the omnibox.  If at some point after modifying the text, the
  // user reverts the modifications (thus seeing the current web page's URL
  // again), then writes in the omnibox again, this elapsed time should start
  // from the time of the second series of modification.
  optional int64 typing_duration_ms = 7;

  // The amount of time, in milliseconds, since the last time the default
  // (inline) match changed.  This may be longer than the time since the
  // last keystroke.  (The last keystroke may not have changed the default
  // match.)  It may also be shorter than the time since the last keystroke
  // because the default match might have come from an asynchronous
  // provider.  Regardless, it should always be less than or equal to
  // the field |typing_duration_ms|.
  optional int64 duration_since_last_default_match_update_ms = 13;

  // The type of page the user was on when they used the omnibox. Or the type of
  // page for which suggestions were prefetched from the server.
  enum PageClassification {
    // An invalid URL; shouldn't happen.
    INVALID_SPEC = 0;

    // chrome://newtab/.  For modern versions of Chrome, this is only reported
    // when an extension is replacing the new tab page. Otherwise, new tab
    // page interactions will be reported as NTP_REALBOX, or
    // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS.
    // For old versions of Chrome, this was reported for the default New Tab
    // Page.
    NTP = 1;

    // about:blank.
    BLANK = 2;

    // The user's home page.  Note that if the home page is set to any
    // of the new tab page versions or to about:blank, then we'll
    // classify the page into those categories, not HOME_PAGE.
    HOME_PAGE = 3;

    // The catch-all entry of everything not included somewhere else
    // on this list.
    OTHER = 4;

    // The instant new tab page.
    OBSOLETE_INSTANT_NTP = 5;  // DEPRECATED on August 2, 2013.

    // The user is on a search result page that does search term replacement.
    // This means the search terms are shown in the omnibox instead of the URL.
    // In other words: Query in Omnibox is Active for this SRP.
    SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6;

    // The new tab page in which this omnibox interaction first started
    // with the user having focus in the omnibox.
    INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7;

    // The new tab page in which this omnibox interaction first started with the
    // user having focus in the fakebox. This is replaced by NTP_REALBOX.
    // DEPRECATED on Aug 17, 2020.
    OBSOLETE_INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8;

    // The user is on a search result page that does not do search term
    // replacement. This means the URL of the SRP is shown in the omnibox.
    // In other words: Query in Omnibox is Inactive for this SRP.
    SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9;

    // The user is on the home screen.
    APP_HOME = 10;

    // The user is in the search app.
    APP_SEARCH = 11;

    // The user is in the maps app.
    APP_MAPS = 12;

    // This omnibox interaction started with the user tapping the search button.
    SEARCH_BUTTON_AS_STARTING_FOCUS = 13;

    // This interaction started with the user focusing or typing in the search
    // box of the ChromeOS app list (a.k.a., launcher).
    CHROMEOS_APP_LIST = 14;

    // The new tab page in which this omnibox interaction started with the user
    // having focus in the realbox.
    NTP_REALBOX = 15;

    // Android's Search Widget started directly from Launcher.
    ANDROID_SEARCH_WIDGET = 16;

    // Android's Start surface homepage.
    START_SURFACE_HOMEPAGE = 17;  // DEPRECATED on Jun 17, 2022.

    // New Tab with Omnibox focused with Android's start surface finale enabled.
    START_SURFACE_NEW_TAB = 18;  // DEPRECATED on Jun 17, 2022.

    // Android's improved Search Widget with new suggestions.
    ANDROID_SHORTCUTS_WIDGET = 19;

    // The New Tab Page zero-prefix suggestion prefetch.
    // Used for prefetching suggestions and should never appear in an
    // OmniboxEventProto or any of its derived histograms. (PageClassification
    // enum is used in other places too, and not only OmniboxEventProto.)
    NTP_ZPS_PREFETCH = 20;

    // Used for Journeys requests in its landing page, side Panel or the NTP.
    // Should never appear in an OmniboxEventProto or any of its derived
    // histograms. (PageClassification enum is used in other places too, and not
    // only OmniboxEventProto.)
    JOURNEYS = 21;

    // The Search Results Page zero-prefix suggestion prefetch.
    // Used for prefetching suggestions and should never appear in an
    // OmniboxEventProto or any of its derived histograms. (PageClassification
    // enum is used in other places too, and not only OmniboxEventProto.)
    SRP_ZPS_PREFETCH = 22;

    // The catch-all zero-prefix suggestion prefetch for everything other than
    // NTP and SRP.
    // Used for prefetching suggestions and should never appear in an
    // OmniboxEventProto or any of its derived histograms. (PageClassification
    // enum is used in other places too, and not only OmniboxEventProto.)
    OTHER_ZPS_PREFETCH = 23;

    // The searchbox in the lens overlay.
    CONTEXTUAL_SEARCHBOX = 24;

    // The searchbox in the search side panel.
    SEARCH_SIDE_PANEL_SEARCHBOX = 25;

    // The searchbox in the lens side panel.
    LENS_SIDE_PANEL_SEARCHBOX = 26;

    // The user is visiting a search result page using Chrome Custom Tab.
    // Equivalent of SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT for CCT.
    SEARCH_RESULT_PAGE_ON_CCT = 27;

    // The user is visiting a non DSE web page using Chrome Custom Tab.
    // Equivalent of OTHER for CCT.
    OTHER_ON_CCT = 28;

    // The searchbox in the Android Hub.
    ANDROID_HUB = 29;

    // JumpStart Omnibox feature (Android): start Chrome to Search Activity on
    // Low End devices.
    JUMP_START = 30;

    // When adding new classifications, please update the `OmniboxPageContext`
    // variants listed in chromium's
    // tools/metrics/histograms/metadata/omnibox/histograms.xml and also
    // consider adding them in chromium's
    // chrome/browser/resources/omnibox/omnibox.html so that these new options
    // are displayed in the chrome://omnibox debug UI.
  }

  optional PageClassification current_page_classification = 10;

  enum ModeType {
    // Unknown type (should not be reported).
    UNKNOWN_MODE = 0;

    // This user is in web mode when looking for suggestions.
    WEB_MODE = 1;

    // This user is in image mode when looking for suggestions.
    IMAGE_MODE = 2;
  }

  optional ModeType mode_type = 18;
  optional OmniboxInputType input_type = 8;

  // An enum used in multiple places below.
  enum ProviderType {
    UNKNOWN_PROVIDER = 0;  // Unknown provider (should not reach here)
    HISTORY_URL = 1;       // URLs in history, or user-typed URLs
    HISTORY_CONTENTS = 2;  // Matches for page contents of pages in history
    HISTORY_QUICK = 3;     // Matches for recently or frequently visited pages
                           // in history
    SEARCH = 4;            // Search suggestions for the default search engine
    KEYWORD = 5;           // Keyword-triggered searches
    BUILTIN = 6;           // Built-in URLs, such as chrome://version
    SHORTCUTS = 7;         // Recently selected omnibox suggestions
    EXTENSION_APPS = 8;    // DEPRECATED. Suggestions from extensions or apps
    CONTACT = 9;           // DEPRECATED. The user's contacts
    BOOKMARK = 10;         // The user's bookmarks
    ZERO_SUGGEST = 11;     // Suggestions based on the current page

    // This enum value is currently only used by Android GSA. It represents
    // a suggestion from the phone powered by go/icing.
    ON_DEVICE = 12;

    // This enum value is currently only used by Android GSA. It represents
    // a suggestion powered by a Chrome content provider.
    ON_DEVICE_CHROME = 13;
    CLIPBOARD = 14;     // Suggestion coming from clipboard.
    PHYSICAL_WEB = 15;  // DEPRECATED. Suggestions triggered by URLs broadcast
                        // by nearby devices.
    DOCUMENT = 16;      // Suggestions for documents in a cloud corpus.

    // Non personalized query suggestions generated from a lightweight on device
    // head model.
    ON_DEVICE_HEAD = 17;

    // Zero-prefix query suggestions based on device local history.
    ZERO_SUGGEST_LOCAL_HISTORY = 18;

    // Only used by Android Chrome. Represents a suggestion showing query tiles
    // that users can tap on for building queries.
    QUERY_TILE = 19;

    // Clusters generated on-device from the user's Chrome history.
    HISTORY_CLUSTER = 20;

    // Suggestions from history derived from input with automatic corrections.
    HISTORY_FUZZY = 21;

    // URLs amongst the user's currently open tabs. These are not separately
    // attached TAB_SWITCH actions; they're full dedicated suggestions produced
    // by the OpenTabProvider (used by @tabs keyword scope and CrOS launcher).
    OPEN_TAB = 22;

    // Tab switch actions that attach to matches when the URL is equivalent
    // to a URL in another open tab. Note this is distinct from OPEN_TAB above.
    // This is a pseudo-provider for a TabSwitchAction attached to a suggestion
    // when AutocompleteResult::ConvertOpenTabMatches finds matching open tabs.
    TAB_SWITCH = 23;

    // Omnibox Pedals: specialized actions that may be attached to matches.
    // This is a pseudo-provider for actions produced by OmniboxPedalProvider
    // and attached to suggestions by AutocompleteResult::AttachPedalsToMatches.
    PEDALS = 24;

    // Featured search that includes the starter pack and search engines created
    // by the SiteSearchSettings Enterprise policy and marked as "featured" by
    // an administrator.
    FEATURED_SEARCH = 25;

    // Compares the embeddings of the page contents of past visits with
    // the embeddings of the input.
    HISTORY_EMBEDDINGS = 26;

    // Caches and suggests recent calculator answers from the search provider.
    CALCULATOR = 27;

    // URLs amongst the user's synced sessions.
    CROSS_DEVICE_TAB = 28;

    // Suggestions from policy configured search aggregator keywords.
    ENTERPRISE_SEARCH_AGGREGATOR = 29;

    // Suggestions from extensions that have permission to use the omnibox api
    // without requiring keyword mode.
    UNSCOPED_EXTENSION = 30;

    // Recently closed tabs suggestions.
    RECENTLY_CLOSED_TABS = 31;

    // Most visited sites suggestions.
    MOST_VISITED_SITES = 32;

    // Contextual search autocomplete provider for the '@page' keyword mode of
    // the omnibox.
    CONTEXTUAL_SEARCH_PROVIDER = 33;

    // A verbatim match for the input.
    VERBATIM_MATCH = 34;

    // Groups of tabs which are available (or opened) locally. These results are
    // provided by the TabGroupsProvider. Currently only used by Android's hub
    // search feature.
    TAB_GROUP_PROVIDER = 35;
  }

  // The result set displayed on the completion popup
  // Next tag: 11
  message Suggestion {
    // Where does this result come from?
    optional ProviderType provider = 1;

    // What kind of result this is.
    // This corresponds to the AutocompleteMatch::Type enumeration in
    // components/omnibox/autocomplete_match.h
    // (except for Android GSA result types).
    enum ResultType {
      UNKNOWN_RESULT_TYPE = 0;    // Unknown type (should not reach here)
      URL_WHAT_YOU_TYPED = 1;     // The input as a URL
      HISTORY_URL = 2;            // A past page whose URL contains the input
      HISTORY_TITLE = 3;          // A past page whose title contains the input
      HISTORY_BODY = 4;           // DEPRECATED. A past page whose body
                                  // contains the input
      HISTORY_KEYWORD = 5;        // A past page whose keyword contains the
                                  // input
      NAVSUGGEST = 6;             // A suggested URL
                                  //
                                  // result_subtype_identifier is currently used
                                  // for contextual zero-suggest suggestions
                                  // provided by the experimental service (note
                                  // that not all NAVSUUGGEST suggestions come
                                  // from the experimental service).
                                  // For subtype definitions, please contact
                                  // gcomanici@chromium.org.
      SEARCH_WHAT_YOU_TYPED = 7;  // The input as a search query (with the
                                  // default engine)
      SEARCH_HISTORY = 8;         // A past search (with the default engine)
                                  // containing the input
      SEARCH_SUGGEST = 9;         // A suggested search (with the default
                                  // engine) for a query.
      SEARCH_OTHER_ENGINE = 10;   // A search with a non-default engine
      EXTENSION_APP = 11;         // DEPRECATED. An Extension App with a
                                  // title/url that contains the input.
      CONTACT = 12;               // One of the user's contacts
      BOOKMARK_TITLE = 13;        // A bookmark with a title/url that contains
                                  // the input.
      SEARCH_SUGGEST_ENTITY = 14;  // A suggested search for an entity.
      SEARCH_SUGGEST_TAIL = 15;    // A suggested search to complete the tail of
                                   // the query.
      SEARCH_SUGGEST_PERSONALIZED = 16;  // A personalized suggested search.
      SEARCH_SUGGEST_PROFILE = 17;   // A personalized suggested search for a
                                     // Google+ profile.
      APP_RESULT = 18;               // Result from an installed app
                                     // (eg: a gmail email).
                                     // Used by Android GSA for on-device
                                     // suggestion logging.
      APP = 19;                      // An app result (eg: the gmail app).
                                     // Used by Android GSA for on-device
                                     // suggestion logging.
      LEGACY_ON_DEVICE = 20;         // An on-device result from a legacy
                                     // provider. That is, this result is not
                                     // from the on-device suggestion provider
                                     // (go/icing). This field is
                                     // used by Android GSA for on-device
                                     // suggestion logging.
      NAVSUGGEST_PERSONALIZED = 21;  // A personalized url.
      SEARCH_SUGGEST_ANSWER = 22;    // DEPRECATED. Answers no longer have their
                                     // own type but instead can be attached to
                                     // suggestions of any type.
      CALCULATOR = 23;               // A calculator answer.
      CLIPBOARD_URL = 24;            // An URL based on the clipboard.
      PHYSICAL_WEB = 25;             // DEPRECATED. A Physical Web nearby URL.
      PHYSICAL_WEB_OVERFLOW = 26;  // DEPRECATED. An item representing multiple
                                   // Physical Web nearby URLs.
      DOCUMENT = 27;               // An item representing a cloud document
                                   // suggestion.
      CLIPBOARD_TEXT = 28;         // Text based on the clipboard.
      CLIPBOARD_IMAGE = 29;        // An image based on the clipboard.
      TILE_SUGGESTION = 30;        // A search query from Chrome Query Tiles
                                   // feature. Only used by Android.
      HISTORY_CLUSTER = 31;        // A past page that is a member of a cluster
                                   // (an aggregation of related searches and
                                   // URLs from the user's history) that
                                   // contains the input (the input might or
                                   // might not also match the title or URL of
                                   // this page).
      OPEN_TAB = 32;      // A currently open tab whose URL contains the input.
                          // Note: This is for dedicated matches produced by
                          // OpenTabProvider, not a general TAB_SWITCH action.
      STARTER_PACK = 33;  // A built-in URL suggestion specifically created for
                          // the starter pack keyword mode chip to attach to.
      TAB_SWITCH = 34;    // A tab-switch action (distinct from OPEN_TAB).
      PEDAL = 35;         // A pedal action.
      HISTORY_EMBEDDINGS = 36;  // A past page whose contents have similar
                                // embeddings to the query.
      FEATURED_ENTERPRISE_SEARCH = 37;  // Search engine set by the organization
                                        // via the SiteSearchSettings policy and
                                        // marked as featured.
      NULL_RESULT_MESSAGE = 38;         // Informational messages that cannot be
                                        // navigated to. IPH suggestions which
                                        // use this type are deletable.
      CROSS_DEVICE_TAB = 39;            // A URL opened on another device.
      HISTORY_EMBEDDINGS_ANSWER = 40;   // A generated answer based on past
                                        // visits with similar embeddings to the
                                        // query.
      TAB_GROUP = 41;                   // Tab group suggestion result.
    }

    optional ResultType result_type = 2;

    // The relevance score for this suggestion.
    optional int32 relevance = 3;

    // How many times this result was typed in / selected from the omnibox
    // in this profile.
    // Only set for some providers and result_types.  At the time of
    // writing this comment, it is only set for HistoryURL and
    // HistoryQuickProvider matches.
    optional int32 typed_count = 5;

    // Whether this item is starred (bookmarked) in this profile.
    optional bool is_starred = 4 [deprecated = true];

    // Whether this item is disabled in the UI (not clickable).
    optional bool is_disabled = 6;

    // Used to identify the specific source / type for suggestions by the
    // suggest server. The meaning of individual values is determined by the
    // provider of each suggestion type and is different for every suggestion
    // type. See enum ResultType above for more details.
    optional int32 result_subtype_identifier = 7;

    // Whether the suggestion presented in the match, regardless of type,
    // matched an open tab.
    optional bool has_tab_match = 8;

    // Whether this suggestion came associated with a keyword.  Does not include
    // suggestions that came from the default search engine unless the search
    // engine was explicitly invoked.  As two common examples,
    // |is_keyword_suggestion| will be true for suggestions from explicitly-
    // invoked suggestions (whether from a search engine or an extension).  It
    // will also be true for suggestions from a keyword that wasn't explicitly
    // requested.  For example, if a user has Google as their default search
    // engine, the input "bing testing" will often show a suggestion to "Search
    // Bing for testing" in the dropdown.  This suggestion will be marked as
    // |is_keyword_suggestion|.
    optional bool is_keyword_suggestion = 9;

    // Signals for machine learning scoring (logged by client code).
    // See details: http://shortn/_B21YgmkLs9.
    //
    // Currently, this message is populated for both URL and Search suggestions
    // and only when there is a click on an Omnibox suggestion.
    message ScoringSignals {
      // Number of times the URL was navigated to using the Omnibox for this
      // profile on this device, and all other devices syncing with this
      // profile. Only include typed visits from the last 90 days. Discounted by
      // a time-decaying factor with a 30-day half-life based on the last visit
      // timestamp.
      optional int32 typed_count = 1;

      // Number of times the URL was visited in general for this profile on this
      // device. Note that this will soon be across syncing devices with the
      // rollout of full history sync in 2023. Only include visits from the last
      // 90 days. Discounted by a time-decaying factor with a 30-day half-life
      // based on the last visit timestamp.
      optional int32 visit_count = 2;

      // Elapsed time since last visit for this profile on this device. Uses the
      // local client-side timestamps. Can be unreliable as local times can
      // change in between different runs of Chrome.
      optional int64 elapsed_time_last_visit_secs = 3;

      // Number of times the suggestion was visited with the current input or
      // prefix of it for this profile on this device.
      // Discounted by a time-decaying factor with a 1-week half-life based on
      // the last visit timestamp.
      optional int32 shortcut_visit_count = 4;

      // Length of the shortest shortcut text.
      // Useful in comparison with |typed_length|.
      optional int32 shortest_shortcut_len = 5;

      // Elapsed time since last shortcut visit for this profile on this device.
      // Uses the local client-side timestamps. Can be unreliable as local times
      // can change in between different runs of Chrome.
      optional int64 elapsed_time_last_shortcut_visit_sec = 6;

      // URL points to the root page of a website, i.e., no query, path words,
      // or references after "/".
      optional bool is_host_only = 7;

      // Number of bookmarks for this profile with this URL.
      optional int32 num_bookmarks_of_url = 8;

      // Position of the first matched bookmark title term.
      // E.g. 4 for input 'x' and title "0123x56".
      // Not set when there is no match in the bookmark title.
      optional int32 first_bookmark_title_match_position = 9;

      // Total length of matched strings in the bookmark title. Can be larger
      // than the input text length. The input text is split by whitespaces, and
      // each input word is matched against the title separately. Their matching
      // lengths are summed. Similarly for other text matching signals below.
      // E.g. 9 for input "[abc] ijk [xyz]" and title "[abc] def [xyz] - [xyz]".
      // Set to 0 when there is no match in the title.
      optional int32 total_bookmark_title_match_length = 10;

      // Number of input terms matched by bookmark title. Take the maximum when
      // there are multiple matching bookmarks of this URL.
      // E.g., 1 for input "[a] b" and bookmark title "[a] book title".
      // Not set when the user does not have this URL bookmarked.
      optional int32 num_input_terms_matched_by_bookmark_title = 11;

      // Position of the first matched URL substring.
      // URL scheme or TLD matches are excluded, though those characters are
      // counted when assessing match position. E.g., 11 for 't' in
      // "https://hos[t].com" Not set when there is no URL match.
      optional int32 first_url_match_position = 12;

      // Total length of the matched URL strings. Can be longer than the input
      // string. E.g., Given input "ab abc" and url "abc.com/ab", total is 7 (4
      // for "ab" in "[ab]c.com/[ab]" and 3 for "abc" in
      // "[abc].com"). Set to 0 when there is no URL string match.
      optional int32 total_url_match_length = 13;

      // One word matches host at a word boundary. E.g., true for input "[h] a"
      // and "[h].com", Set to false when there are matches in the host but none
      // at word boundaries. E.g., false for input "a" and "h[a].com". Not set
      // when there is no host match.
      optional bool host_match_at_word_boundary = 14;

      // Total length of the matched host substrings.
      // Can be larger than the input text.
      // E.g., 3 for input "h a" and "[h]ost[aa].com".
      // Set to 0 when there is no host match.
      optional int32 total_host_match_length = 15;

      // Total length of the matched substrings in the path at word boundaries.
      // Can be larger than the input text. E.g. 3 for 'p' in
      // 'a.com/[p]ath_[p]ath/[p]ath'. Set to 0 when there are no such matches.
      optional int32 total_path_match_length = 16;

      // Total length of the matched substrings in the query_or_ref at word
      // boundaries. Can be larger than the input text.
      // E.g., 3 for input '[qu] [a]' and 'a.com/a?[qu]ery_[a]'.
      // Set to 0 when there are no such matches.
      optional int32 total_query_or_ref_match_length = 17;

      // Total length of the matched substrings in the page title at word
      // boundaries. Can be larger than the input text.
      // E.g., 2 for input "[a] [t] x" and page title "[a]bc [t]itle".
      // Set to 0 when there is no title match.
      optional int32 total_title_match_length = 18;

      // Has matches that are not in schemes (e.g., "https") or "www".
      optional bool has_non_scheme_www_match = 19;

      // Number of input terms matched by title.
      // E.g., 1 for input "[a] b" and title "[a] title [a]".
      // Useful in comparison with |num_typed_terms|.
      optional int32 num_input_terms_matched_by_title = 20;

      // Number of input terms matched by url.
      // Useful in comparison with |num_typed_terms|.
      // E.g., 1 for input "[a] b" and url "[a].com".
      optional int32 num_input_terms_matched_by_url = 21;

      // Length of url. E.g., 22 for "https://www.host.com/p".
      optional int32 length_of_url = 22;

      // Site engagement score for the site the URL is on. See
      // https://www.chromium.org/developers/design-documents/site-engagement/
      optional float site_engagement = 23;

      // True if url can be default match.
      // Currently, this requires single-term input, and match needs to begin
      // immediately after '', scheme, or 'http://www' in the URL, e.g., given
      // input 'w', true for "https://www.[w]sj.com" or "[w]ww.a.com", false for
      // "host[w].com". ref:
      // https://source.chromium.org/chromium/chromium/src/+/main:components/omnibox/browser/scored_history_match.cc;l=187?q=inline%20autocomplete
      optional bool allowed_to_be_default_match = 24;

      // Server-generated relevance score provided by the remote Suggest service
      // for this suggestion.
      // This signal contains the raw score received from the Suggest service
      // ("google:suggestrelevance") and does not reflect any client-side
      // adjustments (unlike the value of the `relevance` field above).
      // As such, this signal will take on the following values:
      //   - Non-zero: Search suggestion with `relevance_from_server` set to
      //               `true`
      //   - Zero:     Search suggestion with `relevance_from_server` set to
      //               `false` OR non-Search suggestion (obtained from any
      //               source)
      //   - Unset:    Otherwise (due to unexpected client-side behavior)
      optional int32 search_suggest_relevance = 25;

      // Moved to OmniboxScoringSignals proto in cl/651828883:
      optional bool is_search_suggest_entity = 26 [deprecated = true];

      // Moved to OmniboxScoringSignals proto in cl/651828883:
      optional bool is_verbatim = 27 [deprecated = true];
      // Whether the host part of the `destination_url` associated with this
      // suggestion matches the host part of the URL for the page the user is
      // currently on.
      // As such, this signal will take on the following values:
      //   - True:  `destination_url` for this suggestion has the same host as
      //            the current page.
      //   - False: Current page is the NTP (any default search engine)
      //            OR `destination_url` for this suggestion is empty
      //            OR `destination_url` does not have the same host as the
      //            current page.
      //   - Unset: Otherwise (due to unexpected client-side behavior).
      optional bool destination_host_match_for_current_page = 35;
    }

    optional ScoringSignals scoring_signals = 10;
  }

  repeated Suggestion suggestion = 9;

  // A data structure that holds per-provider information, general information
  // not associated with a particular result.
  // Next tag: 6
  message ProviderInfo {
    // Which provider generated this ProviderInfo entry.
    optional ProviderType provider = 1;

    // The provider's done() value, i.e., whether it's completed processing
    // the query.  Providers which don't do any asynchronous processing
    // will always be done.
    optional bool provider_done = 2;

    // The set of field trials that have triggered in the most recent query,
    // possibly affecting the shown suggestions.  Each element is a hash
    // of the corresponding field trial name.
    // See chrome/browser/autocomplete/search_provider.cc for a specific usage
    // DEPRECATED with crrev.com/c/4126664 1/4/23; replaced by
    // `feature_triggered`.
    // example.
    repeated fixed32 field_trial_triggered = 3 [deprecated = true];

    // Same as above except that the set of field trials is a union of all field
    // trials that have triggered within the current omnibox session including
    // the most recent query.
    // See AutocompleteController::ResetSession() for more details on the
    // definition of a session.
    // See chrome/browser/autocomplete/search_provider.cc for a specific usage
    // example.
    // DEPRECATED with crrev.com/c/4126664 1/4/23; replaced by
    // `feature_triggered_in_session`.
    repeated fixed32 field_trial_triggered_in_session = 4 [deprecated = true];

    // The number of times this provider returned a non-zero number of
    // suggestions during this omnibox session.
    // Note that each provider may define a session differently for its
    // purposes.
    optional int32 times_returned_results_in_session = 5;
  }

  // A list of diagnostic information about each provider.  Providers
  // will appear at most once in this list.
  repeated ProviderInfo provider_info = 12;

  // Whether the Omnibox was in keyword mode, however it was entered.
  optional bool in_keyword_mode = 19;

  // The type of keyword used in keyword mode. The field storing this enum is
  // not present if not in keyword mode.
  enum KeywordType {
    KEYWORD_TYPE_UNSPECIFIED = 0;
    STARTER_PACK = 1;  // Starter pack keyword.
    PREPOPULATED = 2;  // Prepopulated keyword.
    EXTENSION = 3;     // Keyword set by extension.

    // Enterprise policy keyword types. Each enterprise keyword can be:
    // - Featured or non-featured
    // - Not-overridable or overridable
    // - Site search or search aggregator
    //   - Search aggregator keywords cannot be overridable
    //   - Search aggregator keywords always come in featured and non-featured
    //   pairs
    // All are set by policy.
    FEATURED_SEARCH_AGGREGATOR_SET_BY_POLICY = 4;
    FEATURED_SITE_SEARCH_SET_BY_POLICY = 5;
    NON_FEATURED_SITE_SEARCH_SET_BY_POLICY = 6;

    DEFAULT_SEARCH_ENGINE_SET_BY_POLICY = 7;       // Default search engine
                                                   // keyword set by policy.
    NON_SUBSTITUTING_SITE_SEARCH_SET_BY_USER = 8;  // Site search keyword
                                                   // without substitution
                                                   // set by user.
    SUBSTITUTING_SITE_SEARCH_SET_BY_USER = 9;      // Site search keyword
                                                   // with substitution
                                                   // set by user.
    DEFAULT_SEARCH_ENGINE_SET_BY_USER = 10;        // Default search engine
                                                   // keyword set by user.

    // See comment above for enterprise policy keywords.
    NON_FEATURED_SEARCH_AGGREGATOR_SET_BY_POLICY = 11;
    FEATURED_OVERRIDABLE_SITE_SEARCH_SET_BY_POLICY = 12;
    NON_FEATURED_OVERRIDABLE_SITE_SEARCH_SET_BY_POLICY = 13;
  }

  optional KeywordType keyword_type = 28;

  // How the Omnibox got into keyword mode. Not present if not in keyword
  // mode.
  enum KeywordModeEntryMethod {
    INVALID = 0;
    TAB = 1;                // Select a suggestion that provides a keyword hint
                            // and press Tab.
    SPACE_AT_END = 2;       // Type a complete keyword and press Space.
    SPACE_IN_MIDDLE = 3;    // Press Space in the middle of an input in order to
                            // separate it into a keyword and other text.
    KEYBOARD_SHORTCUT = 4;  // Press ^K.
    QUESTION_MARK = 5;      // Press Question-mark without any other input.
    CLICK_HINT_VIEW = 6;    // Select a suggestion that provides a keyword hint
                            // and click the reminder that one can press Tab.
    TAP_HINT_VIEW = 7;      // Select a suggestion that provides a keyword hint
                            // and touch the reminder that one can press Tab.
    SELECT_SUGGESTION = 8;  // Select a keyword suggestion, such as by arrowing
                            // or tabbing to it.
  }

  optional KeywordModeEntryMethod keyword_mode_entry_method = 20;

  // Whether the omnibox input is a search query that is started
  // by clicking on a image tile.
  optional bool is_query_started_from_tile = 21;

  enum Feature {
    RICH_AUTOCOMPLETION = 0;

    SHORT_BOOKMARK_SUGGESTIONS_BY_TOTAL_INPUT_LENGTH = 2;
    FUZZY_URL_SUGGESTIONS = 3;
    HISTORY_CLUSTER_SUGGESTION = 4;
    DOMAIN_SUGGESTIONS = 5;

    // Whether the `SearchProvider` response included:
    // '"google:fieldtrialtriggered":true'.
    REMOTE_SEARCH_FEATURE = 6;

    // Like `REMOTE_SEARCH_FEATURE`, but for the `ZeroSearchProvider`.
    REMOTE_ZERO_SUGGEST_FEATURE = 7;
    SHORTCUT_BOOST = 8;
    REMOTE_SECONDARY_ZERO_SUGGEST = 9;
    ML_URL_SCORING = 10;
    COMPANY_ENTITY_ADJUSTMENT = 11;

    // Whether history embeddings model was ran in the omnibox. Logged even if
    // the model returned 0 matches or its matches were hidden. Suffixed with
    // '_FEATURE' to avoid name conflict with 'ProviderType.HISTORY_EMBEDDINGS'.
    HISTORY_EMBEDDINGS_FEATURE = 12;
  }

  // The set of features triggered in the most recent query. Each element is a
  // value of `Features` enum.
  repeated int32 legacy_feature_triggered = 24 [deprecated = true];

  // Like above except that the set of features is a union of all features that
  // triggered within the current omnibox session including the most recent
  // query. See `AutocompleteController::ResetSession()` for more details on the
  // definition of a session.
  repeated int32 legacy_feature_triggered_in_session = 22 [deprecated = true];

  // The set of features triggered in the most recent query.
  repeated Feature feature_triggered = 25;

  // Like above except that the set of features is a union of all features that
  // triggered within the current omnibox session including the most recent
  // query. See `AutocompleteController::ResetSession()` for more details on the
  // definition of a session.
  repeated Feature feature_triggered_in_session = 26;

  // Profile data of the user. Currently, only logged when there is a URL click.
  message ProfileData {
    // Total number of bookmarks in the profile this omnibox interaction took
    // place in.
    optional int32 total_num_bookmarks = 1;

    // Total number of URLs stored in the history database in the profile this
    // omnibox interaction took place in.
    optional int32 total_num_history_urls = 2;

    // Is signed into the browser. Set to false for Guest and Incognito
    // profiles. Not set when signed-in status is unknown.
    optional bool is_signed_into_browser = 3;

    // Is sync-enabled.
    optional bool is_sync_enabled = 4;
  }

  optional ProfileData profile_data = 23;

  // The position of the omnibox.
  enum OmniboxPosition {
    // Unknown position (should not be reported).
    UNKNOWN_POSITION = 0;

    // The omnibox is on the top edge of the screen.
    TOP_POSITION = 1;

    // The omnibox is on the bottom edge of the screen.
    BOTTOM_POSITION = 2;
  }

  // The position of the steady state (unfocused) omnibox.  Logged on iOS only;
  // will be set on iOS with the BottomOmniboxSteadyStateIOS experiment.
  // TODO(christianxu): Update this on experiment cleanup.
  optional OmniboxPosition steady_state_omnibox_position = 27;
}