OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 // | |
5 // Stores information about an omnibox interaction. | |
6 | |
7 syntax = "proto2"; | |
8 | |
9 option optimize_for = LITE_RUNTIME; | |
10 | |
11 package metrics; | |
12 | |
13 // Next tag: 15 | |
14 message OmniboxEventProto { | |
15 // The timestamp for the event, in seconds since the epoch. | |
16 optional int64 time = 1; | |
17 | |
18 // The id of the originating tab for this omnibox interaction. | |
19 // This is the current tab *unless* the user opened the target in a new tab. | |
20 // In those cases, this is unset. Tab ids are unique for a given session_id | |
21 // (in the containing protocol buffer ChromeUserMetricsExtensionProto). | |
22 optional int32 tab_id = 2; | |
23 | |
24 // The number of characters the user had typed before autocompleting. | |
25 optional int32 typed_length = 3; | |
26 | |
27 // Whether the user deleted text immediately before selecting an omnibox | |
28 // suggestion. This is usually the result of pressing backspace or delete. | |
29 optional bool just_deleted_text = 11; | |
30 | |
31 // The number of terms that the user typed in the omnibox. | |
32 optional int32 num_typed_terms = 4; | |
33 | |
34 // The index of the item that the user selected in the omnibox popup list. | |
35 // This corresponds the index of the |suggestion| below. | |
36 optional int32 selected_index = 5; | |
37 | |
38 // Whether or not the top match was hidden in the omnibox suggestions | |
39 // dropdown. | |
40 optional bool is_top_result_hidden_in_dropdown = 14; | |
41 | |
42 // The length of the inline autocomplete text in the omnibox. | |
43 // The sum |typed_length| + |completed_length| gives the full length of the | |
44 // user-visible text in the omnibox. | |
45 // This field is only set for inlineable suggestions selected at position 0 | |
46 // (|selected_index| = 0) and will be omitted otherwise. | |
47 optional int32 completed_length = 6; | |
48 | |
49 // The amount of time, in milliseconds, since the user first began modifying | |
50 // the text in the omnibox. If at some point after modifying the text, the | |
51 // user reverts the modifications (thus seeing the current web page's URL | |
52 // again), then writes in the omnibox again, this elapsed time should start | |
53 // from the time of the second series of modification. | |
54 optional int64 typing_duration_ms = 7; | |
55 | |
56 // The amount of time, in milliseconds, since the last time the default | |
57 // (inline) match changed. This may be longer than the time since the | |
58 // last keystroke. (The last keystroke may not have changed the default | |
59 // match.) It may also be shorter than the time since the last keystroke | |
60 // because the default match might have come from an asynchronous | |
61 // provider. Regardless, it should always be less than or equal to | |
62 // the field |typing_duration_ms|. | |
63 optional int64 duration_since_last_default_match_update_ms = 13; | |
64 | |
65 // The type of page currently displayed when the user used the omnibox. | |
66 enum PageClassification { | |
67 // An invalid URL; shouldn't happen. | |
68 INVALID_SPEC = 0; | |
69 | |
70 // chrome://newtab/. This can be either the built-in version or a | |
71 // replacement new tab page from an extension. Note that when Instant | |
72 // Extended is enabled, the new tab page will be reported as either | |
73 // INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS or | |
74 // INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS below, | |
75 // unless an extension is replacing the new tab page, in which case | |
76 // it will still be reported as NTP. | |
77 NTP = 1; | |
78 | |
79 // about:blank. | |
80 BLANK = 2; | |
81 | |
82 // The user's home page. Note that if the home page is set to any | |
83 // of the new tab page versions or to about:blank, then we'll | |
84 // classify the page into those categories, not HOME_PAGE. | |
85 HOME_PAGE = 3; | |
86 | |
87 // The catch-all entry of everything not included somewhere else | |
88 // on this list. | |
89 OTHER = 4; | |
90 | |
91 // The instant new tab page enum value was deprecated on August 2, 2013. | |
92 OBSOLETE_INSTANT_NTP = 5; | |
93 | |
94 // The user is on a search result page that's doing search term | |
95 // replacement, meaning the search terms should've appeared in the omnibox | |
96 // before the user started editing it, not the URL of the page. | |
97 SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT = 6; | |
98 | |
99 // The new tab page in which this omnibox interaction first started | |
100 // with the user having focus in the omnibox. | |
101 INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS = 7; | |
102 | |
103 // The new tab page in which this omnibox interaction first started | |
104 // with the user having focus in the fakebox. | |
105 INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS = 8; | |
106 | |
107 // The user is on a search result page that's not doing search term | |
108 // replacement, meaning the URL of the page should've appeared in the | |
109 // omnibox before the user started editing it, not the search terms. | |
110 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9; | |
111 | |
112 // When adding new classifications, please consider adding them in | |
113 // chrome/browser/resources/omnibox/omnibox.html | |
114 // so that these new options are displayed on about:omnibox. | |
115 } | |
116 optional PageClassification current_page_classification = 10; | |
117 | |
118 // What kind of input the user provided. | |
119 enum InputType { | |
120 INVALID = 0; // Empty input (should not reach here) | |
121 UNKNOWN = 1; // Valid input whose type cannot be determined | |
122 REQUESTED_URL = 2; // DEPRECATED. Input autodetected as UNKNOWN, which the | |
123 // user wants to treat as an URL by specifying a | |
124 // desired_tld | |
125 URL = 3; // Input autodetected as a URL | |
126 QUERY = 4; // Input autodetected as a query | |
127 FORCED_QUERY = 5; // Input forced to be a query by an initial '?' | |
128 } | |
129 optional InputType input_type = 8; | |
130 | |
131 // An enum used in multiple places below. | |
132 enum ProviderType { | |
133 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here) | |
134 HISTORY_URL = 1; // URLs in history, or user-typed URLs | |
135 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history | |
136 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages | |
137 // in history | |
138 SEARCH = 4; // Search suggestions for the default search engine | |
139 KEYWORD = 5; // Keyword-triggered searches | |
140 BUILTIN = 6; // Built-in URLs, such as chrome://version | |
141 SHORTCUTS = 7; // Recently selected omnibox suggestions | |
142 EXTENSION_APPS = 8; // Custom suggestions from extensions and/or apps | |
143 CONTACT = 9; // DEPRECATED. The user's contacts | |
144 BOOKMARK = 10; // The user's bookmarks | |
145 ZERO_SUGGEST = 11; // Suggestions based on the current page | |
146 // This enum value is currently only used by Android GSA. It represents | |
147 // a suggestion from the phone. | |
148 ON_DEVICE = 12; | |
149 } | |
150 | |
151 // The result set displayed on the completion popup | |
152 // Next tag: 6 | |
153 message Suggestion { | |
154 // Where does this result come from? | |
155 optional ProviderType provider = 1; | |
156 | |
157 // What kind of result this is. | |
158 // This corresponds to the AutocompleteMatch::Type enumeration in | |
159 // chrome/browser/autocomplete/autocomplete_match.h (except for Android | |
160 // GSA result types). | |
161 enum ResultType { | |
162 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here) | |
163 URL_WHAT_YOU_TYPED = 1; // The input as a URL | |
164 HISTORY_URL = 2; // A past page whose URL contains the input | |
165 HISTORY_TITLE = 3; // A past page whose title contains the input | |
166 HISTORY_BODY = 4; // A past page whose body contains the input | |
167 HISTORY_KEYWORD = 5; // A past page whose keyword contains the | |
168 // input | |
169 NAVSUGGEST = 6; // A suggested URL | |
170 SEARCH_WHAT_YOU_TYPED = 7; // The input as a search query (with the | |
171 // default engine) | |
172 SEARCH_HISTORY = 8; // A past search (with the default engine) | |
173 // containing the input | |
174 SEARCH_SUGGEST = 9; // A suggested search (with the default | |
175 // engine) query that doesn't fall into one of | |
176 // the more specific suggestion categories | |
177 // below. | |
178 SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine | |
179 EXTENSION_APP = 11; // An Extension App with a title/url that | |
180 // contains the input | |
181 CONTACT = 12; // DEPRECATED. One of the user's contacts | |
182 BOOKMARK_TITLE = 13; // A bookmark whose title contains the input. | |
183 SEARCH_SUGGEST_ENTITY = 14; // A suggested search for an entity. | |
184 SEARCH_SUGGEST_INFINITE = 15; // A suggested search to complete the tail | |
185 // of the query. | |
186 SEARCH_SUGGEST_PERSONALIZED = 16; // A personalized suggested search. | |
187 SEARCH_SUGGEST_PROFILE = 17; // A personalized suggested search for a | |
188 // Google+ profile. | |
189 APP_RESULT = 18; // Result from an installed app | |
190 // (eg: a gmail email). | |
191 // Used by Android GSA for on-device | |
192 // suggestion logging. | |
193 APP = 19; // An app result (eg: the gmail app). | |
194 // Used by Android GSA for on-device | |
195 // suggestion logging. | |
196 } | |
197 optional ResultType result_type = 2; | |
198 | |
199 // The relevance score for this suggestion. | |
200 optional int32 relevance = 3; | |
201 | |
202 // How many times this result was typed in / selected from the omnibox. | |
203 // Only set for some providers and result_types. At the time of | |
204 // writing this comment, it is only set for HistoryURL and | |
205 // HistoryQuickProvider matches. | |
206 optional int32 typed_count = 5; | |
207 | |
208 // Whether this item is starred (bookmarked) or not. | |
209 optional bool is_starred = 4; | |
210 } | |
211 repeated Suggestion suggestion = 9; | |
212 | |
213 // A data structure that holds per-provider information, general information | |
214 // not associated with a particular result. | |
215 // Next tag: 5 | |
216 message ProviderInfo { | |
217 // Which provider generated this ProviderInfo entry. | |
218 optional ProviderType provider = 1; | |
219 | |
220 // The provider's done() value, i.e., whether it's completed processing | |
221 // the query. Providers which don't do any asynchronous processing | |
222 // will always be done. | |
223 optional bool provider_done = 2; | |
224 | |
225 // The set of field trials that have triggered in the most recent query, | |
226 // possibly affecting the shown suggestions. Each element is a hash | |
227 // of the corresponding field trial name. | |
228 // See chrome/browser/autocomplete/search_provider.cc for a specific usage | |
229 // example. | |
230 repeated fixed32 field_trial_triggered = 3; | |
231 | |
232 // Same as above except that the set of field trials is a union of all field | |
233 // trials that have triggered within the current omnibox session including | |
234 // the most recent query. | |
235 // See AutocompleteController::ResetSession() for more details on the | |
236 // definition of a session. | |
237 // See chrome/browser/autocomplete/search_provider.cc for a specific usage | |
238 // example. | |
239 repeated fixed32 field_trial_triggered_in_session = 4; | |
240 } | |
241 // A list of diagnostic information about each provider. Providers | |
242 // will appear at most once in this list. | |
243 repeated ProviderInfo provider_info = 12; | |
244 } | |
OLD | NEW |