123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451 |
- // Copyright 2014 The Chromium Authors. All rights reserved.
- // 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: 23
- 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,
- // INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS 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.
- 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;
- // Android's auxiliary search backend.
- ANDROID_AUXILIARY_SEARCH = 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;
- // When adding new classifications, please consider adding them in
- // chromium's chrome/browser/resources/omnibox/omnibox.html
- // so that these new options are displayed on about:omnibox.
- }
- 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 bulding 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.
- OPEN_TAB = 22;
- }
- // The result set displayed on the completion popup
- // Next tag: 10
- 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.
- }
- 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.
- // 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) or not.
- 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;
- }
- 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
- // example.
- repeated fixed32 field_trial_triggered = 3;
- // 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.
- repeated fixed32 field_trial_triggered_in_session = 4;
- // 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;
- // 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;
- // The set of features that triggered within the current omnibox session.
- // Each element is a value of |OmniboxTriggeredFeatureService::Features| enum
- // in components/omnibox/browser/omnibox_triggered_feature_service.h .
- // See AutocompleteController::ResetSession() for more details on the
- // definition of a session.
- repeated int32 feature_triggered_in_session = 22;
- }
|