OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Stores information about an omnibox interaction. | 5 // Stores information about an omnibox interaction. |
6 | 6 |
7 syntax = "proto2"; | 7 syntax = "proto2"; |
8 | 8 |
9 option optimize_for = LITE_RUNTIME; | 9 option optimize_for = LITE_RUNTIME; |
10 | 10 |
11 package metrics; | 11 package metrics; |
12 | 12 |
13 // Next tag: 10 | 13 // Next tag: 11 |
14 message OmniboxEventProto { | 14 message OmniboxEventProto { |
15 // The timestamp for the event, in seconds since the epoch. | 15 // The timestamp for the event, in seconds since the epoch. |
16 optional int64 time = 1; | 16 optional int64 time = 1; |
17 | 17 |
18 // The id of the originating tab for this omnibox interaction. | 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. | 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 | 20 // In those cases, this is unset. Tab ids are unique for a given session_id |
21 // (in the containing protocol buffer ChromeUserMetricsExtensionsProto). | 21 // (in the containing protocol buffer ChromeUserMetricsExtensionsProto). |
22 optional int32 tab_id = 2; | 22 optional int32 tab_id = 2; |
23 | 23 |
(...skipping 12 matching lines...) Expand all Loading... |
36 // user-visible text in the omnibox. | 36 // user-visible text in the omnibox. |
37 optional int32 completed_length = 6; | 37 optional int32 completed_length = 6; |
38 | 38 |
39 // The amount of time, in milliseconds, since the user first began modifying | 39 // The amount of time, in milliseconds, since the user first began modifying |
40 // the text in the omnibox. If at some point after modifying the text, the | 40 // the text in the omnibox. If at some point after modifying the text, the |
41 // user reverts the modifications (thus seeing the current web page's URL | 41 // user reverts the modifications (thus seeing the current web page's URL |
42 // again), then writes in the omnibox again, this elapsed time should start | 42 // again), then writes in the omnibox again, this elapsed time should start |
43 // from the time of the second series of modification. | 43 // from the time of the second series of modification. |
44 optional int64 typing_duration_ms = 7; | 44 optional int64 typing_duration_ms = 7; |
45 | 45 |
| 46 // The type of page currently displayed when the user used the omnibox. |
| 47 enum PageClassification { |
| 48 INVALID_SPEC = 0; // invalid URI; shouldn't happen |
| 49 NEW_TAB_PAGE = 1; // chrome://newtab/ |
| 50 // Note that chrome://newtab/ doesn't have to be the built-in |
| 51 // version; it could be replaced by an extension. |
| 52 BLANK = 2; // about:blank |
| 53 HOMEPAGE = 3; // user switched settings to "open this page" mode. |
| 54 // Note that if the homepage is set to the new tab page or about blank, |
| 55 // then we'll classify the web page into those categories, not HOMEPAGE. |
| 56 OTHER = 4; // everything else |
| 57 } |
| 58 optional PageClassification current_page_classification = 10; |
| 59 |
46 // What kind of input the user provided. | 60 // What kind of input the user provided. |
47 enum InputType { | 61 enum InputType { |
48 INVALID = 0; // Empty input (should not reach here) | 62 INVALID = 0; // Empty input (should not reach here) |
49 UNKNOWN = 1; // Valid input whose type cannot be determined | 63 UNKNOWN = 1; // Valid input whose type cannot be determined |
50 REQUESTED_URL = 2; // Input autodetected as UNKNOWN, which the user wants | 64 REQUESTED_URL = 2; // Input autodetected as UNKNOWN, which the user wants |
51 // to treat as an URL by specifying a desired_tld | 65 // to treat as an URL by specifying a desired_tld |
52 URL = 3; // Input autodetected as a URL | 66 URL = 3; // Input autodetected as a URL |
53 QUERY = 4; // Input autodetected as a query | 67 QUERY = 4; // Input autodetected as a query |
54 FORCED_QUERY = 5; // Input forced to be a query by an initial '?' | 68 FORCED_QUERY = 5; // Input forced to be a query by an initial '?' |
55 } | 69 } |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 optional ResultType result_type = 2; | 111 optional ResultType result_type = 2; |
98 | 112 |
99 // The relevance score for this suggestion. | 113 // The relevance score for this suggestion. |
100 optional int32 relevance = 3; | 114 optional int32 relevance = 3; |
101 | 115 |
102 // Whether this item is starred (bookmarked) or not. | 116 // Whether this item is starred (bookmarked) or not. |
103 optional bool is_starred = 4; | 117 optional bool is_starred = 4; |
104 } | 118 } |
105 repeated Suggestion suggestion = 9; | 119 repeated Suggestion suggestion = 9; |
106 } | 120 } |
OLD | NEW |