| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 import "omnibox_input_type.proto"; |
| 14 |
| 13 // Next tag: 17 | 15 // Next tag: 17 |
| 14 message OmniboxEventProto { | 16 message OmniboxEventProto { |
| 15 // The timestamp for the event, in seconds since the epoch. | 17 // The timestamp for the event, in seconds since the epoch. |
| 16 optional int64 time = 1; | 18 optional int64 time = 1; |
| 17 | 19 |
| 18 // The id of the originating tab for this omnibox interaction. | 20 // 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. | 21 // 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 | 22 // In those cases, this is unset. Tab ids are unique for a given session_id |
| 21 // (in the containing protocol buffer ChromeUserMetricsExtensionProto). | 23 // (in the containing protocol buffer ChromeUserMetricsExtensionProto). |
| 22 optional int32 tab_id = 2; | 24 optional int32 tab_id = 2; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 // replacement, meaning the URL of the page should've appeared in the | 123 // replacement, meaning the URL of the page should've appeared in the |
| 122 // omnibox before the user started editing it, not the search terms. | 124 // omnibox before the user started editing it, not the search terms. |
| 123 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9; | 125 SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT = 9; |
| 124 | 126 |
| 125 // When adding new classifications, please consider adding them in | 127 // When adding new classifications, please consider adding them in |
| 126 // chrome/browser/resources/omnibox/omnibox.html | 128 // chrome/browser/resources/omnibox/omnibox.html |
| 127 // so that these new options are displayed on about:omnibox. | 129 // so that these new options are displayed on about:omnibox. |
| 128 } | 130 } |
| 129 optional PageClassification current_page_classification = 10; | 131 optional PageClassification current_page_classification = 10; |
| 130 | 132 |
| 131 // What kind of input the user provided. | 133 optional OmniboxInputType.Type input_type = 8; |
| 132 enum InputType { | |
| 133 INVALID = 0; // Empty input (should not reach here) | |
| 134 UNKNOWN = 1; // Valid input whose type cannot be determined | |
| 135 REQUESTED_URL = 2; // DEPRECATED. Input autodetected as UNKNOWN, which the | |
| 136 // user wants to treat as an URL by specifying a | |
| 137 // desired_tld | |
| 138 URL = 3; // Input autodetected as a URL | |
| 139 QUERY = 4; // Input autodetected as a query | |
| 140 FORCED_QUERY = 5; // Input forced to be a query by an initial '?' | |
| 141 } | |
| 142 optional InputType input_type = 8; | |
| 143 | 134 |
| 144 // An enum used in multiple places below. | 135 // An enum used in multiple places below. |
| 145 enum ProviderType { | 136 enum ProviderType { |
| 146 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here) | 137 UNKNOWN_PROVIDER = 0; // Unknown provider (should not reach here) |
| 147 HISTORY_URL = 1; // URLs in history, or user-typed URLs | 138 HISTORY_URL = 1; // URLs in history, or user-typed URLs |
| 148 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history | 139 HISTORY_CONTENTS = 2; // Matches for page contents of pages in history |
| 149 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages | 140 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages |
| 150 // in history | 141 // in history |
| 151 SEARCH = 4; // Search suggestions for the default search engine | 142 SEARCH = 4; // Search suggestions for the default search engine |
| 152 KEYWORD = 5; // Keyword-triggered searches | 143 KEYWORD = 5; // Keyword-triggered searches |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 // The number of times this provider returned a non-zero number of | 250 // The number of times this provider returned a non-zero number of |
| 260 // suggestions during this omnibox session. | 251 // suggestions during this omnibox session. |
| 261 // Note that each provider may define a session differently for its | 252 // Note that each provider may define a session differently for its |
| 262 // purposes. | 253 // purposes. |
| 263 optional int32 times_returned_results_in_session = 5; | 254 optional int32 times_returned_results_in_session = 5; |
| 264 } | 255 } |
| 265 // A list of diagnostic information about each provider. Providers | 256 // A list of diagnostic information about each provider. Providers |
| 266 // will appear at most once in this list. | 257 // will appear at most once in this list. |
| 267 repeated ProviderInfo provider_info = 12; | 258 repeated ProviderInfo provider_info = 12; |
| 268 } | 259 } |
| OLD | NEW |