| 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 |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages | 81 HISTORY_QUICK = 3; // Matches for recently or frequently visited pages |
| 82 // in history | 82 // in history |
| 83 SEARCH = 4; // Search suggestions for the default search engine | 83 SEARCH = 4; // Search suggestions for the default search engine |
| 84 KEYWORD = 5; // Keyword-triggered searches | 84 KEYWORD = 5; // Keyword-triggered searches |
| 85 BUILTIN = 6; // Built-in URLs, such as chrome://version | 85 BUILTIN = 6; // Built-in URLs, such as chrome://version |
| 86 SHORTCUTS = 7; // Recently selected omnibox suggestions | 86 SHORTCUTS = 7; // Recently selected omnibox suggestions |
| 87 EXTENSION_APPS = 8; // Custom suggestions from extensions and/or apps | 87 EXTENSION_APPS = 8; // Custom suggestions from extensions and/or apps |
| 88 } | 88 } |
| 89 | 89 |
| 90 // The result set displayed on the completion popup | 90 // The result set displayed on the completion popup |
| 91 // Next tag: 6 |
| 91 message Suggestion { | 92 message Suggestion { |
| 92 // Where does this result come from? | 93 // Where does this result come from? |
| 93 optional ProviderType provider = 1; | 94 optional ProviderType provider = 1; |
| 94 | 95 |
| 95 // What kind of result this is. | 96 // What kind of result this is. |
| 96 // This corresponds to the AutocompleteMatch::Type enumeration in | 97 // This corresponds to the AutocompleteMatch::Type enumeration in |
| 97 // chrome/browser/autocomplete/autocomplete_match.h | 98 // chrome/browser/autocomplete/autocomplete_match.h |
| 98 enum ResultType { | 99 enum ResultType { |
| 99 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here) | 100 UNKNOWN_RESULT_TYPE = 0; // Unknown type (should not reach here) |
| 100 URL_WHAT_YOU_TYPED = 1; // The input as a URL | 101 URL_WHAT_YOU_TYPED = 1; // The input as a URL |
| (...skipping 11 matching lines...) Expand all Loading... |
| 112 // engine) | 113 // engine) |
| 113 SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine | 114 SEARCH_OTHER_ENGINE = 10; // A search with a non-default engine |
| 114 EXTENSION_APP = 11; // An Extension App with a title/url that | 115 EXTENSION_APP = 11; // An Extension App with a title/url that |
| 115 // contains the input | 116 // contains the input |
| 116 }; | 117 }; |
| 117 optional ResultType result_type = 2; | 118 optional ResultType result_type = 2; |
| 118 | 119 |
| 119 // The relevance score for this suggestion. | 120 // The relevance score for this suggestion. |
| 120 optional int32 relevance = 3; | 121 optional int32 relevance = 3; |
| 121 | 122 |
| 123 // How many times this result was typed in / selected from the omnibox. |
| 124 // Only set for some providers and result_types. At the time of |
| 125 // writing this comment, it is only set for HistoryURL and |
| 126 // HistoryQuickProvider matches. |
| 127 optional int32 typed_count = 5; |
| 128 |
| 122 // Whether this item is starred (bookmarked) or not. | 129 // Whether this item is starred (bookmarked) or not. |
| 123 optional bool is_starred = 4; | 130 optional bool is_starred = 4; |
| 124 } | 131 } |
| 125 repeated Suggestion suggestion = 9; | 132 repeated Suggestion suggestion = 9; |
| 126 | 133 |
| 127 // A data structure that holds per-provider information, general information | 134 // A data structure that holds per-provider information, general information |
| 128 // not associated with a particular result. | 135 // not associated with a particular result. |
| 129 message ProviderInfo { | 136 message ProviderInfo { |
| 130 // Which provider generated this ProviderInfo entry. | 137 // Which provider generated this ProviderInfo entry. |
| 131 optional ProviderType provider = 1; | 138 optional ProviderType provider = 1; |
| 132 | 139 |
| 133 // The provider's done() value, i.e., whether it's completed processing | 140 // The provider's done() value, i.e., whether it's completed processing |
| 134 // the query. Providers which don't do any asynchronous processing | 141 // the query. Providers which don't do any asynchronous processing |
| 135 // will always be done. | 142 // will always be done. |
| 136 optional bool provider_done = 2; | 143 optional bool provider_done = 2; |
| 137 } | 144 } |
| 138 // A list of diagnostic information about each provider. Providers | 145 // A list of diagnostic information about each provider. Providers |
| 139 // will appear at most once in this list. | 146 // will appear at most once in this list. |
| 140 repeated ProviderInfo provider_info = 12; | 147 repeated ProviderInfo provider_info = 12; |
| 141 } | 148 } |
| OLD | NEW |