1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: omnibox_event.proto
3
4 #include "omnibox_event.pb.h"
5
6 #include <algorithm>
7
8 #include <google/protobuf/io/coded_stream.h>
9 #include <google/protobuf/extension_set.h>
10 #include <google/protobuf/wire_format_lite.h>
11 #include <google/protobuf/io/zero_copy_stream_impl_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14
15 PROTOBUF_PRAGMA_INIT_SEG
16
17 namespace _pb = ::PROTOBUF_NAMESPACE_ID;
18 namespace _pbi = _pb::internal;
19
20 namespace metrics {
OmniboxEventProto_Suggestion_ScoringSignals(::_pbi::ConstantInitialized)21 PROTOBUF_CONSTEXPR OmniboxEventProto_Suggestion_ScoringSignals::OmniboxEventProto_Suggestion_ScoringSignals(
22 ::_pbi::ConstantInitialized): _impl_{
23 /*decltype(_impl_._has_bits_)*/{}
24 , /*decltype(_impl_._cached_size_)*/{}
25 , /*decltype(_impl_.typed_count_)*/0
26 , /*decltype(_impl_.visit_count_)*/0
27 , /*decltype(_impl_.elapsed_time_last_visit_secs_)*/int64_t{0}
28 , /*decltype(_impl_.shortcut_visit_count_)*/0
29 , /*decltype(_impl_.shortest_shortcut_len_)*/0
30 , /*decltype(_impl_.elapsed_time_last_shortcut_visit_sec_)*/int64_t{0}
31 , /*decltype(_impl_.num_bookmarks_of_url_)*/0
32 , /*decltype(_impl_.first_bookmark_title_match_position_)*/0
33 , /*decltype(_impl_.total_bookmark_title_match_length_)*/0
34 , /*decltype(_impl_.num_input_terms_matched_by_bookmark_title_)*/0
35 , /*decltype(_impl_.first_url_match_position_)*/0
36 , /*decltype(_impl_.total_url_match_length_)*/0
37 , /*decltype(_impl_.total_host_match_length_)*/0
38 , /*decltype(_impl_.total_path_match_length_)*/0
39 , /*decltype(_impl_.is_host_only_)*/false
40 , /*decltype(_impl_.host_match_at_word_boundary_)*/false
41 , /*decltype(_impl_.has_non_scheme_www_match_)*/false
42 , /*decltype(_impl_.allowed_to_be_default_match_)*/false
43 , /*decltype(_impl_.total_query_or_ref_match_length_)*/0
44 , /*decltype(_impl_.total_title_match_length_)*/0
45 , /*decltype(_impl_.num_input_terms_matched_by_title_)*/0
46 , /*decltype(_impl_.num_input_terms_matched_by_url_)*/0
47 , /*decltype(_impl_.length_of_url_)*/0
48 , /*decltype(_impl_.site_engagement_)*/0} {}
49 struct OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternal {
OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternalmetrics::OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternal50 PROTOBUF_CONSTEXPR OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternal()
51 : _instance(::_pbi::ConstantInitialized{}) {}
~OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternalmetrics::OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternal52 ~OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternal() {}
53 union {
54 OmniboxEventProto_Suggestion_ScoringSignals _instance;
55 };
56 };
57 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OmniboxEventProto_Suggestion_ScoringSignalsDefaultTypeInternal _OmniboxEventProto_Suggestion_ScoringSignals_default_instance_;
OmniboxEventProto_Suggestion(::_pbi::ConstantInitialized)58 PROTOBUF_CONSTEXPR OmniboxEventProto_Suggestion::OmniboxEventProto_Suggestion(
59 ::_pbi::ConstantInitialized): _impl_{
60 /*decltype(_impl_._has_bits_)*/{}
61 , /*decltype(_impl_._cached_size_)*/{}
62 , /*decltype(_impl_.scoring_signals_)*/nullptr
63 , /*decltype(_impl_.provider_)*/0
64 , /*decltype(_impl_.result_type_)*/0
65 , /*decltype(_impl_.relevance_)*/0
66 , /*decltype(_impl_.typed_count_)*/0
67 , /*decltype(_impl_.is_starred_)*/false
68 , /*decltype(_impl_.is_disabled_)*/false
69 , /*decltype(_impl_.has_tab_match_)*/false
70 , /*decltype(_impl_.is_keyword_suggestion_)*/false
71 , /*decltype(_impl_.result_subtype_identifier_)*/0} {}
72 struct OmniboxEventProto_SuggestionDefaultTypeInternal {
OmniboxEventProto_SuggestionDefaultTypeInternalmetrics::OmniboxEventProto_SuggestionDefaultTypeInternal73 PROTOBUF_CONSTEXPR OmniboxEventProto_SuggestionDefaultTypeInternal()
74 : _instance(::_pbi::ConstantInitialized{}) {}
~OmniboxEventProto_SuggestionDefaultTypeInternalmetrics::OmniboxEventProto_SuggestionDefaultTypeInternal75 ~OmniboxEventProto_SuggestionDefaultTypeInternal() {}
76 union {
77 OmniboxEventProto_Suggestion _instance;
78 };
79 };
80 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OmniboxEventProto_SuggestionDefaultTypeInternal _OmniboxEventProto_Suggestion_default_instance_;
OmniboxEventProto_ProviderInfo(::_pbi::ConstantInitialized)81 PROTOBUF_CONSTEXPR OmniboxEventProto_ProviderInfo::OmniboxEventProto_ProviderInfo(
82 ::_pbi::ConstantInitialized): _impl_{
83 /*decltype(_impl_._has_bits_)*/{}
84 , /*decltype(_impl_._cached_size_)*/{}
85 , /*decltype(_impl_.field_trial_triggered_)*/{}
86 , /*decltype(_impl_.field_trial_triggered_in_session_)*/{}
87 , /*decltype(_impl_.provider_)*/0
88 , /*decltype(_impl_.provider_done_)*/false
89 , /*decltype(_impl_.times_returned_results_in_session_)*/0} {}
90 struct OmniboxEventProto_ProviderInfoDefaultTypeInternal {
OmniboxEventProto_ProviderInfoDefaultTypeInternalmetrics::OmniboxEventProto_ProviderInfoDefaultTypeInternal91 PROTOBUF_CONSTEXPR OmniboxEventProto_ProviderInfoDefaultTypeInternal()
92 : _instance(::_pbi::ConstantInitialized{}) {}
~OmniboxEventProto_ProviderInfoDefaultTypeInternalmetrics::OmniboxEventProto_ProviderInfoDefaultTypeInternal93 ~OmniboxEventProto_ProviderInfoDefaultTypeInternal() {}
94 union {
95 OmniboxEventProto_ProviderInfo _instance;
96 };
97 };
98 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OmniboxEventProto_ProviderInfoDefaultTypeInternal _OmniboxEventProto_ProviderInfo_default_instance_;
OmniboxEventProto_ProfileData(::_pbi::ConstantInitialized)99 PROTOBUF_CONSTEXPR OmniboxEventProto_ProfileData::OmniboxEventProto_ProfileData(
100 ::_pbi::ConstantInitialized): _impl_{
101 /*decltype(_impl_._has_bits_)*/{}
102 , /*decltype(_impl_._cached_size_)*/{}
103 , /*decltype(_impl_.total_num_bookmarks_)*/0
104 , /*decltype(_impl_.total_num_history_urls_)*/0
105 , /*decltype(_impl_.is_signed_into_browser_)*/false
106 , /*decltype(_impl_.is_sync_enabled_)*/false} {}
107 struct OmniboxEventProto_ProfileDataDefaultTypeInternal {
OmniboxEventProto_ProfileDataDefaultTypeInternalmetrics::OmniboxEventProto_ProfileDataDefaultTypeInternal108 PROTOBUF_CONSTEXPR OmniboxEventProto_ProfileDataDefaultTypeInternal()
109 : _instance(::_pbi::ConstantInitialized{}) {}
~OmniboxEventProto_ProfileDataDefaultTypeInternalmetrics::OmniboxEventProto_ProfileDataDefaultTypeInternal110 ~OmniboxEventProto_ProfileDataDefaultTypeInternal() {}
111 union {
112 OmniboxEventProto_ProfileData _instance;
113 };
114 };
115 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OmniboxEventProto_ProfileDataDefaultTypeInternal _OmniboxEventProto_ProfileData_default_instance_;
OmniboxEventProto(::_pbi::ConstantInitialized)116 PROTOBUF_CONSTEXPR OmniboxEventProto::OmniboxEventProto(
117 ::_pbi::ConstantInitialized): _impl_{
118 /*decltype(_impl_._has_bits_)*/{}
119 , /*decltype(_impl_._cached_size_)*/{}
120 , /*decltype(_impl_.suggestion_)*/{}
121 , /*decltype(_impl_.provider_info_)*/{}
122 , /*decltype(_impl_.legacy_feature_triggered_in_session_)*/{}
123 , /*decltype(_impl_.legacy_feature_triggered_)*/{}
124 , /*decltype(_impl_.feature_triggered_)*/{}
125 , /*decltype(_impl_.feature_triggered_in_session_)*/{}
126 , /*decltype(_impl_.profile_data_)*/nullptr
127 , /*decltype(_impl_.time_sec_)*/int64_t{0}
128 , /*decltype(_impl_.tab_id_)*/0
129 , /*decltype(_impl_.typed_length_)*/0
130 , /*decltype(_impl_.num_typed_terms_)*/0
131 , /*decltype(_impl_.selected_index_)*/0
132 , /*decltype(_impl_.typing_duration_ms_)*/int64_t{0}
133 , /*decltype(_impl_.completed_length_)*/0
134 , /*decltype(_impl_.input_type_)*/0
135 , /*decltype(_impl_.duration_since_last_default_match_update_ms_)*/int64_t{0}
136 , /*decltype(_impl_.current_page_classification_)*/0
137 , /*decltype(_impl_.just_deleted_text_)*/false
138 , /*decltype(_impl_.selected_tab_match_)*/false
139 , /*decltype(_impl_.deprecated_is_top_result_hidden_in_dropdown_)*/false
140 , /*decltype(_impl_.is_popup_open_)*/false
141 , /*decltype(_impl_.mode_type_)*/0
142 , /*decltype(_impl_.is_paste_and_go_)*/false
143 , /*decltype(_impl_.in_keyword_mode_)*/false
144 , /*decltype(_impl_.is_query_started_from_tile_)*/false
145 , /*decltype(_impl_.keyword_mode_entry_method_)*/0
146 , /*decltype(_impl_.steady_state_omnibox_position_)*/0} {}
147 struct OmniboxEventProtoDefaultTypeInternal {
OmniboxEventProtoDefaultTypeInternalmetrics::OmniboxEventProtoDefaultTypeInternal148 PROTOBUF_CONSTEXPR OmniboxEventProtoDefaultTypeInternal()
149 : _instance(::_pbi::ConstantInitialized{}) {}
~OmniboxEventProtoDefaultTypeInternalmetrics::OmniboxEventProtoDefaultTypeInternal150 ~OmniboxEventProtoDefaultTypeInternal() {}
151 union {
152 OmniboxEventProto _instance;
153 };
154 };
155 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 OmniboxEventProtoDefaultTypeInternal _OmniboxEventProto_default_instance_;
156 } // namespace metrics
157 namespace metrics {
OmniboxEventProto_Suggestion_ResultType_IsValid(int value)158 bool OmniboxEventProto_Suggestion_ResultType_IsValid(int value) {
159 switch (value) {
160 case 0:
161 case 1:
162 case 2:
163 case 3:
164 case 4:
165 case 5:
166 case 6:
167 case 7:
168 case 8:
169 case 9:
170 case 10:
171 case 11:
172 case 12:
173 case 13:
174 case 14:
175 case 15:
176 case 16:
177 case 17:
178 case 18:
179 case 19:
180 case 20:
181 case 21:
182 case 22:
183 case 23:
184 case 24:
185 case 25:
186 case 26:
187 case 27:
188 case 28:
189 case 29:
190 case 30:
191 case 31:
192 case 32:
193 case 33:
194 case 34:
195 case 35:
196 return true;
197 default:
198 return false;
199 }
200 }
201
202 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_Suggestion_ResultType_strings[36] = {};
203
204 static const char OmniboxEventProto_Suggestion_ResultType_names[] =
205 "APP"
206 "APP_RESULT"
207 "BOOKMARK_TITLE"
208 "CALCULATOR"
209 "CLIPBOARD_IMAGE"
210 "CLIPBOARD_TEXT"
211 "CLIPBOARD_URL"
212 "CONTACT"
213 "DOCUMENT"
214 "EXTENSION_APP"
215 "HISTORY_BODY"
216 "HISTORY_CLUSTER"
217 "HISTORY_KEYWORD"
218 "HISTORY_TITLE"
219 "HISTORY_URL"
220 "LEGACY_ON_DEVICE"
221 "NAVSUGGEST"
222 "NAVSUGGEST_PERSONALIZED"
223 "OPEN_TAB"
224 "PEDAL"
225 "PHYSICAL_WEB"
226 "PHYSICAL_WEB_OVERFLOW"
227 "SEARCH_HISTORY"
228 "SEARCH_OTHER_ENGINE"
229 "SEARCH_SUGGEST"
230 "SEARCH_SUGGEST_ANSWER"
231 "SEARCH_SUGGEST_ENTITY"
232 "SEARCH_SUGGEST_PERSONALIZED"
233 "SEARCH_SUGGEST_PROFILE"
234 "SEARCH_SUGGEST_TAIL"
235 "SEARCH_WHAT_YOU_TYPED"
236 "STARTER_PACK"
237 "TAB_SWITCH"
238 "TILE_SUGGESTION"
239 "UNKNOWN_RESULT_TYPE"
240 "URL_WHAT_YOU_TYPED";
241
242 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_Suggestion_ResultType_entries[] = {
243 { {OmniboxEventProto_Suggestion_ResultType_names + 0, 3}, 19 },
244 { {OmniboxEventProto_Suggestion_ResultType_names + 3, 10}, 18 },
245 { {OmniboxEventProto_Suggestion_ResultType_names + 13, 14}, 13 },
246 { {OmniboxEventProto_Suggestion_ResultType_names + 27, 10}, 23 },
247 { {OmniboxEventProto_Suggestion_ResultType_names + 37, 15}, 29 },
248 { {OmniboxEventProto_Suggestion_ResultType_names + 52, 14}, 28 },
249 { {OmniboxEventProto_Suggestion_ResultType_names + 66, 13}, 24 },
250 { {OmniboxEventProto_Suggestion_ResultType_names + 79, 7}, 12 },
251 { {OmniboxEventProto_Suggestion_ResultType_names + 86, 8}, 27 },
252 { {OmniboxEventProto_Suggestion_ResultType_names + 94, 13}, 11 },
253 { {OmniboxEventProto_Suggestion_ResultType_names + 107, 12}, 4 },
254 { {OmniboxEventProto_Suggestion_ResultType_names + 119, 15}, 31 },
255 { {OmniboxEventProto_Suggestion_ResultType_names + 134, 15}, 5 },
256 { {OmniboxEventProto_Suggestion_ResultType_names + 149, 13}, 3 },
257 { {OmniboxEventProto_Suggestion_ResultType_names + 162, 11}, 2 },
258 { {OmniboxEventProto_Suggestion_ResultType_names + 173, 16}, 20 },
259 { {OmniboxEventProto_Suggestion_ResultType_names + 189, 10}, 6 },
260 { {OmniboxEventProto_Suggestion_ResultType_names + 199, 23}, 21 },
261 { {OmniboxEventProto_Suggestion_ResultType_names + 222, 8}, 32 },
262 { {OmniboxEventProto_Suggestion_ResultType_names + 230, 5}, 35 },
263 { {OmniboxEventProto_Suggestion_ResultType_names + 235, 12}, 25 },
264 { {OmniboxEventProto_Suggestion_ResultType_names + 247, 21}, 26 },
265 { {OmniboxEventProto_Suggestion_ResultType_names + 268, 14}, 8 },
266 { {OmniboxEventProto_Suggestion_ResultType_names + 282, 19}, 10 },
267 { {OmniboxEventProto_Suggestion_ResultType_names + 301, 14}, 9 },
268 { {OmniboxEventProto_Suggestion_ResultType_names + 315, 21}, 22 },
269 { {OmniboxEventProto_Suggestion_ResultType_names + 336, 21}, 14 },
270 { {OmniboxEventProto_Suggestion_ResultType_names + 357, 27}, 16 },
271 { {OmniboxEventProto_Suggestion_ResultType_names + 384, 22}, 17 },
272 { {OmniboxEventProto_Suggestion_ResultType_names + 406, 19}, 15 },
273 { {OmniboxEventProto_Suggestion_ResultType_names + 425, 21}, 7 },
274 { {OmniboxEventProto_Suggestion_ResultType_names + 446, 12}, 33 },
275 { {OmniboxEventProto_Suggestion_ResultType_names + 458, 10}, 34 },
276 { {OmniboxEventProto_Suggestion_ResultType_names + 468, 15}, 30 },
277 { {OmniboxEventProto_Suggestion_ResultType_names + 483, 19}, 0 },
278 { {OmniboxEventProto_Suggestion_ResultType_names + 502, 18}, 1 },
279 };
280
281 static const int OmniboxEventProto_Suggestion_ResultType_entries_by_number[] = {
282 34, // 0 -> UNKNOWN_RESULT_TYPE
283 35, // 1 -> URL_WHAT_YOU_TYPED
284 14, // 2 -> HISTORY_URL
285 13, // 3 -> HISTORY_TITLE
286 10, // 4 -> HISTORY_BODY
287 12, // 5 -> HISTORY_KEYWORD
288 16, // 6 -> NAVSUGGEST
289 30, // 7 -> SEARCH_WHAT_YOU_TYPED
290 22, // 8 -> SEARCH_HISTORY
291 24, // 9 -> SEARCH_SUGGEST
292 23, // 10 -> SEARCH_OTHER_ENGINE
293 9, // 11 -> EXTENSION_APP
294 7, // 12 -> CONTACT
295 2, // 13 -> BOOKMARK_TITLE
296 26, // 14 -> SEARCH_SUGGEST_ENTITY
297 29, // 15 -> SEARCH_SUGGEST_TAIL
298 27, // 16 -> SEARCH_SUGGEST_PERSONALIZED
299 28, // 17 -> SEARCH_SUGGEST_PROFILE
300 1, // 18 -> APP_RESULT
301 0, // 19 -> APP
302 15, // 20 -> LEGACY_ON_DEVICE
303 17, // 21 -> NAVSUGGEST_PERSONALIZED
304 25, // 22 -> SEARCH_SUGGEST_ANSWER
305 3, // 23 -> CALCULATOR
306 6, // 24 -> CLIPBOARD_URL
307 20, // 25 -> PHYSICAL_WEB
308 21, // 26 -> PHYSICAL_WEB_OVERFLOW
309 8, // 27 -> DOCUMENT
310 5, // 28 -> CLIPBOARD_TEXT
311 4, // 29 -> CLIPBOARD_IMAGE
312 33, // 30 -> TILE_SUGGESTION
313 11, // 31 -> HISTORY_CLUSTER
314 18, // 32 -> OPEN_TAB
315 31, // 33 -> STARTER_PACK
316 32, // 34 -> TAB_SWITCH
317 19, // 35 -> PEDAL
318 };
319
OmniboxEventProto_Suggestion_ResultType_Name(OmniboxEventProto_Suggestion_ResultType value)320 const std::string& OmniboxEventProto_Suggestion_ResultType_Name(
321 OmniboxEventProto_Suggestion_ResultType value) {
322 static const bool dummy =
323 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
324 OmniboxEventProto_Suggestion_ResultType_entries,
325 OmniboxEventProto_Suggestion_ResultType_entries_by_number,
326 36, OmniboxEventProto_Suggestion_ResultType_strings);
327 (void) dummy;
328 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
329 OmniboxEventProto_Suggestion_ResultType_entries,
330 OmniboxEventProto_Suggestion_ResultType_entries_by_number,
331 36, value);
332 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
333 OmniboxEventProto_Suggestion_ResultType_strings[idx].get();
334 }
OmniboxEventProto_Suggestion_ResultType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_Suggestion_ResultType * value)335 bool OmniboxEventProto_Suggestion_ResultType_Parse(
336 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_Suggestion_ResultType* value) {
337 int int_value;
338 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
339 OmniboxEventProto_Suggestion_ResultType_entries, 36, name, &int_value);
340 if (success) {
341 *value = static_cast<OmniboxEventProto_Suggestion_ResultType>(int_value);
342 }
343 return success;
344 }
345 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
346 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::UNKNOWN_RESULT_TYPE;
347 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::URL_WHAT_YOU_TYPED;
348 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::HISTORY_URL;
349 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::HISTORY_TITLE;
350 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::HISTORY_BODY;
351 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::HISTORY_KEYWORD;
352 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::NAVSUGGEST;
353 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_WHAT_YOU_TYPED;
354 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_HISTORY;
355 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_SUGGEST;
356 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_OTHER_ENGINE;
357 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::EXTENSION_APP;
358 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::CONTACT;
359 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::BOOKMARK_TITLE;
360 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_SUGGEST_ENTITY;
361 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_SUGGEST_TAIL;
362 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_SUGGEST_PERSONALIZED;
363 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_SUGGEST_PROFILE;
364 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::APP_RESULT;
365 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::APP;
366 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::LEGACY_ON_DEVICE;
367 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::NAVSUGGEST_PERSONALIZED;
368 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::SEARCH_SUGGEST_ANSWER;
369 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::CALCULATOR;
370 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::CLIPBOARD_URL;
371 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::PHYSICAL_WEB;
372 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::PHYSICAL_WEB_OVERFLOW;
373 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::DOCUMENT;
374 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::CLIPBOARD_TEXT;
375 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::CLIPBOARD_IMAGE;
376 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::TILE_SUGGESTION;
377 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::HISTORY_CLUSTER;
378 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::OPEN_TAB;
379 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::STARTER_PACK;
380 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::TAB_SWITCH;
381 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::PEDAL;
382 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::ResultType_MIN;
383 constexpr OmniboxEventProto_Suggestion_ResultType OmniboxEventProto_Suggestion::ResultType_MAX;
384 constexpr int OmniboxEventProto_Suggestion::ResultType_ARRAYSIZE;
385 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
OmniboxEventProto_PageClassification_IsValid(int value)386 bool OmniboxEventProto_PageClassification_IsValid(int value) {
387 switch (value) {
388 case 0:
389 case 1:
390 case 2:
391 case 3:
392 case 4:
393 case 5:
394 case 6:
395 case 7:
396 case 8:
397 case 9:
398 case 10:
399 case 11:
400 case 12:
401 case 13:
402 case 14:
403 case 15:
404 case 16:
405 case 17:
406 case 18:
407 case 19:
408 case 20:
409 case 21:
410 case 22:
411 case 23:
412 case 24:
413 case 25:
414 case 26:
415 case 27:
416 case 28:
417 return true;
418 default:
419 return false;
420 }
421 }
422
423 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_PageClassification_strings[29] = {};
424
425 static const char OmniboxEventProto_PageClassification_names[] =
426 "ANDROID_SEARCH_WIDGET"
427 "ANDROID_SHORTCUTS_WIDGET"
428 "APP_HOME"
429 "APP_MAPS"
430 "APP_SEARCH"
431 "BLANK"
432 "CHROMEOS_APP_LIST"
433 "CONTEXTUAL_SEARCHBOX"
434 "HOME_PAGE"
435 "INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS"
436 "INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS"
437 "INVALID_SPEC"
438 "JOURNEYS"
439 "LENS_SIDE_PANEL_SEARCHBOX"
440 "NTP"
441 "NTP_REALBOX"
442 "NTP_ZPS_PREFETCH"
443 "OBSOLETE_INSTANT_NTP"
444 "OTHER"
445 "OTHER_ON_CCT"
446 "OTHER_ZPS_PREFETCH"
447 "SEARCH_BUTTON_AS_STARTING_FOCUS"
448 "SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT"
449 "SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT"
450 "SEARCH_RESULT_PAGE_ON_CCT"
451 "SEARCH_SIDE_PANEL_SEARCHBOX"
452 "SRP_ZPS_PREFETCH"
453 "START_SURFACE_HOMEPAGE"
454 "START_SURFACE_NEW_TAB";
455
456 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_PageClassification_entries[] = {
457 { {OmniboxEventProto_PageClassification_names + 0, 21}, 16 },
458 { {OmniboxEventProto_PageClassification_names + 21, 24}, 19 },
459 { {OmniboxEventProto_PageClassification_names + 45, 8}, 10 },
460 { {OmniboxEventProto_PageClassification_names + 53, 8}, 12 },
461 { {OmniboxEventProto_PageClassification_names + 61, 10}, 11 },
462 { {OmniboxEventProto_PageClassification_names + 71, 5}, 2 },
463 { {OmniboxEventProto_PageClassification_names + 76, 17}, 14 },
464 { {OmniboxEventProto_PageClassification_names + 93, 20}, 24 },
465 { {OmniboxEventProto_PageClassification_names + 113, 9}, 3 },
466 { {OmniboxEventProto_PageClassification_names + 122, 42}, 8 },
467 { {OmniboxEventProto_PageClassification_names + 164, 42}, 7 },
468 { {OmniboxEventProto_PageClassification_names + 206, 12}, 0 },
469 { {OmniboxEventProto_PageClassification_names + 218, 8}, 21 },
470 { {OmniboxEventProto_PageClassification_names + 226, 25}, 26 },
471 { {OmniboxEventProto_PageClassification_names + 251, 3}, 1 },
472 { {OmniboxEventProto_PageClassification_names + 254, 11}, 15 },
473 { {OmniboxEventProto_PageClassification_names + 265, 16}, 20 },
474 { {OmniboxEventProto_PageClassification_names + 281, 20}, 5 },
475 { {OmniboxEventProto_PageClassification_names + 301, 5}, 4 },
476 { {OmniboxEventProto_PageClassification_names + 306, 12}, 28 },
477 { {OmniboxEventProto_PageClassification_names + 318, 18}, 23 },
478 { {OmniboxEventProto_PageClassification_names + 336, 31}, 13 },
479 { {OmniboxEventProto_PageClassification_names + 367, 48}, 6 },
480 { {OmniboxEventProto_PageClassification_names + 415, 45}, 9 },
481 { {OmniboxEventProto_PageClassification_names + 460, 25}, 27 },
482 { {OmniboxEventProto_PageClassification_names + 485, 27}, 25 },
483 { {OmniboxEventProto_PageClassification_names + 512, 16}, 22 },
484 { {OmniboxEventProto_PageClassification_names + 528, 22}, 17 },
485 { {OmniboxEventProto_PageClassification_names + 550, 21}, 18 },
486 };
487
488 static const int OmniboxEventProto_PageClassification_entries_by_number[] = {
489 11, // 0 -> INVALID_SPEC
490 14, // 1 -> NTP
491 5, // 2 -> BLANK
492 8, // 3 -> HOME_PAGE
493 18, // 4 -> OTHER
494 17, // 5 -> OBSOLETE_INSTANT_NTP
495 22, // 6 -> SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT
496 10, // 7 -> INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS
497 9, // 8 -> INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS
498 23, // 9 -> SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT
499 2, // 10 -> APP_HOME
500 4, // 11 -> APP_SEARCH
501 3, // 12 -> APP_MAPS
502 21, // 13 -> SEARCH_BUTTON_AS_STARTING_FOCUS
503 6, // 14 -> CHROMEOS_APP_LIST
504 15, // 15 -> NTP_REALBOX
505 0, // 16 -> ANDROID_SEARCH_WIDGET
506 27, // 17 -> START_SURFACE_HOMEPAGE
507 28, // 18 -> START_SURFACE_NEW_TAB
508 1, // 19 -> ANDROID_SHORTCUTS_WIDGET
509 16, // 20 -> NTP_ZPS_PREFETCH
510 12, // 21 -> JOURNEYS
511 26, // 22 -> SRP_ZPS_PREFETCH
512 20, // 23 -> OTHER_ZPS_PREFETCH
513 7, // 24 -> CONTEXTUAL_SEARCHBOX
514 25, // 25 -> SEARCH_SIDE_PANEL_SEARCHBOX
515 13, // 26 -> LENS_SIDE_PANEL_SEARCHBOX
516 24, // 27 -> SEARCH_RESULT_PAGE_ON_CCT
517 19, // 28 -> OTHER_ON_CCT
518 };
519
OmniboxEventProto_PageClassification_Name(OmniboxEventProto_PageClassification value)520 const std::string& OmniboxEventProto_PageClassification_Name(
521 OmniboxEventProto_PageClassification value) {
522 static const bool dummy =
523 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
524 OmniboxEventProto_PageClassification_entries,
525 OmniboxEventProto_PageClassification_entries_by_number,
526 29, OmniboxEventProto_PageClassification_strings);
527 (void) dummy;
528 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
529 OmniboxEventProto_PageClassification_entries,
530 OmniboxEventProto_PageClassification_entries_by_number,
531 29, value);
532 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
533 OmniboxEventProto_PageClassification_strings[idx].get();
534 }
OmniboxEventProto_PageClassification_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_PageClassification * value)535 bool OmniboxEventProto_PageClassification_Parse(
536 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_PageClassification* value) {
537 int int_value;
538 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
539 OmniboxEventProto_PageClassification_entries, 29, name, &int_value);
540 if (success) {
541 *value = static_cast<OmniboxEventProto_PageClassification>(int_value);
542 }
543 return success;
544 }
545 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
546 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::INVALID_SPEC;
547 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::NTP;
548 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::BLANK;
549 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::HOME_PAGE;
550 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::OTHER;
551 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::OBSOLETE_INSTANT_NTP;
552 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::SEARCH_RESULT_PAGE_DOING_SEARCH_TERM_REPLACEMENT;
553 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::INSTANT_NTP_WITH_OMNIBOX_AS_STARTING_FOCUS;
554 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::INSTANT_NTP_WITH_FAKEBOX_AS_STARTING_FOCUS;
555 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::SEARCH_RESULT_PAGE_NO_SEARCH_TERM_REPLACEMENT;
556 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::APP_HOME;
557 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::APP_SEARCH;
558 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::APP_MAPS;
559 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::SEARCH_BUTTON_AS_STARTING_FOCUS;
560 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::CHROMEOS_APP_LIST;
561 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::NTP_REALBOX;
562 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::ANDROID_SEARCH_WIDGET;
563 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::START_SURFACE_HOMEPAGE;
564 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::START_SURFACE_NEW_TAB;
565 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::ANDROID_SHORTCUTS_WIDGET;
566 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::NTP_ZPS_PREFETCH;
567 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::JOURNEYS;
568 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::SRP_ZPS_PREFETCH;
569 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::OTHER_ZPS_PREFETCH;
570 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::CONTEXTUAL_SEARCHBOX;
571 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::SEARCH_SIDE_PANEL_SEARCHBOX;
572 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::LENS_SIDE_PANEL_SEARCHBOX;
573 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::SEARCH_RESULT_PAGE_ON_CCT;
574 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::OTHER_ON_CCT;
575 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::PageClassification_MIN;
576 constexpr OmniboxEventProto_PageClassification OmniboxEventProto::PageClassification_MAX;
577 constexpr int OmniboxEventProto::PageClassification_ARRAYSIZE;
578 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
OmniboxEventProto_ModeType_IsValid(int value)579 bool OmniboxEventProto_ModeType_IsValid(int value) {
580 switch (value) {
581 case 0:
582 case 1:
583 case 2:
584 return true;
585 default:
586 return false;
587 }
588 }
589
590 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_ModeType_strings[3] = {};
591
592 static const char OmniboxEventProto_ModeType_names[] =
593 "IMAGE_MODE"
594 "UNKNOWN_MODE"
595 "WEB_MODE";
596
597 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_ModeType_entries[] = {
598 { {OmniboxEventProto_ModeType_names + 0, 10}, 2 },
599 { {OmniboxEventProto_ModeType_names + 10, 12}, 0 },
600 { {OmniboxEventProto_ModeType_names + 22, 8}, 1 },
601 };
602
603 static const int OmniboxEventProto_ModeType_entries_by_number[] = {
604 1, // 0 -> UNKNOWN_MODE
605 2, // 1 -> WEB_MODE
606 0, // 2 -> IMAGE_MODE
607 };
608
OmniboxEventProto_ModeType_Name(OmniboxEventProto_ModeType value)609 const std::string& OmniboxEventProto_ModeType_Name(
610 OmniboxEventProto_ModeType value) {
611 static const bool dummy =
612 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
613 OmniboxEventProto_ModeType_entries,
614 OmniboxEventProto_ModeType_entries_by_number,
615 3, OmniboxEventProto_ModeType_strings);
616 (void) dummy;
617 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
618 OmniboxEventProto_ModeType_entries,
619 OmniboxEventProto_ModeType_entries_by_number,
620 3, value);
621 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
622 OmniboxEventProto_ModeType_strings[idx].get();
623 }
OmniboxEventProto_ModeType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_ModeType * value)624 bool OmniboxEventProto_ModeType_Parse(
625 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_ModeType* value) {
626 int int_value;
627 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
628 OmniboxEventProto_ModeType_entries, 3, name, &int_value);
629 if (success) {
630 *value = static_cast<OmniboxEventProto_ModeType>(int_value);
631 }
632 return success;
633 }
634 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
635 constexpr OmniboxEventProto_ModeType OmniboxEventProto::UNKNOWN_MODE;
636 constexpr OmniboxEventProto_ModeType OmniboxEventProto::WEB_MODE;
637 constexpr OmniboxEventProto_ModeType OmniboxEventProto::IMAGE_MODE;
638 constexpr OmniboxEventProto_ModeType OmniboxEventProto::ModeType_MIN;
639 constexpr OmniboxEventProto_ModeType OmniboxEventProto::ModeType_MAX;
640 constexpr int OmniboxEventProto::ModeType_ARRAYSIZE;
641 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
OmniboxEventProto_ProviderType_IsValid(int value)642 bool OmniboxEventProto_ProviderType_IsValid(int value) {
643 switch (value) {
644 case 0:
645 case 1:
646 case 2:
647 case 3:
648 case 4:
649 case 5:
650 case 6:
651 case 7:
652 case 8:
653 case 9:
654 case 10:
655 case 11:
656 case 12:
657 case 13:
658 case 14:
659 case 15:
660 case 16:
661 case 17:
662 case 18:
663 case 19:
664 case 20:
665 case 21:
666 case 22:
667 case 23:
668 case 24:
669 case 25:
670 return true;
671 default:
672 return false;
673 }
674 }
675
676 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_ProviderType_strings[26] = {};
677
678 static const char OmniboxEventProto_ProviderType_names[] =
679 "BOOKMARK"
680 "BUILTIN"
681 "CLIPBOARD"
682 "CONTACT"
683 "DOCUMENT"
684 "EXTENSION_APPS"
685 "FEATURED_SEARCH"
686 "HISTORY_CLUSTER"
687 "HISTORY_CONTENTS"
688 "HISTORY_FUZZY"
689 "HISTORY_QUICK"
690 "HISTORY_URL"
691 "KEYWORD"
692 "ON_DEVICE"
693 "ON_DEVICE_CHROME"
694 "ON_DEVICE_HEAD"
695 "OPEN_TAB"
696 "PEDALS"
697 "PHYSICAL_WEB"
698 "QUERY_TILE"
699 "SEARCH"
700 "SHORTCUTS"
701 "TAB_SWITCH"
702 "UNKNOWN_PROVIDER"
703 "ZERO_SUGGEST"
704 "ZERO_SUGGEST_LOCAL_HISTORY";
705
706 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_ProviderType_entries[] = {
707 { {OmniboxEventProto_ProviderType_names + 0, 8}, 10 },
708 { {OmniboxEventProto_ProviderType_names + 8, 7}, 6 },
709 { {OmniboxEventProto_ProviderType_names + 15, 9}, 14 },
710 { {OmniboxEventProto_ProviderType_names + 24, 7}, 9 },
711 { {OmniboxEventProto_ProviderType_names + 31, 8}, 16 },
712 { {OmniboxEventProto_ProviderType_names + 39, 14}, 8 },
713 { {OmniboxEventProto_ProviderType_names + 53, 15}, 25 },
714 { {OmniboxEventProto_ProviderType_names + 68, 15}, 20 },
715 { {OmniboxEventProto_ProviderType_names + 83, 16}, 2 },
716 { {OmniboxEventProto_ProviderType_names + 99, 13}, 21 },
717 { {OmniboxEventProto_ProviderType_names + 112, 13}, 3 },
718 { {OmniboxEventProto_ProviderType_names + 125, 11}, 1 },
719 { {OmniboxEventProto_ProviderType_names + 136, 7}, 5 },
720 { {OmniboxEventProto_ProviderType_names + 143, 9}, 12 },
721 { {OmniboxEventProto_ProviderType_names + 152, 16}, 13 },
722 { {OmniboxEventProto_ProviderType_names + 168, 14}, 17 },
723 { {OmniboxEventProto_ProviderType_names + 182, 8}, 22 },
724 { {OmniboxEventProto_ProviderType_names + 190, 6}, 24 },
725 { {OmniboxEventProto_ProviderType_names + 196, 12}, 15 },
726 { {OmniboxEventProto_ProviderType_names + 208, 10}, 19 },
727 { {OmniboxEventProto_ProviderType_names + 218, 6}, 4 },
728 { {OmniboxEventProto_ProviderType_names + 224, 9}, 7 },
729 { {OmniboxEventProto_ProviderType_names + 233, 10}, 23 },
730 { {OmniboxEventProto_ProviderType_names + 243, 16}, 0 },
731 { {OmniboxEventProto_ProviderType_names + 259, 12}, 11 },
732 { {OmniboxEventProto_ProviderType_names + 271, 26}, 18 },
733 };
734
735 static const int OmniboxEventProto_ProviderType_entries_by_number[] = {
736 23, // 0 -> UNKNOWN_PROVIDER
737 11, // 1 -> HISTORY_URL
738 8, // 2 -> HISTORY_CONTENTS
739 10, // 3 -> HISTORY_QUICK
740 20, // 4 -> SEARCH
741 12, // 5 -> KEYWORD
742 1, // 6 -> BUILTIN
743 21, // 7 -> SHORTCUTS
744 5, // 8 -> EXTENSION_APPS
745 3, // 9 -> CONTACT
746 0, // 10 -> BOOKMARK
747 24, // 11 -> ZERO_SUGGEST
748 13, // 12 -> ON_DEVICE
749 14, // 13 -> ON_DEVICE_CHROME
750 2, // 14 -> CLIPBOARD
751 18, // 15 -> PHYSICAL_WEB
752 4, // 16 -> DOCUMENT
753 15, // 17 -> ON_DEVICE_HEAD
754 25, // 18 -> ZERO_SUGGEST_LOCAL_HISTORY
755 19, // 19 -> QUERY_TILE
756 7, // 20 -> HISTORY_CLUSTER
757 9, // 21 -> HISTORY_FUZZY
758 16, // 22 -> OPEN_TAB
759 22, // 23 -> TAB_SWITCH
760 17, // 24 -> PEDALS
761 6, // 25 -> FEATURED_SEARCH
762 };
763
OmniboxEventProto_ProviderType_Name(OmniboxEventProto_ProviderType value)764 const std::string& OmniboxEventProto_ProviderType_Name(
765 OmniboxEventProto_ProviderType value) {
766 static const bool dummy =
767 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
768 OmniboxEventProto_ProviderType_entries,
769 OmniboxEventProto_ProviderType_entries_by_number,
770 26, OmniboxEventProto_ProviderType_strings);
771 (void) dummy;
772 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
773 OmniboxEventProto_ProviderType_entries,
774 OmniboxEventProto_ProviderType_entries_by_number,
775 26, value);
776 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
777 OmniboxEventProto_ProviderType_strings[idx].get();
778 }
OmniboxEventProto_ProviderType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_ProviderType * value)779 bool OmniboxEventProto_ProviderType_Parse(
780 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_ProviderType* value) {
781 int int_value;
782 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
783 OmniboxEventProto_ProviderType_entries, 26, name, &int_value);
784 if (success) {
785 *value = static_cast<OmniboxEventProto_ProviderType>(int_value);
786 }
787 return success;
788 }
789 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
790 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::UNKNOWN_PROVIDER;
791 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::HISTORY_URL;
792 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::HISTORY_CONTENTS;
793 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::HISTORY_QUICK;
794 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::SEARCH;
795 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::KEYWORD;
796 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::BUILTIN;
797 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::SHORTCUTS;
798 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::EXTENSION_APPS;
799 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::CONTACT;
800 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::BOOKMARK;
801 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ZERO_SUGGEST;
802 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ON_DEVICE;
803 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ON_DEVICE_CHROME;
804 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::CLIPBOARD;
805 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::PHYSICAL_WEB;
806 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::DOCUMENT;
807 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ON_DEVICE_HEAD;
808 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ZERO_SUGGEST_LOCAL_HISTORY;
809 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::QUERY_TILE;
810 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::HISTORY_CLUSTER;
811 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::HISTORY_FUZZY;
812 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::OPEN_TAB;
813 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::TAB_SWITCH;
814 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::PEDALS;
815 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::FEATURED_SEARCH;
816 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ProviderType_MIN;
817 constexpr OmniboxEventProto_ProviderType OmniboxEventProto::ProviderType_MAX;
818 constexpr int OmniboxEventProto::ProviderType_ARRAYSIZE;
819 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
OmniboxEventProto_KeywordModeEntryMethod_IsValid(int value)820 bool OmniboxEventProto_KeywordModeEntryMethod_IsValid(int value) {
821 switch (value) {
822 case 0:
823 case 1:
824 case 2:
825 case 3:
826 case 4:
827 case 5:
828 case 6:
829 case 7:
830 case 8:
831 return true;
832 default:
833 return false;
834 }
835 }
836
837 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_KeywordModeEntryMethod_strings[9] = {};
838
839 static const char OmniboxEventProto_KeywordModeEntryMethod_names[] =
840 "CLICK_HINT_VIEW"
841 "INVALID"
842 "KEYBOARD_SHORTCUT"
843 "QUESTION_MARK"
844 "SELECT_SUGGESTION"
845 "SPACE_AT_END"
846 "SPACE_IN_MIDDLE"
847 "TAB"
848 "TAP_HINT_VIEW";
849
850 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_KeywordModeEntryMethod_entries[] = {
851 { {OmniboxEventProto_KeywordModeEntryMethod_names + 0, 15}, 6 },
852 { {OmniboxEventProto_KeywordModeEntryMethod_names + 15, 7}, 0 },
853 { {OmniboxEventProto_KeywordModeEntryMethod_names + 22, 17}, 4 },
854 { {OmniboxEventProto_KeywordModeEntryMethod_names + 39, 13}, 5 },
855 { {OmniboxEventProto_KeywordModeEntryMethod_names + 52, 17}, 8 },
856 { {OmniboxEventProto_KeywordModeEntryMethod_names + 69, 12}, 2 },
857 { {OmniboxEventProto_KeywordModeEntryMethod_names + 81, 15}, 3 },
858 { {OmniboxEventProto_KeywordModeEntryMethod_names + 96, 3}, 1 },
859 { {OmniboxEventProto_KeywordModeEntryMethod_names + 99, 13}, 7 },
860 };
861
862 static const int OmniboxEventProto_KeywordModeEntryMethod_entries_by_number[] = {
863 1, // 0 -> INVALID
864 7, // 1 -> TAB
865 5, // 2 -> SPACE_AT_END
866 6, // 3 -> SPACE_IN_MIDDLE
867 2, // 4 -> KEYBOARD_SHORTCUT
868 3, // 5 -> QUESTION_MARK
869 0, // 6 -> CLICK_HINT_VIEW
870 8, // 7 -> TAP_HINT_VIEW
871 4, // 8 -> SELECT_SUGGESTION
872 };
873
OmniboxEventProto_KeywordModeEntryMethod_Name(OmniboxEventProto_KeywordModeEntryMethod value)874 const std::string& OmniboxEventProto_KeywordModeEntryMethod_Name(
875 OmniboxEventProto_KeywordModeEntryMethod value) {
876 static const bool dummy =
877 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
878 OmniboxEventProto_KeywordModeEntryMethod_entries,
879 OmniboxEventProto_KeywordModeEntryMethod_entries_by_number,
880 9, OmniboxEventProto_KeywordModeEntryMethod_strings);
881 (void) dummy;
882 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
883 OmniboxEventProto_KeywordModeEntryMethod_entries,
884 OmniboxEventProto_KeywordModeEntryMethod_entries_by_number,
885 9, value);
886 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
887 OmniboxEventProto_KeywordModeEntryMethod_strings[idx].get();
888 }
OmniboxEventProto_KeywordModeEntryMethod_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_KeywordModeEntryMethod * value)889 bool OmniboxEventProto_KeywordModeEntryMethod_Parse(
890 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_KeywordModeEntryMethod* value) {
891 int int_value;
892 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
893 OmniboxEventProto_KeywordModeEntryMethod_entries, 9, name, &int_value);
894 if (success) {
895 *value = static_cast<OmniboxEventProto_KeywordModeEntryMethod>(int_value);
896 }
897 return success;
898 }
899 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
900 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::INVALID;
901 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::TAB;
902 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::SPACE_AT_END;
903 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::SPACE_IN_MIDDLE;
904 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::KEYBOARD_SHORTCUT;
905 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::QUESTION_MARK;
906 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::CLICK_HINT_VIEW;
907 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::TAP_HINT_VIEW;
908 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::SELECT_SUGGESTION;
909 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::KeywordModeEntryMethod_MIN;
910 constexpr OmniboxEventProto_KeywordModeEntryMethod OmniboxEventProto::KeywordModeEntryMethod_MAX;
911 constexpr int OmniboxEventProto::KeywordModeEntryMethod_ARRAYSIZE;
912 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
OmniboxEventProto_Feature_IsValid(int value)913 bool OmniboxEventProto_Feature_IsValid(int value) {
914 switch (value) {
915 case 0:
916 case 2:
917 case 3:
918 case 4:
919 case 5:
920 case 6:
921 case 7:
922 case 8:
923 case 9:
924 case 10:
925 case 11:
926 return true;
927 default:
928 return false;
929 }
930 }
931
932 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_Feature_strings[11] = {};
933
934 static const char OmniboxEventProto_Feature_names[] =
935 "COMPANY_ENTITY_ADJUSTMENT"
936 "DOMAIN_SUGGESTIONS"
937 "FUZZY_URL_SUGGESTIONS"
938 "HISTORY_CLUSTER_SUGGESTION"
939 "ML_URL_SCORING"
940 "REMOTE_SEARCH_FEATURE"
941 "REMOTE_SECONDARY_ZERO_SUGGEST"
942 "REMOTE_ZERO_SUGGEST_FEATURE"
943 "RICH_AUTOCOMPLETION"
944 "SHORTCUT_BOOST"
945 "SHORT_BOOKMARK_SUGGESTIONS_BY_TOTAL_INPUT_LENGTH";
946
947 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_Feature_entries[] = {
948 { {OmniboxEventProto_Feature_names + 0, 25}, 11 },
949 { {OmniboxEventProto_Feature_names + 25, 18}, 5 },
950 { {OmniboxEventProto_Feature_names + 43, 21}, 3 },
951 { {OmniboxEventProto_Feature_names + 64, 26}, 4 },
952 { {OmniboxEventProto_Feature_names + 90, 14}, 10 },
953 { {OmniboxEventProto_Feature_names + 104, 21}, 6 },
954 { {OmniboxEventProto_Feature_names + 125, 29}, 9 },
955 { {OmniboxEventProto_Feature_names + 154, 27}, 7 },
956 { {OmniboxEventProto_Feature_names + 181, 19}, 0 },
957 { {OmniboxEventProto_Feature_names + 200, 14}, 8 },
958 { {OmniboxEventProto_Feature_names + 214, 48}, 2 },
959 };
960
961 static const int OmniboxEventProto_Feature_entries_by_number[] = {
962 8, // 0 -> RICH_AUTOCOMPLETION
963 10, // 2 -> SHORT_BOOKMARK_SUGGESTIONS_BY_TOTAL_INPUT_LENGTH
964 2, // 3 -> FUZZY_URL_SUGGESTIONS
965 3, // 4 -> HISTORY_CLUSTER_SUGGESTION
966 1, // 5 -> DOMAIN_SUGGESTIONS
967 5, // 6 -> REMOTE_SEARCH_FEATURE
968 7, // 7 -> REMOTE_ZERO_SUGGEST_FEATURE
969 9, // 8 -> SHORTCUT_BOOST
970 6, // 9 -> REMOTE_SECONDARY_ZERO_SUGGEST
971 4, // 10 -> ML_URL_SCORING
972 0, // 11 -> COMPANY_ENTITY_ADJUSTMENT
973 };
974
OmniboxEventProto_Feature_Name(OmniboxEventProto_Feature value)975 const std::string& OmniboxEventProto_Feature_Name(
976 OmniboxEventProto_Feature value) {
977 static const bool dummy =
978 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
979 OmniboxEventProto_Feature_entries,
980 OmniboxEventProto_Feature_entries_by_number,
981 11, OmniboxEventProto_Feature_strings);
982 (void) dummy;
983 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
984 OmniboxEventProto_Feature_entries,
985 OmniboxEventProto_Feature_entries_by_number,
986 11, value);
987 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
988 OmniboxEventProto_Feature_strings[idx].get();
989 }
OmniboxEventProto_Feature_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_Feature * value)990 bool OmniboxEventProto_Feature_Parse(
991 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_Feature* value) {
992 int int_value;
993 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
994 OmniboxEventProto_Feature_entries, 11, name, &int_value);
995 if (success) {
996 *value = static_cast<OmniboxEventProto_Feature>(int_value);
997 }
998 return success;
999 }
1000 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
1001 constexpr OmniboxEventProto_Feature OmniboxEventProto::RICH_AUTOCOMPLETION;
1002 constexpr OmniboxEventProto_Feature OmniboxEventProto::SHORT_BOOKMARK_SUGGESTIONS_BY_TOTAL_INPUT_LENGTH;
1003 constexpr OmniboxEventProto_Feature OmniboxEventProto::FUZZY_URL_SUGGESTIONS;
1004 constexpr OmniboxEventProto_Feature OmniboxEventProto::HISTORY_CLUSTER_SUGGESTION;
1005 constexpr OmniboxEventProto_Feature OmniboxEventProto::DOMAIN_SUGGESTIONS;
1006 constexpr OmniboxEventProto_Feature OmniboxEventProto::REMOTE_SEARCH_FEATURE;
1007 constexpr OmniboxEventProto_Feature OmniboxEventProto::REMOTE_ZERO_SUGGEST_FEATURE;
1008 constexpr OmniboxEventProto_Feature OmniboxEventProto::SHORTCUT_BOOST;
1009 constexpr OmniboxEventProto_Feature OmniboxEventProto::REMOTE_SECONDARY_ZERO_SUGGEST;
1010 constexpr OmniboxEventProto_Feature OmniboxEventProto::ML_URL_SCORING;
1011 constexpr OmniboxEventProto_Feature OmniboxEventProto::COMPANY_ENTITY_ADJUSTMENT;
1012 constexpr OmniboxEventProto_Feature OmniboxEventProto::Feature_MIN;
1013 constexpr OmniboxEventProto_Feature OmniboxEventProto::Feature_MAX;
1014 constexpr int OmniboxEventProto::Feature_ARRAYSIZE;
1015 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
OmniboxEventProto_OmniboxPosition_IsValid(int value)1016 bool OmniboxEventProto_OmniboxPosition_IsValid(int value) {
1017 switch (value) {
1018 case 0:
1019 case 1:
1020 case 2:
1021 return true;
1022 default:
1023 return false;
1024 }
1025 }
1026
1027 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> OmniboxEventProto_OmniboxPosition_strings[3] = {};
1028
1029 static const char OmniboxEventProto_OmniboxPosition_names[] =
1030 "BOTTOM_POSITION"
1031 "TOP_POSITION"
1032 "UNKNOWN_POSITION";
1033
1034 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry OmniboxEventProto_OmniboxPosition_entries[] = {
1035 { {OmniboxEventProto_OmniboxPosition_names + 0, 15}, 2 },
1036 { {OmniboxEventProto_OmniboxPosition_names + 15, 12}, 1 },
1037 { {OmniboxEventProto_OmniboxPosition_names + 27, 16}, 0 },
1038 };
1039
1040 static const int OmniboxEventProto_OmniboxPosition_entries_by_number[] = {
1041 2, // 0 -> UNKNOWN_POSITION
1042 1, // 1 -> TOP_POSITION
1043 0, // 2 -> BOTTOM_POSITION
1044 };
1045
OmniboxEventProto_OmniboxPosition_Name(OmniboxEventProto_OmniboxPosition value)1046 const std::string& OmniboxEventProto_OmniboxPosition_Name(
1047 OmniboxEventProto_OmniboxPosition value) {
1048 static const bool dummy =
1049 ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
1050 OmniboxEventProto_OmniboxPosition_entries,
1051 OmniboxEventProto_OmniboxPosition_entries_by_number,
1052 3, OmniboxEventProto_OmniboxPosition_strings);
1053 (void) dummy;
1054 int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
1055 OmniboxEventProto_OmniboxPosition_entries,
1056 OmniboxEventProto_OmniboxPosition_entries_by_number,
1057 3, value);
1058 return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
1059 OmniboxEventProto_OmniboxPosition_strings[idx].get();
1060 }
OmniboxEventProto_OmniboxPosition_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name,OmniboxEventProto_OmniboxPosition * value)1061 bool OmniboxEventProto_OmniboxPosition_Parse(
1062 ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, OmniboxEventProto_OmniboxPosition* value) {
1063 int int_value;
1064 bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
1065 OmniboxEventProto_OmniboxPosition_entries, 3, name, &int_value);
1066 if (success) {
1067 *value = static_cast<OmniboxEventProto_OmniboxPosition>(int_value);
1068 }
1069 return success;
1070 }
1071 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
1072 constexpr OmniboxEventProto_OmniboxPosition OmniboxEventProto::UNKNOWN_POSITION;
1073 constexpr OmniboxEventProto_OmniboxPosition OmniboxEventProto::TOP_POSITION;
1074 constexpr OmniboxEventProto_OmniboxPosition OmniboxEventProto::BOTTOM_POSITION;
1075 constexpr OmniboxEventProto_OmniboxPosition OmniboxEventProto::OmniboxPosition_MIN;
1076 constexpr OmniboxEventProto_OmniboxPosition OmniboxEventProto::OmniboxPosition_MAX;
1077 constexpr int OmniboxEventProto::OmniboxPosition_ARRAYSIZE;
1078 #endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
1079
1080 // ===================================================================
1081
1082 class OmniboxEventProto_Suggestion_ScoringSignals::_Internal {
1083 public:
1084 using HasBits = decltype(std::declval<OmniboxEventProto_Suggestion_ScoringSignals>()._impl_._has_bits_);
set_has_typed_count(HasBits * has_bits)1085 static void set_has_typed_count(HasBits* has_bits) {
1086 (*has_bits)[0] |= 1u;
1087 }
set_has_visit_count(HasBits * has_bits)1088 static void set_has_visit_count(HasBits* has_bits) {
1089 (*has_bits)[0] |= 2u;
1090 }
set_has_elapsed_time_last_visit_secs(HasBits * has_bits)1091 static void set_has_elapsed_time_last_visit_secs(HasBits* has_bits) {
1092 (*has_bits)[0] |= 4u;
1093 }
set_has_shortcut_visit_count(HasBits * has_bits)1094 static void set_has_shortcut_visit_count(HasBits* has_bits) {
1095 (*has_bits)[0] |= 8u;
1096 }
set_has_shortest_shortcut_len(HasBits * has_bits)1097 static void set_has_shortest_shortcut_len(HasBits* has_bits) {
1098 (*has_bits)[0] |= 16u;
1099 }
set_has_elapsed_time_last_shortcut_visit_sec(HasBits * has_bits)1100 static void set_has_elapsed_time_last_shortcut_visit_sec(HasBits* has_bits) {
1101 (*has_bits)[0] |= 32u;
1102 }
set_has_is_host_only(HasBits * has_bits)1103 static void set_has_is_host_only(HasBits* has_bits) {
1104 (*has_bits)[0] |= 16384u;
1105 }
set_has_num_bookmarks_of_url(HasBits * has_bits)1106 static void set_has_num_bookmarks_of_url(HasBits* has_bits) {
1107 (*has_bits)[0] |= 64u;
1108 }
set_has_first_bookmark_title_match_position(HasBits * has_bits)1109 static void set_has_first_bookmark_title_match_position(HasBits* has_bits) {
1110 (*has_bits)[0] |= 128u;
1111 }
set_has_total_bookmark_title_match_length(HasBits * has_bits)1112 static void set_has_total_bookmark_title_match_length(HasBits* has_bits) {
1113 (*has_bits)[0] |= 256u;
1114 }
set_has_num_input_terms_matched_by_bookmark_title(HasBits * has_bits)1115 static void set_has_num_input_terms_matched_by_bookmark_title(HasBits* has_bits) {
1116 (*has_bits)[0] |= 512u;
1117 }
set_has_first_url_match_position(HasBits * has_bits)1118 static void set_has_first_url_match_position(HasBits* has_bits) {
1119 (*has_bits)[0] |= 1024u;
1120 }
set_has_total_url_match_length(HasBits * has_bits)1121 static void set_has_total_url_match_length(HasBits* has_bits) {
1122 (*has_bits)[0] |= 2048u;
1123 }
set_has_host_match_at_word_boundary(HasBits * has_bits)1124 static void set_has_host_match_at_word_boundary(HasBits* has_bits) {
1125 (*has_bits)[0] |= 32768u;
1126 }
set_has_total_host_match_length(HasBits * has_bits)1127 static void set_has_total_host_match_length(HasBits* has_bits) {
1128 (*has_bits)[0] |= 4096u;
1129 }
set_has_total_path_match_length(HasBits * has_bits)1130 static void set_has_total_path_match_length(HasBits* has_bits) {
1131 (*has_bits)[0] |= 8192u;
1132 }
set_has_total_query_or_ref_match_length(HasBits * has_bits)1133 static void set_has_total_query_or_ref_match_length(HasBits* has_bits) {
1134 (*has_bits)[0] |= 262144u;
1135 }
set_has_total_title_match_length(HasBits * has_bits)1136 static void set_has_total_title_match_length(HasBits* has_bits) {
1137 (*has_bits)[0] |= 524288u;
1138 }
set_has_has_non_scheme_www_match(HasBits * has_bits)1139 static void set_has_has_non_scheme_www_match(HasBits* has_bits) {
1140 (*has_bits)[0] |= 65536u;
1141 }
set_has_num_input_terms_matched_by_title(HasBits * has_bits)1142 static void set_has_num_input_terms_matched_by_title(HasBits* has_bits) {
1143 (*has_bits)[0] |= 1048576u;
1144 }
set_has_num_input_terms_matched_by_url(HasBits * has_bits)1145 static void set_has_num_input_terms_matched_by_url(HasBits* has_bits) {
1146 (*has_bits)[0] |= 2097152u;
1147 }
set_has_length_of_url(HasBits * has_bits)1148 static void set_has_length_of_url(HasBits* has_bits) {
1149 (*has_bits)[0] |= 4194304u;
1150 }
set_has_site_engagement(HasBits * has_bits)1151 static void set_has_site_engagement(HasBits* has_bits) {
1152 (*has_bits)[0] |= 8388608u;
1153 }
set_has_allowed_to_be_default_match(HasBits * has_bits)1154 static void set_has_allowed_to_be_default_match(HasBits* has_bits) {
1155 (*has_bits)[0] |= 131072u;
1156 }
1157 };
1158
OmniboxEventProto_Suggestion_ScoringSignals(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)1159 OmniboxEventProto_Suggestion_ScoringSignals::OmniboxEventProto_Suggestion_ScoringSignals(::PROTOBUF_NAMESPACE_ID::Arena* arena,
1160 bool is_message_owned)
1161 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
1162 SharedCtor(arena, is_message_owned);
1163 // @@protoc_insertion_point(arena_constructor:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1164 }
OmniboxEventProto_Suggestion_ScoringSignals(const OmniboxEventProto_Suggestion_ScoringSignals & from)1165 OmniboxEventProto_Suggestion_ScoringSignals::OmniboxEventProto_Suggestion_ScoringSignals(const OmniboxEventProto_Suggestion_ScoringSignals& from)
1166 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
1167 OmniboxEventProto_Suggestion_ScoringSignals* const _this = this; (void)_this;
1168 new (&_impl_) Impl_{
1169 decltype(_impl_._has_bits_){from._impl_._has_bits_}
1170 , /*decltype(_impl_._cached_size_)*/{}
1171 , decltype(_impl_.typed_count_){}
1172 , decltype(_impl_.visit_count_){}
1173 , decltype(_impl_.elapsed_time_last_visit_secs_){}
1174 , decltype(_impl_.shortcut_visit_count_){}
1175 , decltype(_impl_.shortest_shortcut_len_){}
1176 , decltype(_impl_.elapsed_time_last_shortcut_visit_sec_){}
1177 , decltype(_impl_.num_bookmarks_of_url_){}
1178 , decltype(_impl_.first_bookmark_title_match_position_){}
1179 , decltype(_impl_.total_bookmark_title_match_length_){}
1180 , decltype(_impl_.num_input_terms_matched_by_bookmark_title_){}
1181 , decltype(_impl_.first_url_match_position_){}
1182 , decltype(_impl_.total_url_match_length_){}
1183 , decltype(_impl_.total_host_match_length_){}
1184 , decltype(_impl_.total_path_match_length_){}
1185 , decltype(_impl_.is_host_only_){}
1186 , decltype(_impl_.host_match_at_word_boundary_){}
1187 , decltype(_impl_.has_non_scheme_www_match_){}
1188 , decltype(_impl_.allowed_to_be_default_match_){}
1189 , decltype(_impl_.total_query_or_ref_match_length_){}
1190 , decltype(_impl_.total_title_match_length_){}
1191 , decltype(_impl_.num_input_terms_matched_by_title_){}
1192 , decltype(_impl_.num_input_terms_matched_by_url_){}
1193 , decltype(_impl_.length_of_url_){}
1194 , decltype(_impl_.site_engagement_){}};
1195
1196 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1197 ::memcpy(&_impl_.typed_count_, &from._impl_.typed_count_,
1198 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.site_engagement_) -
1199 reinterpret_cast<char*>(&_impl_.typed_count_)) + sizeof(_impl_.site_engagement_));
1200 // @@protoc_insertion_point(copy_constructor:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1201 }
1202
SharedCtor(::_pb::Arena * arena,bool is_message_owned)1203 inline void OmniboxEventProto_Suggestion_ScoringSignals::SharedCtor(
1204 ::_pb::Arena* arena, bool is_message_owned) {
1205 (void)arena;
1206 (void)is_message_owned;
1207 new (&_impl_) Impl_{
1208 decltype(_impl_._has_bits_){}
1209 , /*decltype(_impl_._cached_size_)*/{}
1210 , decltype(_impl_.typed_count_){0}
1211 , decltype(_impl_.visit_count_){0}
1212 , decltype(_impl_.elapsed_time_last_visit_secs_){int64_t{0}}
1213 , decltype(_impl_.shortcut_visit_count_){0}
1214 , decltype(_impl_.shortest_shortcut_len_){0}
1215 , decltype(_impl_.elapsed_time_last_shortcut_visit_sec_){int64_t{0}}
1216 , decltype(_impl_.num_bookmarks_of_url_){0}
1217 , decltype(_impl_.first_bookmark_title_match_position_){0}
1218 , decltype(_impl_.total_bookmark_title_match_length_){0}
1219 , decltype(_impl_.num_input_terms_matched_by_bookmark_title_){0}
1220 , decltype(_impl_.first_url_match_position_){0}
1221 , decltype(_impl_.total_url_match_length_){0}
1222 , decltype(_impl_.total_host_match_length_){0}
1223 , decltype(_impl_.total_path_match_length_){0}
1224 , decltype(_impl_.is_host_only_){false}
1225 , decltype(_impl_.host_match_at_word_boundary_){false}
1226 , decltype(_impl_.has_non_scheme_www_match_){false}
1227 , decltype(_impl_.allowed_to_be_default_match_){false}
1228 , decltype(_impl_.total_query_or_ref_match_length_){0}
1229 , decltype(_impl_.total_title_match_length_){0}
1230 , decltype(_impl_.num_input_terms_matched_by_title_){0}
1231 , decltype(_impl_.num_input_terms_matched_by_url_){0}
1232 , decltype(_impl_.length_of_url_){0}
1233 , decltype(_impl_.site_engagement_){0}
1234 };
1235 }
1236
~OmniboxEventProto_Suggestion_ScoringSignals()1237 OmniboxEventProto_Suggestion_ScoringSignals::~OmniboxEventProto_Suggestion_ScoringSignals() {
1238 // @@protoc_insertion_point(destructor:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1239 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
1240 (void)arena;
1241 return;
1242 }
1243 SharedDtor();
1244 }
1245
SharedDtor()1246 inline void OmniboxEventProto_Suggestion_ScoringSignals::SharedDtor() {
1247 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
1248 }
1249
SetCachedSize(int size) const1250 void OmniboxEventProto_Suggestion_ScoringSignals::SetCachedSize(int size) const {
1251 _impl_._cached_size_.Set(size);
1252 }
1253
Clear()1254 void OmniboxEventProto_Suggestion_ScoringSignals::Clear() {
1255 // @@protoc_insertion_point(message_clear_start:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1256 uint32_t cached_has_bits = 0;
1257 // Prevent compiler warnings about cached_has_bits being unused
1258 (void) cached_has_bits;
1259
1260 cached_has_bits = _impl_._has_bits_[0];
1261 if (cached_has_bits & 0x000000ffu) {
1262 ::memset(&_impl_.typed_count_, 0, static_cast<size_t>(
1263 reinterpret_cast<char*>(&_impl_.first_bookmark_title_match_position_) -
1264 reinterpret_cast<char*>(&_impl_.typed_count_)) + sizeof(_impl_.first_bookmark_title_match_position_));
1265 }
1266 if (cached_has_bits & 0x0000ff00u) {
1267 ::memset(&_impl_.total_bookmark_title_match_length_, 0, static_cast<size_t>(
1268 reinterpret_cast<char*>(&_impl_.host_match_at_word_boundary_) -
1269 reinterpret_cast<char*>(&_impl_.total_bookmark_title_match_length_)) + sizeof(_impl_.host_match_at_word_boundary_));
1270 }
1271 if (cached_has_bits & 0x00ff0000u) {
1272 ::memset(&_impl_.has_non_scheme_www_match_, 0, static_cast<size_t>(
1273 reinterpret_cast<char*>(&_impl_.site_engagement_) -
1274 reinterpret_cast<char*>(&_impl_.has_non_scheme_www_match_)) + sizeof(_impl_.site_engagement_));
1275 }
1276 _impl_._has_bits_.Clear();
1277 _internal_metadata_.Clear<std::string>();
1278 }
1279
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)1280 const char* OmniboxEventProto_Suggestion_ScoringSignals::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
1281 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
1282 _Internal::HasBits has_bits{};
1283 while (!ctx->Done(&ptr)) {
1284 uint32_t tag;
1285 ptr = ::_pbi::ReadTag(ptr, &tag);
1286 switch (tag >> 3) {
1287 // optional int32 typed_count = 1;
1288 case 1:
1289 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
1290 _Internal::set_has_typed_count(&has_bits);
1291 _impl_.typed_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1292 CHK_(ptr);
1293 } else
1294 goto handle_unusual;
1295 continue;
1296 // optional int32 visit_count = 2;
1297 case 2:
1298 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
1299 _Internal::set_has_visit_count(&has_bits);
1300 _impl_.visit_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1301 CHK_(ptr);
1302 } else
1303 goto handle_unusual;
1304 continue;
1305 // optional int64 elapsed_time_last_visit_secs = 3;
1306 case 3:
1307 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
1308 _Internal::set_has_elapsed_time_last_visit_secs(&has_bits);
1309 _impl_.elapsed_time_last_visit_secs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1310 CHK_(ptr);
1311 } else
1312 goto handle_unusual;
1313 continue;
1314 // optional int32 shortcut_visit_count = 4;
1315 case 4:
1316 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
1317 _Internal::set_has_shortcut_visit_count(&has_bits);
1318 _impl_.shortcut_visit_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1319 CHK_(ptr);
1320 } else
1321 goto handle_unusual;
1322 continue;
1323 // optional int32 shortest_shortcut_len = 5;
1324 case 5:
1325 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
1326 _Internal::set_has_shortest_shortcut_len(&has_bits);
1327 _impl_.shortest_shortcut_len_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1328 CHK_(ptr);
1329 } else
1330 goto handle_unusual;
1331 continue;
1332 // optional int64 elapsed_time_last_shortcut_visit_sec = 6;
1333 case 6:
1334 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
1335 _Internal::set_has_elapsed_time_last_shortcut_visit_sec(&has_bits);
1336 _impl_.elapsed_time_last_shortcut_visit_sec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1337 CHK_(ptr);
1338 } else
1339 goto handle_unusual;
1340 continue;
1341 // optional bool is_host_only = 7;
1342 case 7:
1343 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
1344 _Internal::set_has_is_host_only(&has_bits);
1345 _impl_.is_host_only_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1346 CHK_(ptr);
1347 } else
1348 goto handle_unusual;
1349 continue;
1350 // optional int32 num_bookmarks_of_url = 8;
1351 case 8:
1352 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
1353 _Internal::set_has_num_bookmarks_of_url(&has_bits);
1354 _impl_.num_bookmarks_of_url_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1355 CHK_(ptr);
1356 } else
1357 goto handle_unusual;
1358 continue;
1359 // optional int32 first_bookmark_title_match_position = 9;
1360 case 9:
1361 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
1362 _Internal::set_has_first_bookmark_title_match_position(&has_bits);
1363 _impl_.first_bookmark_title_match_position_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1364 CHK_(ptr);
1365 } else
1366 goto handle_unusual;
1367 continue;
1368 // optional int32 total_bookmark_title_match_length = 10;
1369 case 10:
1370 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
1371 _Internal::set_has_total_bookmark_title_match_length(&has_bits);
1372 _impl_.total_bookmark_title_match_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1373 CHK_(ptr);
1374 } else
1375 goto handle_unusual;
1376 continue;
1377 // optional int32 num_input_terms_matched_by_bookmark_title = 11;
1378 case 11:
1379 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
1380 _Internal::set_has_num_input_terms_matched_by_bookmark_title(&has_bits);
1381 _impl_.num_input_terms_matched_by_bookmark_title_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1382 CHK_(ptr);
1383 } else
1384 goto handle_unusual;
1385 continue;
1386 // optional int32 first_url_match_position = 12;
1387 case 12:
1388 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
1389 _Internal::set_has_first_url_match_position(&has_bits);
1390 _impl_.first_url_match_position_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1391 CHK_(ptr);
1392 } else
1393 goto handle_unusual;
1394 continue;
1395 // optional int32 total_url_match_length = 13;
1396 case 13:
1397 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
1398 _Internal::set_has_total_url_match_length(&has_bits);
1399 _impl_.total_url_match_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1400 CHK_(ptr);
1401 } else
1402 goto handle_unusual;
1403 continue;
1404 // optional bool host_match_at_word_boundary = 14;
1405 case 14:
1406 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
1407 _Internal::set_has_host_match_at_word_boundary(&has_bits);
1408 _impl_.host_match_at_word_boundary_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1409 CHK_(ptr);
1410 } else
1411 goto handle_unusual;
1412 continue;
1413 // optional int32 total_host_match_length = 15;
1414 case 15:
1415 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
1416 _Internal::set_has_total_host_match_length(&has_bits);
1417 _impl_.total_host_match_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1418 CHK_(ptr);
1419 } else
1420 goto handle_unusual;
1421 continue;
1422 // optional int32 total_path_match_length = 16;
1423 case 16:
1424 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
1425 _Internal::set_has_total_path_match_length(&has_bits);
1426 _impl_.total_path_match_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1427 CHK_(ptr);
1428 } else
1429 goto handle_unusual;
1430 continue;
1431 // optional int32 total_query_or_ref_match_length = 17;
1432 case 17:
1433 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
1434 _Internal::set_has_total_query_or_ref_match_length(&has_bits);
1435 _impl_.total_query_or_ref_match_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1436 CHK_(ptr);
1437 } else
1438 goto handle_unusual;
1439 continue;
1440 // optional int32 total_title_match_length = 18;
1441 case 18:
1442 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
1443 _Internal::set_has_total_title_match_length(&has_bits);
1444 _impl_.total_title_match_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1445 CHK_(ptr);
1446 } else
1447 goto handle_unusual;
1448 continue;
1449 // optional bool has_non_scheme_www_match = 19;
1450 case 19:
1451 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
1452 _Internal::set_has_has_non_scheme_www_match(&has_bits);
1453 _impl_.has_non_scheme_www_match_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1454 CHK_(ptr);
1455 } else
1456 goto handle_unusual;
1457 continue;
1458 // optional int32 num_input_terms_matched_by_title = 20;
1459 case 20:
1460 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
1461 _Internal::set_has_num_input_terms_matched_by_title(&has_bits);
1462 _impl_.num_input_terms_matched_by_title_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1463 CHK_(ptr);
1464 } else
1465 goto handle_unusual;
1466 continue;
1467 // optional int32 num_input_terms_matched_by_url = 21;
1468 case 21:
1469 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
1470 _Internal::set_has_num_input_terms_matched_by_url(&has_bits);
1471 _impl_.num_input_terms_matched_by_url_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1472 CHK_(ptr);
1473 } else
1474 goto handle_unusual;
1475 continue;
1476 // optional int32 length_of_url = 22;
1477 case 22:
1478 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 176)) {
1479 _Internal::set_has_length_of_url(&has_bits);
1480 _impl_.length_of_url_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
1481 CHK_(ptr);
1482 } else
1483 goto handle_unusual;
1484 continue;
1485 // optional float site_engagement = 23;
1486 case 23:
1487 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 189)) {
1488 _Internal::set_has_site_engagement(&has_bits);
1489 _impl_.site_engagement_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
1490 ptr += sizeof(float);
1491 } else
1492 goto handle_unusual;
1493 continue;
1494 // optional bool allowed_to_be_default_match = 24;
1495 case 24:
1496 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 192)) {
1497 _Internal::set_has_allowed_to_be_default_match(&has_bits);
1498 _impl_.allowed_to_be_default_match_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
1499 CHK_(ptr);
1500 } else
1501 goto handle_unusual;
1502 continue;
1503 default:
1504 goto handle_unusual;
1505 } // switch
1506 handle_unusual:
1507 if ((tag == 0) || ((tag & 7) == 4)) {
1508 CHK_(ptr);
1509 ctx->SetLastTag(tag);
1510 goto message_done;
1511 }
1512 ptr = UnknownFieldParse(
1513 tag,
1514 _internal_metadata_.mutable_unknown_fields<std::string>(),
1515 ptr, ctx);
1516 CHK_(ptr != nullptr);
1517 } // while
1518 message_done:
1519 _impl_._has_bits_.Or(has_bits);
1520 return ptr;
1521 failure:
1522 ptr = nullptr;
1523 goto message_done;
1524 #undef CHK_
1525 }
1526
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const1527 uint8_t* OmniboxEventProto_Suggestion_ScoringSignals::_InternalSerialize(
1528 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
1529 // @@protoc_insertion_point(serialize_to_array_start:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1530 uint32_t cached_has_bits = 0;
1531 (void) cached_has_bits;
1532
1533 cached_has_bits = _impl_._has_bits_[0];
1534 // optional int32 typed_count = 1;
1535 if (cached_has_bits & 0x00000001u) {
1536 target = stream->EnsureSpace(target);
1537 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_typed_count(), target);
1538 }
1539
1540 // optional int32 visit_count = 2;
1541 if (cached_has_bits & 0x00000002u) {
1542 target = stream->EnsureSpace(target);
1543 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_visit_count(), target);
1544 }
1545
1546 // optional int64 elapsed_time_last_visit_secs = 3;
1547 if (cached_has_bits & 0x00000004u) {
1548 target = stream->EnsureSpace(target);
1549 target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_elapsed_time_last_visit_secs(), target);
1550 }
1551
1552 // optional int32 shortcut_visit_count = 4;
1553 if (cached_has_bits & 0x00000008u) {
1554 target = stream->EnsureSpace(target);
1555 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_shortcut_visit_count(), target);
1556 }
1557
1558 // optional int32 shortest_shortcut_len = 5;
1559 if (cached_has_bits & 0x00000010u) {
1560 target = stream->EnsureSpace(target);
1561 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_shortest_shortcut_len(), target);
1562 }
1563
1564 // optional int64 elapsed_time_last_shortcut_visit_sec = 6;
1565 if (cached_has_bits & 0x00000020u) {
1566 target = stream->EnsureSpace(target);
1567 target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_elapsed_time_last_shortcut_visit_sec(), target);
1568 }
1569
1570 // optional bool is_host_only = 7;
1571 if (cached_has_bits & 0x00004000u) {
1572 target = stream->EnsureSpace(target);
1573 target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_is_host_only(), target);
1574 }
1575
1576 // optional int32 num_bookmarks_of_url = 8;
1577 if (cached_has_bits & 0x00000040u) {
1578 target = stream->EnsureSpace(target);
1579 target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_num_bookmarks_of_url(), target);
1580 }
1581
1582 // optional int32 first_bookmark_title_match_position = 9;
1583 if (cached_has_bits & 0x00000080u) {
1584 target = stream->EnsureSpace(target);
1585 target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_first_bookmark_title_match_position(), target);
1586 }
1587
1588 // optional int32 total_bookmark_title_match_length = 10;
1589 if (cached_has_bits & 0x00000100u) {
1590 target = stream->EnsureSpace(target);
1591 target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_total_bookmark_title_match_length(), target);
1592 }
1593
1594 // optional int32 num_input_terms_matched_by_bookmark_title = 11;
1595 if (cached_has_bits & 0x00000200u) {
1596 target = stream->EnsureSpace(target);
1597 target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_num_input_terms_matched_by_bookmark_title(), target);
1598 }
1599
1600 // optional int32 first_url_match_position = 12;
1601 if (cached_has_bits & 0x00000400u) {
1602 target = stream->EnsureSpace(target);
1603 target = ::_pbi::WireFormatLite::WriteInt32ToArray(12, this->_internal_first_url_match_position(), target);
1604 }
1605
1606 // optional int32 total_url_match_length = 13;
1607 if (cached_has_bits & 0x00000800u) {
1608 target = stream->EnsureSpace(target);
1609 target = ::_pbi::WireFormatLite::WriteInt32ToArray(13, this->_internal_total_url_match_length(), target);
1610 }
1611
1612 // optional bool host_match_at_word_boundary = 14;
1613 if (cached_has_bits & 0x00008000u) {
1614 target = stream->EnsureSpace(target);
1615 target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_host_match_at_word_boundary(), target);
1616 }
1617
1618 // optional int32 total_host_match_length = 15;
1619 if (cached_has_bits & 0x00001000u) {
1620 target = stream->EnsureSpace(target);
1621 target = ::_pbi::WireFormatLite::WriteInt32ToArray(15, this->_internal_total_host_match_length(), target);
1622 }
1623
1624 // optional int32 total_path_match_length = 16;
1625 if (cached_has_bits & 0x00002000u) {
1626 target = stream->EnsureSpace(target);
1627 target = ::_pbi::WireFormatLite::WriteInt32ToArray(16, this->_internal_total_path_match_length(), target);
1628 }
1629
1630 // optional int32 total_query_or_ref_match_length = 17;
1631 if (cached_has_bits & 0x00040000u) {
1632 target = stream->EnsureSpace(target);
1633 target = ::_pbi::WireFormatLite::WriteInt32ToArray(17, this->_internal_total_query_or_ref_match_length(), target);
1634 }
1635
1636 // optional int32 total_title_match_length = 18;
1637 if (cached_has_bits & 0x00080000u) {
1638 target = stream->EnsureSpace(target);
1639 target = ::_pbi::WireFormatLite::WriteInt32ToArray(18, this->_internal_total_title_match_length(), target);
1640 }
1641
1642 // optional bool has_non_scheme_www_match = 19;
1643 if (cached_has_bits & 0x00010000u) {
1644 target = stream->EnsureSpace(target);
1645 target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_has_non_scheme_www_match(), target);
1646 }
1647
1648 // optional int32 num_input_terms_matched_by_title = 20;
1649 if (cached_has_bits & 0x00100000u) {
1650 target = stream->EnsureSpace(target);
1651 target = ::_pbi::WireFormatLite::WriteInt32ToArray(20, this->_internal_num_input_terms_matched_by_title(), target);
1652 }
1653
1654 // optional int32 num_input_terms_matched_by_url = 21;
1655 if (cached_has_bits & 0x00200000u) {
1656 target = stream->EnsureSpace(target);
1657 target = ::_pbi::WireFormatLite::WriteInt32ToArray(21, this->_internal_num_input_terms_matched_by_url(), target);
1658 }
1659
1660 // optional int32 length_of_url = 22;
1661 if (cached_has_bits & 0x00400000u) {
1662 target = stream->EnsureSpace(target);
1663 target = ::_pbi::WireFormatLite::WriteInt32ToArray(22, this->_internal_length_of_url(), target);
1664 }
1665
1666 // optional float site_engagement = 23;
1667 if (cached_has_bits & 0x00800000u) {
1668 target = stream->EnsureSpace(target);
1669 target = ::_pbi::WireFormatLite::WriteFloatToArray(23, this->_internal_site_engagement(), target);
1670 }
1671
1672 // optional bool allowed_to_be_default_match = 24;
1673 if (cached_has_bits & 0x00020000u) {
1674 target = stream->EnsureSpace(target);
1675 target = ::_pbi::WireFormatLite::WriteBoolToArray(24, this->_internal_allowed_to_be_default_match(), target);
1676 }
1677
1678 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1679 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
1680 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
1681 }
1682 // @@protoc_insertion_point(serialize_to_array_end:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1683 return target;
1684 }
1685
ByteSizeLong() const1686 size_t OmniboxEventProto_Suggestion_ScoringSignals::ByteSizeLong() const {
1687 // @@protoc_insertion_point(message_byte_size_start:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1688 size_t total_size = 0;
1689
1690 uint32_t cached_has_bits = 0;
1691 // Prevent compiler warnings about cached_has_bits being unused
1692 (void) cached_has_bits;
1693
1694 cached_has_bits = _impl_._has_bits_[0];
1695 if (cached_has_bits & 0x000000ffu) {
1696 // optional int32 typed_count = 1;
1697 if (cached_has_bits & 0x00000001u) {
1698 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_typed_count());
1699 }
1700
1701 // optional int32 visit_count = 2;
1702 if (cached_has_bits & 0x00000002u) {
1703 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_visit_count());
1704 }
1705
1706 // optional int64 elapsed_time_last_visit_secs = 3;
1707 if (cached_has_bits & 0x00000004u) {
1708 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_elapsed_time_last_visit_secs());
1709 }
1710
1711 // optional int32 shortcut_visit_count = 4;
1712 if (cached_has_bits & 0x00000008u) {
1713 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_shortcut_visit_count());
1714 }
1715
1716 // optional int32 shortest_shortcut_len = 5;
1717 if (cached_has_bits & 0x00000010u) {
1718 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_shortest_shortcut_len());
1719 }
1720
1721 // optional int64 elapsed_time_last_shortcut_visit_sec = 6;
1722 if (cached_has_bits & 0x00000020u) {
1723 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_elapsed_time_last_shortcut_visit_sec());
1724 }
1725
1726 // optional int32 num_bookmarks_of_url = 8;
1727 if (cached_has_bits & 0x00000040u) {
1728 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_bookmarks_of_url());
1729 }
1730
1731 // optional int32 first_bookmark_title_match_position = 9;
1732 if (cached_has_bits & 0x00000080u) {
1733 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_first_bookmark_title_match_position());
1734 }
1735
1736 }
1737 if (cached_has_bits & 0x0000ff00u) {
1738 // optional int32 total_bookmark_title_match_length = 10;
1739 if (cached_has_bits & 0x00000100u) {
1740 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_bookmark_title_match_length());
1741 }
1742
1743 // optional int32 num_input_terms_matched_by_bookmark_title = 11;
1744 if (cached_has_bits & 0x00000200u) {
1745 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_input_terms_matched_by_bookmark_title());
1746 }
1747
1748 // optional int32 first_url_match_position = 12;
1749 if (cached_has_bits & 0x00000400u) {
1750 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_first_url_match_position());
1751 }
1752
1753 // optional int32 total_url_match_length = 13;
1754 if (cached_has_bits & 0x00000800u) {
1755 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_url_match_length());
1756 }
1757
1758 // optional int32 total_host_match_length = 15;
1759 if (cached_has_bits & 0x00001000u) {
1760 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_host_match_length());
1761 }
1762
1763 // optional int32 total_path_match_length = 16;
1764 if (cached_has_bits & 0x00002000u) {
1765 total_size += 2 +
1766 ::_pbi::WireFormatLite::Int32Size(
1767 this->_internal_total_path_match_length());
1768 }
1769
1770 // optional bool is_host_only = 7;
1771 if (cached_has_bits & 0x00004000u) {
1772 total_size += 1 + 1;
1773 }
1774
1775 // optional bool host_match_at_word_boundary = 14;
1776 if (cached_has_bits & 0x00008000u) {
1777 total_size += 1 + 1;
1778 }
1779
1780 }
1781 if (cached_has_bits & 0x00ff0000u) {
1782 // optional bool has_non_scheme_www_match = 19;
1783 if (cached_has_bits & 0x00010000u) {
1784 total_size += 2 + 1;
1785 }
1786
1787 // optional bool allowed_to_be_default_match = 24;
1788 if (cached_has_bits & 0x00020000u) {
1789 total_size += 2 + 1;
1790 }
1791
1792 // optional int32 total_query_or_ref_match_length = 17;
1793 if (cached_has_bits & 0x00040000u) {
1794 total_size += 2 +
1795 ::_pbi::WireFormatLite::Int32Size(
1796 this->_internal_total_query_or_ref_match_length());
1797 }
1798
1799 // optional int32 total_title_match_length = 18;
1800 if (cached_has_bits & 0x00080000u) {
1801 total_size += 2 +
1802 ::_pbi::WireFormatLite::Int32Size(
1803 this->_internal_total_title_match_length());
1804 }
1805
1806 // optional int32 num_input_terms_matched_by_title = 20;
1807 if (cached_has_bits & 0x00100000u) {
1808 total_size += 2 +
1809 ::_pbi::WireFormatLite::Int32Size(
1810 this->_internal_num_input_terms_matched_by_title());
1811 }
1812
1813 // optional int32 num_input_terms_matched_by_url = 21;
1814 if (cached_has_bits & 0x00200000u) {
1815 total_size += 2 +
1816 ::_pbi::WireFormatLite::Int32Size(
1817 this->_internal_num_input_terms_matched_by_url());
1818 }
1819
1820 // optional int32 length_of_url = 22;
1821 if (cached_has_bits & 0x00400000u) {
1822 total_size += 2 +
1823 ::_pbi::WireFormatLite::Int32Size(
1824 this->_internal_length_of_url());
1825 }
1826
1827 // optional float site_engagement = 23;
1828 if (cached_has_bits & 0x00800000u) {
1829 total_size += 2 + 4;
1830 }
1831
1832 }
1833 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
1834 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
1835 }
1836 int cached_size = ::_pbi::ToCachedSize(total_size);
1837 SetCachedSize(cached_size);
1838 return total_size;
1839 }
1840
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)1841 void OmniboxEventProto_Suggestion_ScoringSignals::CheckTypeAndMergeFrom(
1842 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
1843 MergeFrom(*::_pbi::DownCast<const OmniboxEventProto_Suggestion_ScoringSignals*>(
1844 &from));
1845 }
1846
MergeFrom(const OmniboxEventProto_Suggestion_ScoringSignals & from)1847 void OmniboxEventProto_Suggestion_ScoringSignals::MergeFrom(const OmniboxEventProto_Suggestion_ScoringSignals& from) {
1848 OmniboxEventProto_Suggestion_ScoringSignals* const _this = this;
1849 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1850 GOOGLE_DCHECK_NE(&from, _this);
1851 uint32_t cached_has_bits = 0;
1852 (void) cached_has_bits;
1853
1854 cached_has_bits = from._impl_._has_bits_[0];
1855 if (cached_has_bits & 0x000000ffu) {
1856 if (cached_has_bits & 0x00000001u) {
1857 _this->_impl_.typed_count_ = from._impl_.typed_count_;
1858 }
1859 if (cached_has_bits & 0x00000002u) {
1860 _this->_impl_.visit_count_ = from._impl_.visit_count_;
1861 }
1862 if (cached_has_bits & 0x00000004u) {
1863 _this->_impl_.elapsed_time_last_visit_secs_ = from._impl_.elapsed_time_last_visit_secs_;
1864 }
1865 if (cached_has_bits & 0x00000008u) {
1866 _this->_impl_.shortcut_visit_count_ = from._impl_.shortcut_visit_count_;
1867 }
1868 if (cached_has_bits & 0x00000010u) {
1869 _this->_impl_.shortest_shortcut_len_ = from._impl_.shortest_shortcut_len_;
1870 }
1871 if (cached_has_bits & 0x00000020u) {
1872 _this->_impl_.elapsed_time_last_shortcut_visit_sec_ = from._impl_.elapsed_time_last_shortcut_visit_sec_;
1873 }
1874 if (cached_has_bits & 0x00000040u) {
1875 _this->_impl_.num_bookmarks_of_url_ = from._impl_.num_bookmarks_of_url_;
1876 }
1877 if (cached_has_bits & 0x00000080u) {
1878 _this->_impl_.first_bookmark_title_match_position_ = from._impl_.first_bookmark_title_match_position_;
1879 }
1880 _this->_impl_._has_bits_[0] |= cached_has_bits;
1881 }
1882 if (cached_has_bits & 0x0000ff00u) {
1883 if (cached_has_bits & 0x00000100u) {
1884 _this->_impl_.total_bookmark_title_match_length_ = from._impl_.total_bookmark_title_match_length_;
1885 }
1886 if (cached_has_bits & 0x00000200u) {
1887 _this->_impl_.num_input_terms_matched_by_bookmark_title_ = from._impl_.num_input_terms_matched_by_bookmark_title_;
1888 }
1889 if (cached_has_bits & 0x00000400u) {
1890 _this->_impl_.first_url_match_position_ = from._impl_.first_url_match_position_;
1891 }
1892 if (cached_has_bits & 0x00000800u) {
1893 _this->_impl_.total_url_match_length_ = from._impl_.total_url_match_length_;
1894 }
1895 if (cached_has_bits & 0x00001000u) {
1896 _this->_impl_.total_host_match_length_ = from._impl_.total_host_match_length_;
1897 }
1898 if (cached_has_bits & 0x00002000u) {
1899 _this->_impl_.total_path_match_length_ = from._impl_.total_path_match_length_;
1900 }
1901 if (cached_has_bits & 0x00004000u) {
1902 _this->_impl_.is_host_only_ = from._impl_.is_host_only_;
1903 }
1904 if (cached_has_bits & 0x00008000u) {
1905 _this->_impl_.host_match_at_word_boundary_ = from._impl_.host_match_at_word_boundary_;
1906 }
1907 _this->_impl_._has_bits_[0] |= cached_has_bits;
1908 }
1909 if (cached_has_bits & 0x00ff0000u) {
1910 if (cached_has_bits & 0x00010000u) {
1911 _this->_impl_.has_non_scheme_www_match_ = from._impl_.has_non_scheme_www_match_;
1912 }
1913 if (cached_has_bits & 0x00020000u) {
1914 _this->_impl_.allowed_to_be_default_match_ = from._impl_.allowed_to_be_default_match_;
1915 }
1916 if (cached_has_bits & 0x00040000u) {
1917 _this->_impl_.total_query_or_ref_match_length_ = from._impl_.total_query_or_ref_match_length_;
1918 }
1919 if (cached_has_bits & 0x00080000u) {
1920 _this->_impl_.total_title_match_length_ = from._impl_.total_title_match_length_;
1921 }
1922 if (cached_has_bits & 0x00100000u) {
1923 _this->_impl_.num_input_terms_matched_by_title_ = from._impl_.num_input_terms_matched_by_title_;
1924 }
1925 if (cached_has_bits & 0x00200000u) {
1926 _this->_impl_.num_input_terms_matched_by_url_ = from._impl_.num_input_terms_matched_by_url_;
1927 }
1928 if (cached_has_bits & 0x00400000u) {
1929 _this->_impl_.length_of_url_ = from._impl_.length_of_url_;
1930 }
1931 if (cached_has_bits & 0x00800000u) {
1932 _this->_impl_.site_engagement_ = from._impl_.site_engagement_;
1933 }
1934 _this->_impl_._has_bits_[0] |= cached_has_bits;
1935 }
1936 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
1937 }
1938
CopyFrom(const OmniboxEventProto_Suggestion_ScoringSignals & from)1939 void OmniboxEventProto_Suggestion_ScoringSignals::CopyFrom(const OmniboxEventProto_Suggestion_ScoringSignals& from) {
1940 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.OmniboxEventProto.Suggestion.ScoringSignals)
1941 if (&from == this) return;
1942 Clear();
1943 MergeFrom(from);
1944 }
1945
IsInitialized() const1946 bool OmniboxEventProto_Suggestion_ScoringSignals::IsInitialized() const {
1947 return true;
1948 }
1949
InternalSwap(OmniboxEventProto_Suggestion_ScoringSignals * other)1950 void OmniboxEventProto_Suggestion_ScoringSignals::InternalSwap(OmniboxEventProto_Suggestion_ScoringSignals* other) {
1951 using std::swap;
1952 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
1953 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
1954 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
1955 PROTOBUF_FIELD_OFFSET(OmniboxEventProto_Suggestion_ScoringSignals, _impl_.site_engagement_)
1956 + sizeof(OmniboxEventProto_Suggestion_ScoringSignals::_impl_.site_engagement_)
1957 - PROTOBUF_FIELD_OFFSET(OmniboxEventProto_Suggestion_ScoringSignals, _impl_.typed_count_)>(
1958 reinterpret_cast<char*>(&_impl_.typed_count_),
1959 reinterpret_cast<char*>(&other->_impl_.typed_count_));
1960 }
1961
GetTypeName() const1962 std::string OmniboxEventProto_Suggestion_ScoringSignals::GetTypeName() const {
1963 return "metrics.OmniboxEventProto.Suggestion.ScoringSignals";
1964 }
1965
1966
1967 // ===================================================================
1968
1969 class OmniboxEventProto_Suggestion::_Internal {
1970 public:
1971 using HasBits = decltype(std::declval<OmniboxEventProto_Suggestion>()._impl_._has_bits_);
set_has_provider(HasBits * has_bits)1972 static void set_has_provider(HasBits* has_bits) {
1973 (*has_bits)[0] |= 2u;
1974 }
set_has_result_type(HasBits * has_bits)1975 static void set_has_result_type(HasBits* has_bits) {
1976 (*has_bits)[0] |= 4u;
1977 }
set_has_relevance(HasBits * has_bits)1978 static void set_has_relevance(HasBits* has_bits) {
1979 (*has_bits)[0] |= 8u;
1980 }
set_has_typed_count(HasBits * has_bits)1981 static void set_has_typed_count(HasBits* has_bits) {
1982 (*has_bits)[0] |= 16u;
1983 }
set_has_is_starred(HasBits * has_bits)1984 static void set_has_is_starred(HasBits* has_bits) {
1985 (*has_bits)[0] |= 32u;
1986 }
set_has_is_disabled(HasBits * has_bits)1987 static void set_has_is_disabled(HasBits* has_bits) {
1988 (*has_bits)[0] |= 64u;
1989 }
set_has_result_subtype_identifier(HasBits * has_bits)1990 static void set_has_result_subtype_identifier(HasBits* has_bits) {
1991 (*has_bits)[0] |= 512u;
1992 }
set_has_has_tab_match(HasBits * has_bits)1993 static void set_has_has_tab_match(HasBits* has_bits) {
1994 (*has_bits)[0] |= 128u;
1995 }
set_has_is_keyword_suggestion(HasBits * has_bits)1996 static void set_has_is_keyword_suggestion(HasBits* has_bits) {
1997 (*has_bits)[0] |= 256u;
1998 }
1999 static const ::metrics::OmniboxEventProto_Suggestion_ScoringSignals& scoring_signals(const OmniboxEventProto_Suggestion* msg);
set_has_scoring_signals(HasBits * has_bits)2000 static void set_has_scoring_signals(HasBits* has_bits) {
2001 (*has_bits)[0] |= 1u;
2002 }
2003 };
2004
2005 const ::metrics::OmniboxEventProto_Suggestion_ScoringSignals&
scoring_signals(const OmniboxEventProto_Suggestion * msg)2006 OmniboxEventProto_Suggestion::_Internal::scoring_signals(const OmniboxEventProto_Suggestion* msg) {
2007 return *msg->_impl_.scoring_signals_;
2008 }
OmniboxEventProto_Suggestion(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2009 OmniboxEventProto_Suggestion::OmniboxEventProto_Suggestion(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2010 bool is_message_owned)
2011 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2012 SharedCtor(arena, is_message_owned);
2013 // @@protoc_insertion_point(arena_constructor:metrics.OmniboxEventProto.Suggestion)
2014 }
OmniboxEventProto_Suggestion(const OmniboxEventProto_Suggestion & from)2015 OmniboxEventProto_Suggestion::OmniboxEventProto_Suggestion(const OmniboxEventProto_Suggestion& from)
2016 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2017 OmniboxEventProto_Suggestion* const _this = this; (void)_this;
2018 new (&_impl_) Impl_{
2019 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2020 , /*decltype(_impl_._cached_size_)*/{}
2021 , decltype(_impl_.scoring_signals_){nullptr}
2022 , decltype(_impl_.provider_){}
2023 , decltype(_impl_.result_type_){}
2024 , decltype(_impl_.relevance_){}
2025 , decltype(_impl_.typed_count_){}
2026 , decltype(_impl_.is_starred_){}
2027 , decltype(_impl_.is_disabled_){}
2028 , decltype(_impl_.has_tab_match_){}
2029 , decltype(_impl_.is_keyword_suggestion_){}
2030 , decltype(_impl_.result_subtype_identifier_){}};
2031
2032 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2033 if (from._internal_has_scoring_signals()) {
2034 _this->_impl_.scoring_signals_ = new ::metrics::OmniboxEventProto_Suggestion_ScoringSignals(*from._impl_.scoring_signals_);
2035 }
2036 ::memcpy(&_impl_.provider_, &from._impl_.provider_,
2037 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.result_subtype_identifier_) -
2038 reinterpret_cast<char*>(&_impl_.provider_)) + sizeof(_impl_.result_subtype_identifier_));
2039 // @@protoc_insertion_point(copy_constructor:metrics.OmniboxEventProto.Suggestion)
2040 }
2041
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2042 inline void OmniboxEventProto_Suggestion::SharedCtor(
2043 ::_pb::Arena* arena, bool is_message_owned) {
2044 (void)arena;
2045 (void)is_message_owned;
2046 new (&_impl_) Impl_{
2047 decltype(_impl_._has_bits_){}
2048 , /*decltype(_impl_._cached_size_)*/{}
2049 , decltype(_impl_.scoring_signals_){nullptr}
2050 , decltype(_impl_.provider_){0}
2051 , decltype(_impl_.result_type_){0}
2052 , decltype(_impl_.relevance_){0}
2053 , decltype(_impl_.typed_count_){0}
2054 , decltype(_impl_.is_starred_){false}
2055 , decltype(_impl_.is_disabled_){false}
2056 , decltype(_impl_.has_tab_match_){false}
2057 , decltype(_impl_.is_keyword_suggestion_){false}
2058 , decltype(_impl_.result_subtype_identifier_){0}
2059 };
2060 }
2061
~OmniboxEventProto_Suggestion()2062 OmniboxEventProto_Suggestion::~OmniboxEventProto_Suggestion() {
2063 // @@protoc_insertion_point(destructor:metrics.OmniboxEventProto.Suggestion)
2064 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2065 (void)arena;
2066 return;
2067 }
2068 SharedDtor();
2069 }
2070
SharedDtor()2071 inline void OmniboxEventProto_Suggestion::SharedDtor() {
2072 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2073 if (this != internal_default_instance()) delete _impl_.scoring_signals_;
2074 }
2075
SetCachedSize(int size) const2076 void OmniboxEventProto_Suggestion::SetCachedSize(int size) const {
2077 _impl_._cached_size_.Set(size);
2078 }
2079
Clear()2080 void OmniboxEventProto_Suggestion::Clear() {
2081 // @@protoc_insertion_point(message_clear_start:metrics.OmniboxEventProto.Suggestion)
2082 uint32_t cached_has_bits = 0;
2083 // Prevent compiler warnings about cached_has_bits being unused
2084 (void) cached_has_bits;
2085
2086 cached_has_bits = _impl_._has_bits_[0];
2087 if (cached_has_bits & 0x00000001u) {
2088 GOOGLE_DCHECK(_impl_.scoring_signals_ != nullptr);
2089 _impl_.scoring_signals_->Clear();
2090 }
2091 if (cached_has_bits & 0x000000feu) {
2092 ::memset(&_impl_.provider_, 0, static_cast<size_t>(
2093 reinterpret_cast<char*>(&_impl_.has_tab_match_) -
2094 reinterpret_cast<char*>(&_impl_.provider_)) + sizeof(_impl_.has_tab_match_));
2095 }
2096 if (cached_has_bits & 0x00000300u) {
2097 ::memset(&_impl_.is_keyword_suggestion_, 0, static_cast<size_t>(
2098 reinterpret_cast<char*>(&_impl_.result_subtype_identifier_) -
2099 reinterpret_cast<char*>(&_impl_.is_keyword_suggestion_)) + sizeof(_impl_.result_subtype_identifier_));
2100 }
2101 _impl_._has_bits_.Clear();
2102 _internal_metadata_.Clear<std::string>();
2103 }
2104
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2105 const char* OmniboxEventProto_Suggestion::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2106 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2107 _Internal::HasBits has_bits{};
2108 while (!ctx->Done(&ptr)) {
2109 uint32_t tag;
2110 ptr = ::_pbi::ReadTag(ptr, &tag);
2111 switch (tag >> 3) {
2112 // optional .metrics.OmniboxEventProto.ProviderType provider = 1;
2113 case 1:
2114 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
2115 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2116 CHK_(ptr);
2117 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_ProviderType_IsValid(val))) {
2118 _internal_set_provider(static_cast<::metrics::OmniboxEventProto_ProviderType>(val));
2119 } else {
2120 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
2121 }
2122 } else
2123 goto handle_unusual;
2124 continue;
2125 // optional .metrics.OmniboxEventProto.Suggestion.ResultType result_type = 2;
2126 case 2:
2127 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
2128 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2129 CHK_(ptr);
2130 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_Suggestion_ResultType_IsValid(val))) {
2131 _internal_set_result_type(static_cast<::metrics::OmniboxEventProto_Suggestion_ResultType>(val));
2132 } else {
2133 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields());
2134 }
2135 } else
2136 goto handle_unusual;
2137 continue;
2138 // optional int32 relevance = 3;
2139 case 3:
2140 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
2141 _Internal::set_has_relevance(&has_bits);
2142 _impl_.relevance_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2143 CHK_(ptr);
2144 } else
2145 goto handle_unusual;
2146 continue;
2147 // optional bool is_starred = 4 [deprecated = true];
2148 case 4:
2149 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
2150 _Internal::set_has_is_starred(&has_bits);
2151 _impl_.is_starred_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2152 CHK_(ptr);
2153 } else
2154 goto handle_unusual;
2155 continue;
2156 // optional int32 typed_count = 5;
2157 case 5:
2158 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
2159 _Internal::set_has_typed_count(&has_bits);
2160 _impl_.typed_count_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2161 CHK_(ptr);
2162 } else
2163 goto handle_unusual;
2164 continue;
2165 // optional bool is_disabled = 6;
2166 case 6:
2167 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
2168 _Internal::set_has_is_disabled(&has_bits);
2169 _impl_.is_disabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2170 CHK_(ptr);
2171 } else
2172 goto handle_unusual;
2173 continue;
2174 // optional int32 result_subtype_identifier = 7;
2175 case 7:
2176 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
2177 _Internal::set_has_result_subtype_identifier(&has_bits);
2178 _impl_.result_subtype_identifier_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2179 CHK_(ptr);
2180 } else
2181 goto handle_unusual;
2182 continue;
2183 // optional bool has_tab_match = 8;
2184 case 8:
2185 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
2186 _Internal::set_has_has_tab_match(&has_bits);
2187 _impl_.has_tab_match_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2188 CHK_(ptr);
2189 } else
2190 goto handle_unusual;
2191 continue;
2192 // optional bool is_keyword_suggestion = 9;
2193 case 9:
2194 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
2195 _Internal::set_has_is_keyword_suggestion(&has_bits);
2196 _impl_.is_keyword_suggestion_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2197 CHK_(ptr);
2198 } else
2199 goto handle_unusual;
2200 continue;
2201 // optional .metrics.OmniboxEventProto.Suggestion.ScoringSignals scoring_signals = 10;
2202 case 10:
2203 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
2204 ptr = ctx->ParseMessage(_internal_mutable_scoring_signals(), ptr);
2205 CHK_(ptr);
2206 } else
2207 goto handle_unusual;
2208 continue;
2209 default:
2210 goto handle_unusual;
2211 } // switch
2212 handle_unusual:
2213 if ((tag == 0) || ((tag & 7) == 4)) {
2214 CHK_(ptr);
2215 ctx->SetLastTag(tag);
2216 goto message_done;
2217 }
2218 ptr = UnknownFieldParse(
2219 tag,
2220 _internal_metadata_.mutable_unknown_fields<std::string>(),
2221 ptr, ctx);
2222 CHK_(ptr != nullptr);
2223 } // while
2224 message_done:
2225 _impl_._has_bits_.Or(has_bits);
2226 return ptr;
2227 failure:
2228 ptr = nullptr;
2229 goto message_done;
2230 #undef CHK_
2231 }
2232
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2233 uint8_t* OmniboxEventProto_Suggestion::_InternalSerialize(
2234 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2235 // @@protoc_insertion_point(serialize_to_array_start:metrics.OmniboxEventProto.Suggestion)
2236 uint32_t cached_has_bits = 0;
2237 (void) cached_has_bits;
2238
2239 cached_has_bits = _impl_._has_bits_[0];
2240 // optional .metrics.OmniboxEventProto.ProviderType provider = 1;
2241 if (cached_has_bits & 0x00000002u) {
2242 target = stream->EnsureSpace(target);
2243 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2244 1, this->_internal_provider(), target);
2245 }
2246
2247 // optional .metrics.OmniboxEventProto.Suggestion.ResultType result_type = 2;
2248 if (cached_has_bits & 0x00000004u) {
2249 target = stream->EnsureSpace(target);
2250 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2251 2, this->_internal_result_type(), target);
2252 }
2253
2254 // optional int32 relevance = 3;
2255 if (cached_has_bits & 0x00000008u) {
2256 target = stream->EnsureSpace(target);
2257 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_relevance(), target);
2258 }
2259
2260 // optional bool is_starred = 4 [deprecated = true];
2261 if (cached_has_bits & 0x00000020u) {
2262 target = stream->EnsureSpace(target);
2263 target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_is_starred(), target);
2264 }
2265
2266 // optional int32 typed_count = 5;
2267 if (cached_has_bits & 0x00000010u) {
2268 target = stream->EnsureSpace(target);
2269 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_typed_count(), target);
2270 }
2271
2272 // optional bool is_disabled = 6;
2273 if (cached_has_bits & 0x00000040u) {
2274 target = stream->EnsureSpace(target);
2275 target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_is_disabled(), target);
2276 }
2277
2278 // optional int32 result_subtype_identifier = 7;
2279 if (cached_has_bits & 0x00000200u) {
2280 target = stream->EnsureSpace(target);
2281 target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_result_subtype_identifier(), target);
2282 }
2283
2284 // optional bool has_tab_match = 8;
2285 if (cached_has_bits & 0x00000080u) {
2286 target = stream->EnsureSpace(target);
2287 target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_has_tab_match(), target);
2288 }
2289
2290 // optional bool is_keyword_suggestion = 9;
2291 if (cached_has_bits & 0x00000100u) {
2292 target = stream->EnsureSpace(target);
2293 target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_is_keyword_suggestion(), target);
2294 }
2295
2296 // optional .metrics.OmniboxEventProto.Suggestion.ScoringSignals scoring_signals = 10;
2297 if (cached_has_bits & 0x00000001u) {
2298 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
2299 InternalWriteMessage(10, _Internal::scoring_signals(this),
2300 _Internal::scoring_signals(this).GetCachedSize(), target, stream);
2301 }
2302
2303 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2304 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2305 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2306 }
2307 // @@protoc_insertion_point(serialize_to_array_end:metrics.OmniboxEventProto.Suggestion)
2308 return target;
2309 }
2310
ByteSizeLong() const2311 size_t OmniboxEventProto_Suggestion::ByteSizeLong() const {
2312 // @@protoc_insertion_point(message_byte_size_start:metrics.OmniboxEventProto.Suggestion)
2313 size_t total_size = 0;
2314
2315 uint32_t cached_has_bits = 0;
2316 // Prevent compiler warnings about cached_has_bits being unused
2317 (void) cached_has_bits;
2318
2319 cached_has_bits = _impl_._has_bits_[0];
2320 if (cached_has_bits & 0x000000ffu) {
2321 // optional .metrics.OmniboxEventProto.Suggestion.ScoringSignals scoring_signals = 10;
2322 if (cached_has_bits & 0x00000001u) {
2323 total_size += 1 +
2324 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
2325 *_impl_.scoring_signals_);
2326 }
2327
2328 // optional .metrics.OmniboxEventProto.ProviderType provider = 1;
2329 if (cached_has_bits & 0x00000002u) {
2330 total_size += 1 +
2331 ::_pbi::WireFormatLite::EnumSize(this->_internal_provider());
2332 }
2333
2334 // optional .metrics.OmniboxEventProto.Suggestion.ResultType result_type = 2;
2335 if (cached_has_bits & 0x00000004u) {
2336 total_size += 1 +
2337 ::_pbi::WireFormatLite::EnumSize(this->_internal_result_type());
2338 }
2339
2340 // optional int32 relevance = 3;
2341 if (cached_has_bits & 0x00000008u) {
2342 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_relevance());
2343 }
2344
2345 // optional int32 typed_count = 5;
2346 if (cached_has_bits & 0x00000010u) {
2347 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_typed_count());
2348 }
2349
2350 // optional bool is_starred = 4 [deprecated = true];
2351 if (cached_has_bits & 0x00000020u) {
2352 total_size += 1 + 1;
2353 }
2354
2355 // optional bool is_disabled = 6;
2356 if (cached_has_bits & 0x00000040u) {
2357 total_size += 1 + 1;
2358 }
2359
2360 // optional bool has_tab_match = 8;
2361 if (cached_has_bits & 0x00000080u) {
2362 total_size += 1 + 1;
2363 }
2364
2365 }
2366 if (cached_has_bits & 0x00000300u) {
2367 // optional bool is_keyword_suggestion = 9;
2368 if (cached_has_bits & 0x00000100u) {
2369 total_size += 1 + 1;
2370 }
2371
2372 // optional int32 result_subtype_identifier = 7;
2373 if (cached_has_bits & 0x00000200u) {
2374 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_result_subtype_identifier());
2375 }
2376
2377 }
2378 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2379 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2380 }
2381 int cached_size = ::_pbi::ToCachedSize(total_size);
2382 SetCachedSize(cached_size);
2383 return total_size;
2384 }
2385
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2386 void OmniboxEventProto_Suggestion::CheckTypeAndMergeFrom(
2387 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2388 MergeFrom(*::_pbi::DownCast<const OmniboxEventProto_Suggestion*>(
2389 &from));
2390 }
2391
MergeFrom(const OmniboxEventProto_Suggestion & from)2392 void OmniboxEventProto_Suggestion::MergeFrom(const OmniboxEventProto_Suggestion& from) {
2393 OmniboxEventProto_Suggestion* const _this = this;
2394 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.OmniboxEventProto.Suggestion)
2395 GOOGLE_DCHECK_NE(&from, _this);
2396 uint32_t cached_has_bits = 0;
2397 (void) cached_has_bits;
2398
2399 cached_has_bits = from._impl_._has_bits_[0];
2400 if (cached_has_bits & 0x000000ffu) {
2401 if (cached_has_bits & 0x00000001u) {
2402 _this->_internal_mutable_scoring_signals()->::metrics::OmniboxEventProto_Suggestion_ScoringSignals::MergeFrom(
2403 from._internal_scoring_signals());
2404 }
2405 if (cached_has_bits & 0x00000002u) {
2406 _this->_impl_.provider_ = from._impl_.provider_;
2407 }
2408 if (cached_has_bits & 0x00000004u) {
2409 _this->_impl_.result_type_ = from._impl_.result_type_;
2410 }
2411 if (cached_has_bits & 0x00000008u) {
2412 _this->_impl_.relevance_ = from._impl_.relevance_;
2413 }
2414 if (cached_has_bits & 0x00000010u) {
2415 _this->_impl_.typed_count_ = from._impl_.typed_count_;
2416 }
2417 if (cached_has_bits & 0x00000020u) {
2418 _this->_impl_.is_starred_ = from._impl_.is_starred_;
2419 }
2420 if (cached_has_bits & 0x00000040u) {
2421 _this->_impl_.is_disabled_ = from._impl_.is_disabled_;
2422 }
2423 if (cached_has_bits & 0x00000080u) {
2424 _this->_impl_.has_tab_match_ = from._impl_.has_tab_match_;
2425 }
2426 _this->_impl_._has_bits_[0] |= cached_has_bits;
2427 }
2428 if (cached_has_bits & 0x00000300u) {
2429 if (cached_has_bits & 0x00000100u) {
2430 _this->_impl_.is_keyword_suggestion_ = from._impl_.is_keyword_suggestion_;
2431 }
2432 if (cached_has_bits & 0x00000200u) {
2433 _this->_impl_.result_subtype_identifier_ = from._impl_.result_subtype_identifier_;
2434 }
2435 _this->_impl_._has_bits_[0] |= cached_has_bits;
2436 }
2437 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2438 }
2439
CopyFrom(const OmniboxEventProto_Suggestion & from)2440 void OmniboxEventProto_Suggestion::CopyFrom(const OmniboxEventProto_Suggestion& from) {
2441 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.OmniboxEventProto.Suggestion)
2442 if (&from == this) return;
2443 Clear();
2444 MergeFrom(from);
2445 }
2446
IsInitialized() const2447 bool OmniboxEventProto_Suggestion::IsInitialized() const {
2448 return true;
2449 }
2450
InternalSwap(OmniboxEventProto_Suggestion * other)2451 void OmniboxEventProto_Suggestion::InternalSwap(OmniboxEventProto_Suggestion* other) {
2452 using std::swap;
2453 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2454 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2455 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2456 PROTOBUF_FIELD_OFFSET(OmniboxEventProto_Suggestion, _impl_.result_subtype_identifier_)
2457 + sizeof(OmniboxEventProto_Suggestion::_impl_.result_subtype_identifier_)
2458 - PROTOBUF_FIELD_OFFSET(OmniboxEventProto_Suggestion, _impl_.scoring_signals_)>(
2459 reinterpret_cast<char*>(&_impl_.scoring_signals_),
2460 reinterpret_cast<char*>(&other->_impl_.scoring_signals_));
2461 }
2462
GetTypeName() const2463 std::string OmniboxEventProto_Suggestion::GetTypeName() const {
2464 return "metrics.OmniboxEventProto.Suggestion";
2465 }
2466
2467
2468 // ===================================================================
2469
2470 class OmniboxEventProto_ProviderInfo::_Internal {
2471 public:
2472 using HasBits = decltype(std::declval<OmniboxEventProto_ProviderInfo>()._impl_._has_bits_);
set_has_provider(HasBits * has_bits)2473 static void set_has_provider(HasBits* has_bits) {
2474 (*has_bits)[0] |= 1u;
2475 }
set_has_provider_done(HasBits * has_bits)2476 static void set_has_provider_done(HasBits* has_bits) {
2477 (*has_bits)[0] |= 2u;
2478 }
set_has_times_returned_results_in_session(HasBits * has_bits)2479 static void set_has_times_returned_results_in_session(HasBits* has_bits) {
2480 (*has_bits)[0] |= 4u;
2481 }
2482 };
2483
OmniboxEventProto_ProviderInfo(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2484 OmniboxEventProto_ProviderInfo::OmniboxEventProto_ProviderInfo(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2485 bool is_message_owned)
2486 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2487 SharedCtor(arena, is_message_owned);
2488 // @@protoc_insertion_point(arena_constructor:metrics.OmniboxEventProto.ProviderInfo)
2489 }
OmniboxEventProto_ProviderInfo(const OmniboxEventProto_ProviderInfo & from)2490 OmniboxEventProto_ProviderInfo::OmniboxEventProto_ProviderInfo(const OmniboxEventProto_ProviderInfo& from)
2491 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2492 OmniboxEventProto_ProviderInfo* const _this = this; (void)_this;
2493 new (&_impl_) Impl_{
2494 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2495 , /*decltype(_impl_._cached_size_)*/{}
2496 , decltype(_impl_.field_trial_triggered_){from._impl_.field_trial_triggered_}
2497 , decltype(_impl_.field_trial_triggered_in_session_){from._impl_.field_trial_triggered_in_session_}
2498 , decltype(_impl_.provider_){}
2499 , decltype(_impl_.provider_done_){}
2500 , decltype(_impl_.times_returned_results_in_session_){}};
2501
2502 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2503 ::memcpy(&_impl_.provider_, &from._impl_.provider_,
2504 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.times_returned_results_in_session_) -
2505 reinterpret_cast<char*>(&_impl_.provider_)) + sizeof(_impl_.times_returned_results_in_session_));
2506 // @@protoc_insertion_point(copy_constructor:metrics.OmniboxEventProto.ProviderInfo)
2507 }
2508
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2509 inline void OmniboxEventProto_ProviderInfo::SharedCtor(
2510 ::_pb::Arena* arena, bool is_message_owned) {
2511 (void)arena;
2512 (void)is_message_owned;
2513 new (&_impl_) Impl_{
2514 decltype(_impl_._has_bits_){}
2515 , /*decltype(_impl_._cached_size_)*/{}
2516 , decltype(_impl_.field_trial_triggered_){arena}
2517 , decltype(_impl_.field_trial_triggered_in_session_){arena}
2518 , decltype(_impl_.provider_){0}
2519 , decltype(_impl_.provider_done_){false}
2520 , decltype(_impl_.times_returned_results_in_session_){0}
2521 };
2522 }
2523
~OmniboxEventProto_ProviderInfo()2524 OmniboxEventProto_ProviderInfo::~OmniboxEventProto_ProviderInfo() {
2525 // @@protoc_insertion_point(destructor:metrics.OmniboxEventProto.ProviderInfo)
2526 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2527 (void)arena;
2528 return;
2529 }
2530 SharedDtor();
2531 }
2532
SharedDtor()2533 inline void OmniboxEventProto_ProviderInfo::SharedDtor() {
2534 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2535 _impl_.field_trial_triggered_.~RepeatedField();
2536 _impl_.field_trial_triggered_in_session_.~RepeatedField();
2537 }
2538
SetCachedSize(int size) const2539 void OmniboxEventProto_ProviderInfo::SetCachedSize(int size) const {
2540 _impl_._cached_size_.Set(size);
2541 }
2542
Clear()2543 void OmniboxEventProto_ProviderInfo::Clear() {
2544 // @@protoc_insertion_point(message_clear_start:metrics.OmniboxEventProto.ProviderInfo)
2545 uint32_t cached_has_bits = 0;
2546 // Prevent compiler warnings about cached_has_bits being unused
2547 (void) cached_has_bits;
2548
2549 _impl_.field_trial_triggered_.Clear();
2550 _impl_.field_trial_triggered_in_session_.Clear();
2551 cached_has_bits = _impl_._has_bits_[0];
2552 if (cached_has_bits & 0x00000007u) {
2553 ::memset(&_impl_.provider_, 0, static_cast<size_t>(
2554 reinterpret_cast<char*>(&_impl_.times_returned_results_in_session_) -
2555 reinterpret_cast<char*>(&_impl_.provider_)) + sizeof(_impl_.times_returned_results_in_session_));
2556 }
2557 _impl_._has_bits_.Clear();
2558 _internal_metadata_.Clear<std::string>();
2559 }
2560
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2561 const char* OmniboxEventProto_ProviderInfo::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2562 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2563 _Internal::HasBits has_bits{};
2564 while (!ctx->Done(&ptr)) {
2565 uint32_t tag;
2566 ptr = ::_pbi::ReadTag(ptr, &tag);
2567 switch (tag >> 3) {
2568 // optional .metrics.OmniboxEventProto.ProviderType provider = 1;
2569 case 1:
2570 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
2571 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2572 CHK_(ptr);
2573 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_ProviderType_IsValid(val))) {
2574 _internal_set_provider(static_cast<::metrics::OmniboxEventProto_ProviderType>(val));
2575 } else {
2576 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
2577 }
2578 } else
2579 goto handle_unusual;
2580 continue;
2581 // optional bool provider_done = 2;
2582 case 2:
2583 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
2584 _Internal::set_has_provider_done(&has_bits);
2585 _impl_.provider_done_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2586 CHK_(ptr);
2587 } else
2588 goto handle_unusual;
2589 continue;
2590 // repeated fixed32 field_trial_triggered = 3 [deprecated = true];
2591 case 3:
2592 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
2593 ptr -= 1;
2594 do {
2595 ptr += 1;
2596 _internal_add_field_trial_triggered(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint32_t>(ptr));
2597 ptr += sizeof(uint32_t);
2598 if (!ctx->DataAvailable(ptr)) break;
2599 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<29>(ptr));
2600 } else if (static_cast<uint8_t>(tag) == 26) {
2601 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFixed32Parser(_internal_mutable_field_trial_triggered(), ptr, ctx);
2602 CHK_(ptr);
2603 } else
2604 goto handle_unusual;
2605 continue;
2606 // repeated fixed32 field_trial_triggered_in_session = 4 [deprecated = true];
2607 case 4:
2608 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
2609 ptr -= 1;
2610 do {
2611 ptr += 1;
2612 _internal_add_field_trial_triggered_in_session(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<uint32_t>(ptr));
2613 ptr += sizeof(uint32_t);
2614 if (!ctx->DataAvailable(ptr)) break;
2615 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<37>(ptr));
2616 } else if (static_cast<uint8_t>(tag) == 34) {
2617 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFixed32Parser(_internal_mutable_field_trial_triggered_in_session(), ptr, ctx);
2618 CHK_(ptr);
2619 } else
2620 goto handle_unusual;
2621 continue;
2622 // optional int32 times_returned_results_in_session = 5;
2623 case 5:
2624 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
2625 _Internal::set_has_times_returned_results_in_session(&has_bits);
2626 _impl_.times_returned_results_in_session_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2627 CHK_(ptr);
2628 } else
2629 goto handle_unusual;
2630 continue;
2631 default:
2632 goto handle_unusual;
2633 } // switch
2634 handle_unusual:
2635 if ((tag == 0) || ((tag & 7) == 4)) {
2636 CHK_(ptr);
2637 ctx->SetLastTag(tag);
2638 goto message_done;
2639 }
2640 ptr = UnknownFieldParse(
2641 tag,
2642 _internal_metadata_.mutable_unknown_fields<std::string>(),
2643 ptr, ctx);
2644 CHK_(ptr != nullptr);
2645 } // while
2646 message_done:
2647 _impl_._has_bits_.Or(has_bits);
2648 return ptr;
2649 failure:
2650 ptr = nullptr;
2651 goto message_done;
2652 #undef CHK_
2653 }
2654
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2655 uint8_t* OmniboxEventProto_ProviderInfo::_InternalSerialize(
2656 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2657 // @@protoc_insertion_point(serialize_to_array_start:metrics.OmniboxEventProto.ProviderInfo)
2658 uint32_t cached_has_bits = 0;
2659 (void) cached_has_bits;
2660
2661 cached_has_bits = _impl_._has_bits_[0];
2662 // optional .metrics.OmniboxEventProto.ProviderType provider = 1;
2663 if (cached_has_bits & 0x00000001u) {
2664 target = stream->EnsureSpace(target);
2665 target = ::_pbi::WireFormatLite::WriteEnumToArray(
2666 1, this->_internal_provider(), target);
2667 }
2668
2669 // optional bool provider_done = 2;
2670 if (cached_has_bits & 0x00000002u) {
2671 target = stream->EnsureSpace(target);
2672 target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_provider_done(), target);
2673 }
2674
2675 // repeated fixed32 field_trial_triggered = 3 [deprecated = true];
2676 for (int i = 0, n = this->_internal_field_trial_triggered_size(); i < n; i++) {
2677 target = stream->EnsureSpace(target);
2678 target = ::_pbi::WireFormatLite::WriteFixed32ToArray(3, this->_internal_field_trial_triggered(i), target);
2679 }
2680
2681 // repeated fixed32 field_trial_triggered_in_session = 4 [deprecated = true];
2682 for (int i = 0, n = this->_internal_field_trial_triggered_in_session_size(); i < n; i++) {
2683 target = stream->EnsureSpace(target);
2684 target = ::_pbi::WireFormatLite::WriteFixed32ToArray(4, this->_internal_field_trial_triggered_in_session(i), target);
2685 }
2686
2687 // optional int32 times_returned_results_in_session = 5;
2688 if (cached_has_bits & 0x00000004u) {
2689 target = stream->EnsureSpace(target);
2690 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_times_returned_results_in_session(), target);
2691 }
2692
2693 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2694 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
2695 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
2696 }
2697 // @@protoc_insertion_point(serialize_to_array_end:metrics.OmniboxEventProto.ProviderInfo)
2698 return target;
2699 }
2700
ByteSizeLong() const2701 size_t OmniboxEventProto_ProviderInfo::ByteSizeLong() const {
2702 // @@protoc_insertion_point(message_byte_size_start:metrics.OmniboxEventProto.ProviderInfo)
2703 size_t total_size = 0;
2704
2705 uint32_t cached_has_bits = 0;
2706 // Prevent compiler warnings about cached_has_bits being unused
2707 (void) cached_has_bits;
2708
2709 // repeated fixed32 field_trial_triggered = 3 [deprecated = true];
2710 {
2711 unsigned int count = static_cast<unsigned int>(this->_internal_field_trial_triggered_size());
2712 size_t data_size = 4UL * count;
2713 total_size += 1 *
2714 ::_pbi::FromIntSize(this->_internal_field_trial_triggered_size());
2715 total_size += data_size;
2716 }
2717
2718 // repeated fixed32 field_trial_triggered_in_session = 4 [deprecated = true];
2719 {
2720 unsigned int count = static_cast<unsigned int>(this->_internal_field_trial_triggered_in_session_size());
2721 size_t data_size = 4UL * count;
2722 total_size += 1 *
2723 ::_pbi::FromIntSize(this->_internal_field_trial_triggered_in_session_size());
2724 total_size += data_size;
2725 }
2726
2727 cached_has_bits = _impl_._has_bits_[0];
2728 if (cached_has_bits & 0x00000007u) {
2729 // optional .metrics.OmniboxEventProto.ProviderType provider = 1;
2730 if (cached_has_bits & 0x00000001u) {
2731 total_size += 1 +
2732 ::_pbi::WireFormatLite::EnumSize(this->_internal_provider());
2733 }
2734
2735 // optional bool provider_done = 2;
2736 if (cached_has_bits & 0x00000002u) {
2737 total_size += 1 + 1;
2738 }
2739
2740 // optional int32 times_returned_results_in_session = 5;
2741 if (cached_has_bits & 0x00000004u) {
2742 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_times_returned_results_in_session());
2743 }
2744
2745 }
2746 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
2747 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
2748 }
2749 int cached_size = ::_pbi::ToCachedSize(total_size);
2750 SetCachedSize(cached_size);
2751 return total_size;
2752 }
2753
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)2754 void OmniboxEventProto_ProviderInfo::CheckTypeAndMergeFrom(
2755 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
2756 MergeFrom(*::_pbi::DownCast<const OmniboxEventProto_ProviderInfo*>(
2757 &from));
2758 }
2759
MergeFrom(const OmniboxEventProto_ProviderInfo & from)2760 void OmniboxEventProto_ProviderInfo::MergeFrom(const OmniboxEventProto_ProviderInfo& from) {
2761 OmniboxEventProto_ProviderInfo* const _this = this;
2762 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.OmniboxEventProto.ProviderInfo)
2763 GOOGLE_DCHECK_NE(&from, _this);
2764 uint32_t cached_has_bits = 0;
2765 (void) cached_has_bits;
2766
2767 _this->_impl_.field_trial_triggered_.MergeFrom(from._impl_.field_trial_triggered_);
2768 _this->_impl_.field_trial_triggered_in_session_.MergeFrom(from._impl_.field_trial_triggered_in_session_);
2769 cached_has_bits = from._impl_._has_bits_[0];
2770 if (cached_has_bits & 0x00000007u) {
2771 if (cached_has_bits & 0x00000001u) {
2772 _this->_impl_.provider_ = from._impl_.provider_;
2773 }
2774 if (cached_has_bits & 0x00000002u) {
2775 _this->_impl_.provider_done_ = from._impl_.provider_done_;
2776 }
2777 if (cached_has_bits & 0x00000004u) {
2778 _this->_impl_.times_returned_results_in_session_ = from._impl_.times_returned_results_in_session_;
2779 }
2780 _this->_impl_._has_bits_[0] |= cached_has_bits;
2781 }
2782 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2783 }
2784
CopyFrom(const OmniboxEventProto_ProviderInfo & from)2785 void OmniboxEventProto_ProviderInfo::CopyFrom(const OmniboxEventProto_ProviderInfo& from) {
2786 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.OmniboxEventProto.ProviderInfo)
2787 if (&from == this) return;
2788 Clear();
2789 MergeFrom(from);
2790 }
2791
IsInitialized() const2792 bool OmniboxEventProto_ProviderInfo::IsInitialized() const {
2793 return true;
2794 }
2795
InternalSwap(OmniboxEventProto_ProviderInfo * other)2796 void OmniboxEventProto_ProviderInfo::InternalSwap(OmniboxEventProto_ProviderInfo* other) {
2797 using std::swap;
2798 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
2799 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
2800 _impl_.field_trial_triggered_.InternalSwap(&other->_impl_.field_trial_triggered_);
2801 _impl_.field_trial_triggered_in_session_.InternalSwap(&other->_impl_.field_trial_triggered_in_session_);
2802 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
2803 PROTOBUF_FIELD_OFFSET(OmniboxEventProto_ProviderInfo, _impl_.times_returned_results_in_session_)
2804 + sizeof(OmniboxEventProto_ProviderInfo::_impl_.times_returned_results_in_session_)
2805 - PROTOBUF_FIELD_OFFSET(OmniboxEventProto_ProviderInfo, _impl_.provider_)>(
2806 reinterpret_cast<char*>(&_impl_.provider_),
2807 reinterpret_cast<char*>(&other->_impl_.provider_));
2808 }
2809
GetTypeName() const2810 std::string OmniboxEventProto_ProviderInfo::GetTypeName() const {
2811 return "metrics.OmniboxEventProto.ProviderInfo";
2812 }
2813
2814
2815 // ===================================================================
2816
2817 class OmniboxEventProto_ProfileData::_Internal {
2818 public:
2819 using HasBits = decltype(std::declval<OmniboxEventProto_ProfileData>()._impl_._has_bits_);
set_has_total_num_bookmarks(HasBits * has_bits)2820 static void set_has_total_num_bookmarks(HasBits* has_bits) {
2821 (*has_bits)[0] |= 1u;
2822 }
set_has_total_num_history_urls(HasBits * has_bits)2823 static void set_has_total_num_history_urls(HasBits* has_bits) {
2824 (*has_bits)[0] |= 2u;
2825 }
set_has_is_signed_into_browser(HasBits * has_bits)2826 static void set_has_is_signed_into_browser(HasBits* has_bits) {
2827 (*has_bits)[0] |= 4u;
2828 }
set_has_is_sync_enabled(HasBits * has_bits)2829 static void set_has_is_sync_enabled(HasBits* has_bits) {
2830 (*has_bits)[0] |= 8u;
2831 }
2832 };
2833
OmniboxEventProto_ProfileData(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)2834 OmniboxEventProto_ProfileData::OmniboxEventProto_ProfileData(::PROTOBUF_NAMESPACE_ID::Arena* arena,
2835 bool is_message_owned)
2836 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
2837 SharedCtor(arena, is_message_owned);
2838 // @@protoc_insertion_point(arena_constructor:metrics.OmniboxEventProto.ProfileData)
2839 }
OmniboxEventProto_ProfileData(const OmniboxEventProto_ProfileData & from)2840 OmniboxEventProto_ProfileData::OmniboxEventProto_ProfileData(const OmniboxEventProto_ProfileData& from)
2841 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
2842 OmniboxEventProto_ProfileData* const _this = this; (void)_this;
2843 new (&_impl_) Impl_{
2844 decltype(_impl_._has_bits_){from._impl_._has_bits_}
2845 , /*decltype(_impl_._cached_size_)*/{}
2846 , decltype(_impl_.total_num_bookmarks_){}
2847 , decltype(_impl_.total_num_history_urls_){}
2848 , decltype(_impl_.is_signed_into_browser_){}
2849 , decltype(_impl_.is_sync_enabled_){}};
2850
2851 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
2852 ::memcpy(&_impl_.total_num_bookmarks_, &from._impl_.total_num_bookmarks_,
2853 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.is_sync_enabled_) -
2854 reinterpret_cast<char*>(&_impl_.total_num_bookmarks_)) + sizeof(_impl_.is_sync_enabled_));
2855 // @@protoc_insertion_point(copy_constructor:metrics.OmniboxEventProto.ProfileData)
2856 }
2857
SharedCtor(::_pb::Arena * arena,bool is_message_owned)2858 inline void OmniboxEventProto_ProfileData::SharedCtor(
2859 ::_pb::Arena* arena, bool is_message_owned) {
2860 (void)arena;
2861 (void)is_message_owned;
2862 new (&_impl_) Impl_{
2863 decltype(_impl_._has_bits_){}
2864 , /*decltype(_impl_._cached_size_)*/{}
2865 , decltype(_impl_.total_num_bookmarks_){0}
2866 , decltype(_impl_.total_num_history_urls_){0}
2867 , decltype(_impl_.is_signed_into_browser_){false}
2868 , decltype(_impl_.is_sync_enabled_){false}
2869 };
2870 }
2871
~OmniboxEventProto_ProfileData()2872 OmniboxEventProto_ProfileData::~OmniboxEventProto_ProfileData() {
2873 // @@protoc_insertion_point(destructor:metrics.OmniboxEventProto.ProfileData)
2874 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
2875 (void)arena;
2876 return;
2877 }
2878 SharedDtor();
2879 }
2880
SharedDtor()2881 inline void OmniboxEventProto_ProfileData::SharedDtor() {
2882 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
2883 }
2884
SetCachedSize(int size) const2885 void OmniboxEventProto_ProfileData::SetCachedSize(int size) const {
2886 _impl_._cached_size_.Set(size);
2887 }
2888
Clear()2889 void OmniboxEventProto_ProfileData::Clear() {
2890 // @@protoc_insertion_point(message_clear_start:metrics.OmniboxEventProto.ProfileData)
2891 uint32_t cached_has_bits = 0;
2892 // Prevent compiler warnings about cached_has_bits being unused
2893 (void) cached_has_bits;
2894
2895 cached_has_bits = _impl_._has_bits_[0];
2896 if (cached_has_bits & 0x0000000fu) {
2897 ::memset(&_impl_.total_num_bookmarks_, 0, static_cast<size_t>(
2898 reinterpret_cast<char*>(&_impl_.is_sync_enabled_) -
2899 reinterpret_cast<char*>(&_impl_.total_num_bookmarks_)) + sizeof(_impl_.is_sync_enabled_));
2900 }
2901 _impl_._has_bits_.Clear();
2902 _internal_metadata_.Clear<std::string>();
2903 }
2904
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)2905 const char* OmniboxEventProto_ProfileData::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
2906 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
2907 _Internal::HasBits has_bits{};
2908 while (!ctx->Done(&ptr)) {
2909 uint32_t tag;
2910 ptr = ::_pbi::ReadTag(ptr, &tag);
2911 switch (tag >> 3) {
2912 // optional int32 total_num_bookmarks = 1;
2913 case 1:
2914 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
2915 _Internal::set_has_total_num_bookmarks(&has_bits);
2916 _impl_.total_num_bookmarks_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2917 CHK_(ptr);
2918 } else
2919 goto handle_unusual;
2920 continue;
2921 // optional int32 total_num_history_urls = 2;
2922 case 2:
2923 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
2924 _Internal::set_has_total_num_history_urls(&has_bits);
2925 _impl_.total_num_history_urls_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
2926 CHK_(ptr);
2927 } else
2928 goto handle_unusual;
2929 continue;
2930 // optional bool is_signed_into_browser = 3;
2931 case 3:
2932 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
2933 _Internal::set_has_is_signed_into_browser(&has_bits);
2934 _impl_.is_signed_into_browser_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2935 CHK_(ptr);
2936 } else
2937 goto handle_unusual;
2938 continue;
2939 // optional bool is_sync_enabled = 4;
2940 case 4:
2941 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
2942 _Internal::set_has_is_sync_enabled(&has_bits);
2943 _impl_.is_sync_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
2944 CHK_(ptr);
2945 } else
2946 goto handle_unusual;
2947 continue;
2948 default:
2949 goto handle_unusual;
2950 } // switch
2951 handle_unusual:
2952 if ((tag == 0) || ((tag & 7) == 4)) {
2953 CHK_(ptr);
2954 ctx->SetLastTag(tag);
2955 goto message_done;
2956 }
2957 ptr = UnknownFieldParse(
2958 tag,
2959 _internal_metadata_.mutable_unknown_fields<std::string>(),
2960 ptr, ctx);
2961 CHK_(ptr != nullptr);
2962 } // while
2963 message_done:
2964 _impl_._has_bits_.Or(has_bits);
2965 return ptr;
2966 failure:
2967 ptr = nullptr;
2968 goto message_done;
2969 #undef CHK_
2970 }
2971
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const2972 uint8_t* OmniboxEventProto_ProfileData::_InternalSerialize(
2973 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
2974 // @@protoc_insertion_point(serialize_to_array_start:metrics.OmniboxEventProto.ProfileData)
2975 uint32_t cached_has_bits = 0;
2976 (void) cached_has_bits;
2977
2978 cached_has_bits = _impl_._has_bits_[0];
2979 // optional int32 total_num_bookmarks = 1;
2980 if (cached_has_bits & 0x00000001u) {
2981 target = stream->EnsureSpace(target);
2982 target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_total_num_bookmarks(), target);
2983 }
2984
2985 // optional int32 total_num_history_urls = 2;
2986 if (cached_has_bits & 0x00000002u) {
2987 target = stream->EnsureSpace(target);
2988 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_total_num_history_urls(), target);
2989 }
2990
2991 // optional bool is_signed_into_browser = 3;
2992 if (cached_has_bits & 0x00000004u) {
2993 target = stream->EnsureSpace(target);
2994 target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_is_signed_into_browser(), target);
2995 }
2996
2997 // optional bool is_sync_enabled = 4;
2998 if (cached_has_bits & 0x00000008u) {
2999 target = stream->EnsureSpace(target);
3000 target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_is_sync_enabled(), target);
3001 }
3002
3003 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3004 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3005 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3006 }
3007 // @@protoc_insertion_point(serialize_to_array_end:metrics.OmniboxEventProto.ProfileData)
3008 return target;
3009 }
3010
ByteSizeLong() const3011 size_t OmniboxEventProto_ProfileData::ByteSizeLong() const {
3012 // @@protoc_insertion_point(message_byte_size_start:metrics.OmniboxEventProto.ProfileData)
3013 size_t total_size = 0;
3014
3015 uint32_t cached_has_bits = 0;
3016 // Prevent compiler warnings about cached_has_bits being unused
3017 (void) cached_has_bits;
3018
3019 cached_has_bits = _impl_._has_bits_[0];
3020 if (cached_has_bits & 0x0000000fu) {
3021 // optional int32 total_num_bookmarks = 1;
3022 if (cached_has_bits & 0x00000001u) {
3023 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_num_bookmarks());
3024 }
3025
3026 // optional int32 total_num_history_urls = 2;
3027 if (cached_has_bits & 0x00000002u) {
3028 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_total_num_history_urls());
3029 }
3030
3031 // optional bool is_signed_into_browser = 3;
3032 if (cached_has_bits & 0x00000004u) {
3033 total_size += 1 + 1;
3034 }
3035
3036 // optional bool is_sync_enabled = 4;
3037 if (cached_has_bits & 0x00000008u) {
3038 total_size += 1 + 1;
3039 }
3040
3041 }
3042 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3043 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
3044 }
3045 int cached_size = ::_pbi::ToCachedSize(total_size);
3046 SetCachedSize(cached_size);
3047 return total_size;
3048 }
3049
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)3050 void OmniboxEventProto_ProfileData::CheckTypeAndMergeFrom(
3051 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
3052 MergeFrom(*::_pbi::DownCast<const OmniboxEventProto_ProfileData*>(
3053 &from));
3054 }
3055
MergeFrom(const OmniboxEventProto_ProfileData & from)3056 void OmniboxEventProto_ProfileData::MergeFrom(const OmniboxEventProto_ProfileData& from) {
3057 OmniboxEventProto_ProfileData* const _this = this;
3058 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.OmniboxEventProto.ProfileData)
3059 GOOGLE_DCHECK_NE(&from, _this);
3060 uint32_t cached_has_bits = 0;
3061 (void) cached_has_bits;
3062
3063 cached_has_bits = from._impl_._has_bits_[0];
3064 if (cached_has_bits & 0x0000000fu) {
3065 if (cached_has_bits & 0x00000001u) {
3066 _this->_impl_.total_num_bookmarks_ = from._impl_.total_num_bookmarks_;
3067 }
3068 if (cached_has_bits & 0x00000002u) {
3069 _this->_impl_.total_num_history_urls_ = from._impl_.total_num_history_urls_;
3070 }
3071 if (cached_has_bits & 0x00000004u) {
3072 _this->_impl_.is_signed_into_browser_ = from._impl_.is_signed_into_browser_;
3073 }
3074 if (cached_has_bits & 0x00000008u) {
3075 _this->_impl_.is_sync_enabled_ = from._impl_.is_sync_enabled_;
3076 }
3077 _this->_impl_._has_bits_[0] |= cached_has_bits;
3078 }
3079 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3080 }
3081
CopyFrom(const OmniboxEventProto_ProfileData & from)3082 void OmniboxEventProto_ProfileData::CopyFrom(const OmniboxEventProto_ProfileData& from) {
3083 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.OmniboxEventProto.ProfileData)
3084 if (&from == this) return;
3085 Clear();
3086 MergeFrom(from);
3087 }
3088
IsInitialized() const3089 bool OmniboxEventProto_ProfileData::IsInitialized() const {
3090 return true;
3091 }
3092
InternalSwap(OmniboxEventProto_ProfileData * other)3093 void OmniboxEventProto_ProfileData::InternalSwap(OmniboxEventProto_ProfileData* other) {
3094 using std::swap;
3095 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
3096 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
3097 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
3098 PROTOBUF_FIELD_OFFSET(OmniboxEventProto_ProfileData, _impl_.is_sync_enabled_)
3099 + sizeof(OmniboxEventProto_ProfileData::_impl_.is_sync_enabled_)
3100 - PROTOBUF_FIELD_OFFSET(OmniboxEventProto_ProfileData, _impl_.total_num_bookmarks_)>(
3101 reinterpret_cast<char*>(&_impl_.total_num_bookmarks_),
3102 reinterpret_cast<char*>(&other->_impl_.total_num_bookmarks_));
3103 }
3104
GetTypeName() const3105 std::string OmniboxEventProto_ProfileData::GetTypeName() const {
3106 return "metrics.OmniboxEventProto.ProfileData";
3107 }
3108
3109
3110 // ===================================================================
3111
3112 class OmniboxEventProto::_Internal {
3113 public:
3114 using HasBits = decltype(std::declval<OmniboxEventProto>()._impl_._has_bits_);
set_has_time_sec(HasBits * has_bits)3115 static void set_has_time_sec(HasBits* has_bits) {
3116 (*has_bits)[0] |= 2u;
3117 }
set_has_tab_id(HasBits * has_bits)3118 static void set_has_tab_id(HasBits* has_bits) {
3119 (*has_bits)[0] |= 4u;
3120 }
set_has_typed_length(HasBits * has_bits)3121 static void set_has_typed_length(HasBits* has_bits) {
3122 (*has_bits)[0] |= 8u;
3123 }
set_has_just_deleted_text(HasBits * has_bits)3124 static void set_has_just_deleted_text(HasBits* has_bits) {
3125 (*has_bits)[0] |= 2048u;
3126 }
set_has_num_typed_terms(HasBits * has_bits)3127 static void set_has_num_typed_terms(HasBits* has_bits) {
3128 (*has_bits)[0] |= 16u;
3129 }
set_has_selected_index(HasBits * has_bits)3130 static void set_has_selected_index(HasBits* has_bits) {
3131 (*has_bits)[0] |= 32u;
3132 }
set_has_selected_tab_match(HasBits * has_bits)3133 static void set_has_selected_tab_match(HasBits* has_bits) {
3134 (*has_bits)[0] |= 4096u;
3135 }
set_has_deprecated_is_top_result_hidden_in_dropdown(HasBits * has_bits)3136 static void set_has_deprecated_is_top_result_hidden_in_dropdown(HasBits* has_bits) {
3137 (*has_bits)[0] |= 8192u;
3138 }
set_has_is_popup_open(HasBits * has_bits)3139 static void set_has_is_popup_open(HasBits* has_bits) {
3140 (*has_bits)[0] |= 16384u;
3141 }
set_has_is_paste_and_go(HasBits * has_bits)3142 static void set_has_is_paste_and_go(HasBits* has_bits) {
3143 (*has_bits)[0] |= 65536u;
3144 }
set_has_completed_length(HasBits * has_bits)3145 static void set_has_completed_length(HasBits* has_bits) {
3146 (*has_bits)[0] |= 128u;
3147 }
set_has_typing_duration_ms(HasBits * has_bits)3148 static void set_has_typing_duration_ms(HasBits* has_bits) {
3149 (*has_bits)[0] |= 64u;
3150 }
set_has_duration_since_last_default_match_update_ms(HasBits * has_bits)3151 static void set_has_duration_since_last_default_match_update_ms(HasBits* has_bits) {
3152 (*has_bits)[0] |= 512u;
3153 }
set_has_current_page_classification(HasBits * has_bits)3154 static void set_has_current_page_classification(HasBits* has_bits) {
3155 (*has_bits)[0] |= 1024u;
3156 }
set_has_mode_type(HasBits * has_bits)3157 static void set_has_mode_type(HasBits* has_bits) {
3158 (*has_bits)[0] |= 32768u;
3159 }
set_has_input_type(HasBits * has_bits)3160 static void set_has_input_type(HasBits* has_bits) {
3161 (*has_bits)[0] |= 256u;
3162 }
set_has_in_keyword_mode(HasBits * has_bits)3163 static void set_has_in_keyword_mode(HasBits* has_bits) {
3164 (*has_bits)[0] |= 131072u;
3165 }
set_has_keyword_mode_entry_method(HasBits * has_bits)3166 static void set_has_keyword_mode_entry_method(HasBits* has_bits) {
3167 (*has_bits)[0] |= 524288u;
3168 }
set_has_is_query_started_from_tile(HasBits * has_bits)3169 static void set_has_is_query_started_from_tile(HasBits* has_bits) {
3170 (*has_bits)[0] |= 262144u;
3171 }
3172 static const ::metrics::OmniboxEventProto_ProfileData& profile_data(const OmniboxEventProto* msg);
set_has_profile_data(HasBits * has_bits)3173 static void set_has_profile_data(HasBits* has_bits) {
3174 (*has_bits)[0] |= 1u;
3175 }
set_has_steady_state_omnibox_position(HasBits * has_bits)3176 static void set_has_steady_state_omnibox_position(HasBits* has_bits) {
3177 (*has_bits)[0] |= 1048576u;
3178 }
3179 };
3180
3181 const ::metrics::OmniboxEventProto_ProfileData&
profile_data(const OmniboxEventProto * msg)3182 OmniboxEventProto::_Internal::profile_data(const OmniboxEventProto* msg) {
3183 return *msg->_impl_.profile_data_;
3184 }
OmniboxEventProto(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)3185 OmniboxEventProto::OmniboxEventProto(::PROTOBUF_NAMESPACE_ID::Arena* arena,
3186 bool is_message_owned)
3187 : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
3188 SharedCtor(arena, is_message_owned);
3189 // @@protoc_insertion_point(arena_constructor:metrics.OmniboxEventProto)
3190 }
OmniboxEventProto(const OmniboxEventProto & from)3191 OmniboxEventProto::OmniboxEventProto(const OmniboxEventProto& from)
3192 : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
3193 OmniboxEventProto* const _this = this; (void)_this;
3194 new (&_impl_) Impl_{
3195 decltype(_impl_._has_bits_){from._impl_._has_bits_}
3196 , /*decltype(_impl_._cached_size_)*/{}
3197 , decltype(_impl_.suggestion_){from._impl_.suggestion_}
3198 , decltype(_impl_.provider_info_){from._impl_.provider_info_}
3199 , decltype(_impl_.legacy_feature_triggered_in_session_){from._impl_.legacy_feature_triggered_in_session_}
3200 , decltype(_impl_.legacy_feature_triggered_){from._impl_.legacy_feature_triggered_}
3201 , decltype(_impl_.feature_triggered_){from._impl_.feature_triggered_}
3202 , decltype(_impl_.feature_triggered_in_session_){from._impl_.feature_triggered_in_session_}
3203 , decltype(_impl_.profile_data_){nullptr}
3204 , decltype(_impl_.time_sec_){}
3205 , decltype(_impl_.tab_id_){}
3206 , decltype(_impl_.typed_length_){}
3207 , decltype(_impl_.num_typed_terms_){}
3208 , decltype(_impl_.selected_index_){}
3209 , decltype(_impl_.typing_duration_ms_){}
3210 , decltype(_impl_.completed_length_){}
3211 , decltype(_impl_.input_type_){}
3212 , decltype(_impl_.duration_since_last_default_match_update_ms_){}
3213 , decltype(_impl_.current_page_classification_){}
3214 , decltype(_impl_.just_deleted_text_){}
3215 , decltype(_impl_.selected_tab_match_){}
3216 , decltype(_impl_.deprecated_is_top_result_hidden_in_dropdown_){}
3217 , decltype(_impl_.is_popup_open_){}
3218 , decltype(_impl_.mode_type_){}
3219 , decltype(_impl_.is_paste_and_go_){}
3220 , decltype(_impl_.in_keyword_mode_){}
3221 , decltype(_impl_.is_query_started_from_tile_){}
3222 , decltype(_impl_.keyword_mode_entry_method_){}
3223 , decltype(_impl_.steady_state_omnibox_position_){}};
3224
3225 _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
3226 if (from._internal_has_profile_data()) {
3227 _this->_impl_.profile_data_ = new ::metrics::OmniboxEventProto_ProfileData(*from._impl_.profile_data_);
3228 }
3229 ::memcpy(&_impl_.time_sec_, &from._impl_.time_sec_,
3230 static_cast<size_t>(reinterpret_cast<char*>(&_impl_.steady_state_omnibox_position_) -
3231 reinterpret_cast<char*>(&_impl_.time_sec_)) + sizeof(_impl_.steady_state_omnibox_position_));
3232 // @@protoc_insertion_point(copy_constructor:metrics.OmniboxEventProto)
3233 }
3234
SharedCtor(::_pb::Arena * arena,bool is_message_owned)3235 inline void OmniboxEventProto::SharedCtor(
3236 ::_pb::Arena* arena, bool is_message_owned) {
3237 (void)arena;
3238 (void)is_message_owned;
3239 new (&_impl_) Impl_{
3240 decltype(_impl_._has_bits_){}
3241 , /*decltype(_impl_._cached_size_)*/{}
3242 , decltype(_impl_.suggestion_){arena}
3243 , decltype(_impl_.provider_info_){arena}
3244 , decltype(_impl_.legacy_feature_triggered_in_session_){arena}
3245 , decltype(_impl_.legacy_feature_triggered_){arena}
3246 , decltype(_impl_.feature_triggered_){arena}
3247 , decltype(_impl_.feature_triggered_in_session_){arena}
3248 , decltype(_impl_.profile_data_){nullptr}
3249 , decltype(_impl_.time_sec_){int64_t{0}}
3250 , decltype(_impl_.tab_id_){0}
3251 , decltype(_impl_.typed_length_){0}
3252 , decltype(_impl_.num_typed_terms_){0}
3253 , decltype(_impl_.selected_index_){0}
3254 , decltype(_impl_.typing_duration_ms_){int64_t{0}}
3255 , decltype(_impl_.completed_length_){0}
3256 , decltype(_impl_.input_type_){0}
3257 , decltype(_impl_.duration_since_last_default_match_update_ms_){int64_t{0}}
3258 , decltype(_impl_.current_page_classification_){0}
3259 , decltype(_impl_.just_deleted_text_){false}
3260 , decltype(_impl_.selected_tab_match_){false}
3261 , decltype(_impl_.deprecated_is_top_result_hidden_in_dropdown_){false}
3262 , decltype(_impl_.is_popup_open_){false}
3263 , decltype(_impl_.mode_type_){0}
3264 , decltype(_impl_.is_paste_and_go_){false}
3265 , decltype(_impl_.in_keyword_mode_){false}
3266 , decltype(_impl_.is_query_started_from_tile_){false}
3267 , decltype(_impl_.keyword_mode_entry_method_){0}
3268 , decltype(_impl_.steady_state_omnibox_position_){0}
3269 };
3270 }
3271
~OmniboxEventProto()3272 OmniboxEventProto::~OmniboxEventProto() {
3273 // @@protoc_insertion_point(destructor:metrics.OmniboxEventProto)
3274 if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
3275 (void)arena;
3276 return;
3277 }
3278 SharedDtor();
3279 }
3280
SharedDtor()3281 inline void OmniboxEventProto::SharedDtor() {
3282 GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
3283 _impl_.suggestion_.~RepeatedPtrField();
3284 _impl_.provider_info_.~RepeatedPtrField();
3285 _impl_.legacy_feature_triggered_in_session_.~RepeatedField();
3286 _impl_.legacy_feature_triggered_.~RepeatedField();
3287 _impl_.feature_triggered_.~RepeatedField();
3288 _impl_.feature_triggered_in_session_.~RepeatedField();
3289 if (this != internal_default_instance()) delete _impl_.profile_data_;
3290 }
3291
SetCachedSize(int size) const3292 void OmniboxEventProto::SetCachedSize(int size) const {
3293 _impl_._cached_size_.Set(size);
3294 }
3295
Clear()3296 void OmniboxEventProto::Clear() {
3297 // @@protoc_insertion_point(message_clear_start:metrics.OmniboxEventProto)
3298 uint32_t cached_has_bits = 0;
3299 // Prevent compiler warnings about cached_has_bits being unused
3300 (void) cached_has_bits;
3301
3302 _impl_.suggestion_.Clear();
3303 _impl_.provider_info_.Clear();
3304 _impl_.legacy_feature_triggered_in_session_.Clear();
3305 _impl_.legacy_feature_triggered_.Clear();
3306 _impl_.feature_triggered_.Clear();
3307 _impl_.feature_triggered_in_session_.Clear();
3308 cached_has_bits = _impl_._has_bits_[0];
3309 if (cached_has_bits & 0x00000001u) {
3310 GOOGLE_DCHECK(_impl_.profile_data_ != nullptr);
3311 _impl_.profile_data_->Clear();
3312 }
3313 if (cached_has_bits & 0x000000feu) {
3314 ::memset(&_impl_.time_sec_, 0, static_cast<size_t>(
3315 reinterpret_cast<char*>(&_impl_.completed_length_) -
3316 reinterpret_cast<char*>(&_impl_.time_sec_)) + sizeof(_impl_.completed_length_));
3317 }
3318 if (cached_has_bits & 0x0000ff00u) {
3319 ::memset(&_impl_.input_type_, 0, static_cast<size_t>(
3320 reinterpret_cast<char*>(&_impl_.mode_type_) -
3321 reinterpret_cast<char*>(&_impl_.input_type_)) + sizeof(_impl_.mode_type_));
3322 }
3323 if (cached_has_bits & 0x001f0000u) {
3324 ::memset(&_impl_.is_paste_and_go_, 0, static_cast<size_t>(
3325 reinterpret_cast<char*>(&_impl_.steady_state_omnibox_position_) -
3326 reinterpret_cast<char*>(&_impl_.is_paste_and_go_)) + sizeof(_impl_.steady_state_omnibox_position_));
3327 }
3328 _impl_._has_bits_.Clear();
3329 _internal_metadata_.Clear<std::string>();
3330 }
3331
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)3332 const char* OmniboxEventProto::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
3333 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
3334 _Internal::HasBits has_bits{};
3335 while (!ctx->Done(&ptr)) {
3336 uint32_t tag;
3337 ptr = ::_pbi::ReadTag(ptr, &tag);
3338 switch (tag >> 3) {
3339 // optional int64 time_sec = 1;
3340 case 1:
3341 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
3342 _Internal::set_has_time_sec(&has_bits);
3343 _impl_.time_sec_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3344 CHK_(ptr);
3345 } else
3346 goto handle_unusual;
3347 continue;
3348 // optional int32 tab_id = 2;
3349 case 2:
3350 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) {
3351 _Internal::set_has_tab_id(&has_bits);
3352 _impl_.tab_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3353 CHK_(ptr);
3354 } else
3355 goto handle_unusual;
3356 continue;
3357 // optional int32 typed_length = 3;
3358 case 3:
3359 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
3360 _Internal::set_has_typed_length(&has_bits);
3361 _impl_.typed_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3362 CHK_(ptr);
3363 } else
3364 goto handle_unusual;
3365 continue;
3366 // optional int32 num_typed_terms = 4;
3367 case 4:
3368 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 32)) {
3369 _Internal::set_has_num_typed_terms(&has_bits);
3370 _impl_.num_typed_terms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3371 CHK_(ptr);
3372 } else
3373 goto handle_unusual;
3374 continue;
3375 // optional int32 selected_index = 5;
3376 case 5:
3377 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
3378 _Internal::set_has_selected_index(&has_bits);
3379 _impl_.selected_index_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3380 CHK_(ptr);
3381 } else
3382 goto handle_unusual;
3383 continue;
3384 // optional int32 completed_length = 6;
3385 case 6:
3386 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
3387 _Internal::set_has_completed_length(&has_bits);
3388 _impl_.completed_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
3389 CHK_(ptr);
3390 } else
3391 goto handle_unusual;
3392 continue;
3393 // optional int64 typing_duration_ms = 7;
3394 case 7:
3395 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
3396 _Internal::set_has_typing_duration_ms(&has_bits);
3397 _impl_.typing_duration_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3398 CHK_(ptr);
3399 } else
3400 goto handle_unusual;
3401 continue;
3402 // optional .metrics.OmniboxInputType input_type = 8;
3403 case 8:
3404 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
3405 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3406 CHK_(ptr);
3407 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxInputType_IsValid(val))) {
3408 _internal_set_input_type(static_cast<::metrics::OmniboxInputType>(val));
3409 } else {
3410 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields());
3411 }
3412 } else
3413 goto handle_unusual;
3414 continue;
3415 // repeated .metrics.OmniboxEventProto.Suggestion suggestion = 9;
3416 case 9:
3417 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 74)) {
3418 ptr -= 1;
3419 do {
3420 ptr += 1;
3421 ptr = ctx->ParseMessage(_internal_add_suggestion(), ptr);
3422 CHK_(ptr);
3423 if (!ctx->DataAvailable(ptr)) break;
3424 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<74>(ptr));
3425 } else
3426 goto handle_unusual;
3427 continue;
3428 // optional .metrics.OmniboxEventProto.PageClassification current_page_classification = 10;
3429 case 10:
3430 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
3431 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3432 CHK_(ptr);
3433 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_PageClassification_IsValid(val))) {
3434 _internal_set_current_page_classification(static_cast<::metrics::OmniboxEventProto_PageClassification>(val));
3435 } else {
3436 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields());
3437 }
3438 } else
3439 goto handle_unusual;
3440 continue;
3441 // optional bool just_deleted_text = 11;
3442 case 11:
3443 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
3444 _Internal::set_has_just_deleted_text(&has_bits);
3445 _impl_.just_deleted_text_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3446 CHK_(ptr);
3447 } else
3448 goto handle_unusual;
3449 continue;
3450 // repeated .metrics.OmniboxEventProto.ProviderInfo provider_info = 12;
3451 case 12:
3452 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 98)) {
3453 ptr -= 1;
3454 do {
3455 ptr += 1;
3456 ptr = ctx->ParseMessage(_internal_add_provider_info(), ptr);
3457 CHK_(ptr);
3458 if (!ctx->DataAvailable(ptr)) break;
3459 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<98>(ptr));
3460 } else
3461 goto handle_unusual;
3462 continue;
3463 // optional int64 duration_since_last_default_match_update_ms = 13;
3464 case 13:
3465 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
3466 _Internal::set_has_duration_since_last_default_match_update_ms(&has_bits);
3467 _impl_.duration_since_last_default_match_update_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3468 CHK_(ptr);
3469 } else
3470 goto handle_unusual;
3471 continue;
3472 // optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14 [deprecated = true];
3473 case 14:
3474 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
3475 _Internal::set_has_deprecated_is_top_result_hidden_in_dropdown(&has_bits);
3476 _impl_.deprecated_is_top_result_hidden_in_dropdown_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3477 CHK_(ptr);
3478 } else
3479 goto handle_unusual;
3480 continue;
3481 // optional bool is_popup_open = 15;
3482 case 15:
3483 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 120)) {
3484 _Internal::set_has_is_popup_open(&has_bits);
3485 _impl_.is_popup_open_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3486 CHK_(ptr);
3487 } else
3488 goto handle_unusual;
3489 continue;
3490 // optional bool is_paste_and_go = 16;
3491 case 16:
3492 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 128)) {
3493 _Internal::set_has_is_paste_and_go(&has_bits);
3494 _impl_.is_paste_and_go_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3495 CHK_(ptr);
3496 } else
3497 goto handle_unusual;
3498 continue;
3499 // optional bool selected_tab_match = 17;
3500 case 17:
3501 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 136)) {
3502 _Internal::set_has_selected_tab_match(&has_bits);
3503 _impl_.selected_tab_match_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3504 CHK_(ptr);
3505 } else
3506 goto handle_unusual;
3507 continue;
3508 // optional .metrics.OmniboxEventProto.ModeType mode_type = 18;
3509 case 18:
3510 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 144)) {
3511 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3512 CHK_(ptr);
3513 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_ModeType_IsValid(val))) {
3514 _internal_set_mode_type(static_cast<::metrics::OmniboxEventProto_ModeType>(val));
3515 } else {
3516 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(18, val, mutable_unknown_fields());
3517 }
3518 } else
3519 goto handle_unusual;
3520 continue;
3521 // optional bool in_keyword_mode = 19;
3522 case 19:
3523 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 152)) {
3524 _Internal::set_has_in_keyword_mode(&has_bits);
3525 _impl_.in_keyword_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3526 CHK_(ptr);
3527 } else
3528 goto handle_unusual;
3529 continue;
3530 // optional .metrics.OmniboxEventProto.KeywordModeEntryMethod keyword_mode_entry_method = 20;
3531 case 20:
3532 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 160)) {
3533 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3534 CHK_(ptr);
3535 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_KeywordModeEntryMethod_IsValid(val))) {
3536 _internal_set_keyword_mode_entry_method(static_cast<::metrics::OmniboxEventProto_KeywordModeEntryMethod>(val));
3537 } else {
3538 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(20, val, mutable_unknown_fields());
3539 }
3540 } else
3541 goto handle_unusual;
3542 continue;
3543 // optional bool is_query_started_from_tile = 21;
3544 case 21:
3545 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 168)) {
3546 _Internal::set_has_is_query_started_from_tile(&has_bits);
3547 _impl_.is_query_started_from_tile_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3548 CHK_(ptr);
3549 } else
3550 goto handle_unusual;
3551 continue;
3552 // repeated int32 legacy_feature_triggered_in_session = 22 [deprecated = true];
3553 case 22:
3554 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 176)) {
3555 ptr -= 2;
3556 do {
3557 ptr += 2;
3558 _internal_add_legacy_feature_triggered_in_session(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3559 CHK_(ptr);
3560 if (!ctx->DataAvailable(ptr)) break;
3561 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<176>(ptr));
3562 } else if (static_cast<uint8_t>(tag) == 178) {
3563 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_legacy_feature_triggered_in_session(), ptr, ctx);
3564 CHK_(ptr);
3565 } else
3566 goto handle_unusual;
3567 continue;
3568 // optional .metrics.OmniboxEventProto.ProfileData profile_data = 23;
3569 case 23:
3570 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 186)) {
3571 ptr = ctx->ParseMessage(_internal_mutable_profile_data(), ptr);
3572 CHK_(ptr);
3573 } else
3574 goto handle_unusual;
3575 continue;
3576 // repeated int32 legacy_feature_triggered = 24 [deprecated = true];
3577 case 24:
3578 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 192)) {
3579 ptr -= 2;
3580 do {
3581 ptr += 2;
3582 _internal_add_legacy_feature_triggered(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
3583 CHK_(ptr);
3584 if (!ctx->DataAvailable(ptr)) break;
3585 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<192>(ptr));
3586 } else if (static_cast<uint8_t>(tag) == 194) {
3587 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_legacy_feature_triggered(), ptr, ctx);
3588 CHK_(ptr);
3589 } else
3590 goto handle_unusual;
3591 continue;
3592 // repeated .metrics.OmniboxEventProto.Feature feature_triggered = 25;
3593 case 25:
3594 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 200)) {
3595 ptr -= 2;
3596 do {
3597 ptr += 2;
3598 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3599 CHK_(ptr);
3600 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_Feature_IsValid(val))) {
3601 _internal_add_feature_triggered(static_cast<::metrics::OmniboxEventProto_Feature>(val));
3602 } else {
3603 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(25, val, mutable_unknown_fields());
3604 }
3605 if (!ctx->DataAvailable(ptr)) break;
3606 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<200>(ptr));
3607 } else if (static_cast<uint8_t>(tag) == 202) {
3608 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_feature_triggered(), ptr, ctx, ::metrics::OmniboxEventProto_Feature_IsValid, &_internal_metadata_, 25);
3609 CHK_(ptr);
3610 } else
3611 goto handle_unusual;
3612 continue;
3613 // repeated .metrics.OmniboxEventProto.Feature feature_triggered_in_session = 26;
3614 case 26:
3615 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 208)) {
3616 ptr -= 2;
3617 do {
3618 ptr += 2;
3619 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3620 CHK_(ptr);
3621 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_Feature_IsValid(val))) {
3622 _internal_add_feature_triggered_in_session(static_cast<::metrics::OmniboxEventProto_Feature>(val));
3623 } else {
3624 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(26, val, mutable_unknown_fields());
3625 }
3626 if (!ctx->DataAvailable(ptr)) break;
3627 } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<208>(ptr));
3628 } else if (static_cast<uint8_t>(tag) == 210) {
3629 ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedEnumParser<std::string>(_internal_mutable_feature_triggered_in_session(), ptr, ctx, ::metrics::OmniboxEventProto_Feature_IsValid, &_internal_metadata_, 26);
3630 CHK_(ptr);
3631 } else
3632 goto handle_unusual;
3633 continue;
3634 // optional .metrics.OmniboxEventProto.OmniboxPosition steady_state_omnibox_position = 27;
3635 case 27:
3636 if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 216)) {
3637 uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
3638 CHK_(ptr);
3639 if (PROTOBUF_PREDICT_TRUE(::metrics::OmniboxEventProto_OmniboxPosition_IsValid(val))) {
3640 _internal_set_steady_state_omnibox_position(static_cast<::metrics::OmniboxEventProto_OmniboxPosition>(val));
3641 } else {
3642 ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(27, val, mutable_unknown_fields());
3643 }
3644 } else
3645 goto handle_unusual;
3646 continue;
3647 default:
3648 goto handle_unusual;
3649 } // switch
3650 handle_unusual:
3651 if ((tag == 0) || ((tag & 7) == 4)) {
3652 CHK_(ptr);
3653 ctx->SetLastTag(tag);
3654 goto message_done;
3655 }
3656 ptr = UnknownFieldParse(
3657 tag,
3658 _internal_metadata_.mutable_unknown_fields<std::string>(),
3659 ptr, ctx);
3660 CHK_(ptr != nullptr);
3661 } // while
3662 message_done:
3663 _impl_._has_bits_.Or(has_bits);
3664 return ptr;
3665 failure:
3666 ptr = nullptr;
3667 goto message_done;
3668 #undef CHK_
3669 }
3670
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const3671 uint8_t* OmniboxEventProto::_InternalSerialize(
3672 uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
3673 // @@protoc_insertion_point(serialize_to_array_start:metrics.OmniboxEventProto)
3674 uint32_t cached_has_bits = 0;
3675 (void) cached_has_bits;
3676
3677 cached_has_bits = _impl_._has_bits_[0];
3678 // optional int64 time_sec = 1;
3679 if (cached_has_bits & 0x00000002u) {
3680 target = stream->EnsureSpace(target);
3681 target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_time_sec(), target);
3682 }
3683
3684 // optional int32 tab_id = 2;
3685 if (cached_has_bits & 0x00000004u) {
3686 target = stream->EnsureSpace(target);
3687 target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_tab_id(), target);
3688 }
3689
3690 // optional int32 typed_length = 3;
3691 if (cached_has_bits & 0x00000008u) {
3692 target = stream->EnsureSpace(target);
3693 target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_typed_length(), target);
3694 }
3695
3696 // optional int32 num_typed_terms = 4;
3697 if (cached_has_bits & 0x00000010u) {
3698 target = stream->EnsureSpace(target);
3699 target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_num_typed_terms(), target);
3700 }
3701
3702 // optional int32 selected_index = 5;
3703 if (cached_has_bits & 0x00000020u) {
3704 target = stream->EnsureSpace(target);
3705 target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_selected_index(), target);
3706 }
3707
3708 // optional int32 completed_length = 6;
3709 if (cached_has_bits & 0x00000080u) {
3710 target = stream->EnsureSpace(target);
3711 target = ::_pbi::WireFormatLite::WriteInt32ToArray(6, this->_internal_completed_length(), target);
3712 }
3713
3714 // optional int64 typing_duration_ms = 7;
3715 if (cached_has_bits & 0x00000040u) {
3716 target = stream->EnsureSpace(target);
3717 target = ::_pbi::WireFormatLite::WriteInt64ToArray(7, this->_internal_typing_duration_ms(), target);
3718 }
3719
3720 // optional .metrics.OmniboxInputType input_type = 8;
3721 if (cached_has_bits & 0x00000100u) {
3722 target = stream->EnsureSpace(target);
3723 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3724 8, this->_internal_input_type(), target);
3725 }
3726
3727 // repeated .metrics.OmniboxEventProto.Suggestion suggestion = 9;
3728 for (unsigned i = 0,
3729 n = static_cast<unsigned>(this->_internal_suggestion_size()); i < n; i++) {
3730 const auto& repfield = this->_internal_suggestion(i);
3731 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3732 InternalWriteMessage(9, repfield, repfield.GetCachedSize(), target, stream);
3733 }
3734
3735 // optional .metrics.OmniboxEventProto.PageClassification current_page_classification = 10;
3736 if (cached_has_bits & 0x00000400u) {
3737 target = stream->EnsureSpace(target);
3738 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3739 10, this->_internal_current_page_classification(), target);
3740 }
3741
3742 // optional bool just_deleted_text = 11;
3743 if (cached_has_bits & 0x00000800u) {
3744 target = stream->EnsureSpace(target);
3745 target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_just_deleted_text(), target);
3746 }
3747
3748 // repeated .metrics.OmniboxEventProto.ProviderInfo provider_info = 12;
3749 for (unsigned i = 0,
3750 n = static_cast<unsigned>(this->_internal_provider_info_size()); i < n; i++) {
3751 const auto& repfield = this->_internal_provider_info(i);
3752 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3753 InternalWriteMessage(12, repfield, repfield.GetCachedSize(), target, stream);
3754 }
3755
3756 // optional int64 duration_since_last_default_match_update_ms = 13;
3757 if (cached_has_bits & 0x00000200u) {
3758 target = stream->EnsureSpace(target);
3759 target = ::_pbi::WireFormatLite::WriteInt64ToArray(13, this->_internal_duration_since_last_default_match_update_ms(), target);
3760 }
3761
3762 // optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14 [deprecated = true];
3763 if (cached_has_bits & 0x00002000u) {
3764 target = stream->EnsureSpace(target);
3765 target = ::_pbi::WireFormatLite::WriteBoolToArray(14, this->_internal_deprecated_is_top_result_hidden_in_dropdown(), target);
3766 }
3767
3768 // optional bool is_popup_open = 15;
3769 if (cached_has_bits & 0x00004000u) {
3770 target = stream->EnsureSpace(target);
3771 target = ::_pbi::WireFormatLite::WriteBoolToArray(15, this->_internal_is_popup_open(), target);
3772 }
3773
3774 // optional bool is_paste_and_go = 16;
3775 if (cached_has_bits & 0x00010000u) {
3776 target = stream->EnsureSpace(target);
3777 target = ::_pbi::WireFormatLite::WriteBoolToArray(16, this->_internal_is_paste_and_go(), target);
3778 }
3779
3780 // optional bool selected_tab_match = 17;
3781 if (cached_has_bits & 0x00001000u) {
3782 target = stream->EnsureSpace(target);
3783 target = ::_pbi::WireFormatLite::WriteBoolToArray(17, this->_internal_selected_tab_match(), target);
3784 }
3785
3786 // optional .metrics.OmniboxEventProto.ModeType mode_type = 18;
3787 if (cached_has_bits & 0x00008000u) {
3788 target = stream->EnsureSpace(target);
3789 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3790 18, this->_internal_mode_type(), target);
3791 }
3792
3793 // optional bool in_keyword_mode = 19;
3794 if (cached_has_bits & 0x00020000u) {
3795 target = stream->EnsureSpace(target);
3796 target = ::_pbi::WireFormatLite::WriteBoolToArray(19, this->_internal_in_keyword_mode(), target);
3797 }
3798
3799 // optional .metrics.OmniboxEventProto.KeywordModeEntryMethod keyword_mode_entry_method = 20;
3800 if (cached_has_bits & 0x00080000u) {
3801 target = stream->EnsureSpace(target);
3802 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3803 20, this->_internal_keyword_mode_entry_method(), target);
3804 }
3805
3806 // optional bool is_query_started_from_tile = 21;
3807 if (cached_has_bits & 0x00040000u) {
3808 target = stream->EnsureSpace(target);
3809 target = ::_pbi::WireFormatLite::WriteBoolToArray(21, this->_internal_is_query_started_from_tile(), target);
3810 }
3811
3812 // repeated int32 legacy_feature_triggered_in_session = 22 [deprecated = true];
3813 for (int i = 0, n = this->_internal_legacy_feature_triggered_in_session_size(); i < n; i++) {
3814 target = stream->EnsureSpace(target);
3815 target = ::_pbi::WireFormatLite::WriteInt32ToArray(22, this->_internal_legacy_feature_triggered_in_session(i), target);
3816 }
3817
3818 // optional .metrics.OmniboxEventProto.ProfileData profile_data = 23;
3819 if (cached_has_bits & 0x00000001u) {
3820 target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
3821 InternalWriteMessage(23, _Internal::profile_data(this),
3822 _Internal::profile_data(this).GetCachedSize(), target, stream);
3823 }
3824
3825 // repeated int32 legacy_feature_triggered = 24 [deprecated = true];
3826 for (int i = 0, n = this->_internal_legacy_feature_triggered_size(); i < n; i++) {
3827 target = stream->EnsureSpace(target);
3828 target = ::_pbi::WireFormatLite::WriteInt32ToArray(24, this->_internal_legacy_feature_triggered(i), target);
3829 }
3830
3831 // repeated .metrics.OmniboxEventProto.Feature feature_triggered = 25;
3832 for (int i = 0, n = this->_internal_feature_triggered_size(); i < n; i++) {
3833 target = stream->EnsureSpace(target);
3834 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3835 25, this->_internal_feature_triggered(i), target);
3836 }
3837
3838 // repeated .metrics.OmniboxEventProto.Feature feature_triggered_in_session = 26;
3839 for (int i = 0, n = this->_internal_feature_triggered_in_session_size(); i < n; i++) {
3840 target = stream->EnsureSpace(target);
3841 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3842 26, this->_internal_feature_triggered_in_session(i), target);
3843 }
3844
3845 // optional .metrics.OmniboxEventProto.OmniboxPosition steady_state_omnibox_position = 27;
3846 if (cached_has_bits & 0x00100000u) {
3847 target = stream->EnsureSpace(target);
3848 target = ::_pbi::WireFormatLite::WriteEnumToArray(
3849 27, this->_internal_steady_state_omnibox_position(), target);
3850 }
3851
3852 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
3853 target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
3854 static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
3855 }
3856 // @@protoc_insertion_point(serialize_to_array_end:metrics.OmniboxEventProto)
3857 return target;
3858 }
3859
ByteSizeLong() const3860 size_t OmniboxEventProto::ByteSizeLong() const {
3861 // @@protoc_insertion_point(message_byte_size_start:metrics.OmniboxEventProto)
3862 size_t total_size = 0;
3863
3864 uint32_t cached_has_bits = 0;
3865 // Prevent compiler warnings about cached_has_bits being unused
3866 (void) cached_has_bits;
3867
3868 // repeated .metrics.OmniboxEventProto.Suggestion suggestion = 9;
3869 total_size += 1UL * this->_internal_suggestion_size();
3870 for (const auto& msg : this->_impl_.suggestion_) {
3871 total_size +=
3872 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3873 }
3874
3875 // repeated .metrics.OmniboxEventProto.ProviderInfo provider_info = 12;
3876 total_size += 1UL * this->_internal_provider_info_size();
3877 for (const auto& msg : this->_impl_.provider_info_) {
3878 total_size +=
3879 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
3880 }
3881
3882 // repeated int32 legacy_feature_triggered_in_session = 22 [deprecated = true];
3883 {
3884 size_t data_size = ::_pbi::WireFormatLite::
3885 Int32Size(this->_impl_.legacy_feature_triggered_in_session_);
3886 total_size += 2 *
3887 ::_pbi::FromIntSize(this->_internal_legacy_feature_triggered_in_session_size());
3888 total_size += data_size;
3889 }
3890
3891 // repeated int32 legacy_feature_triggered = 24 [deprecated = true];
3892 {
3893 size_t data_size = ::_pbi::WireFormatLite::
3894 Int32Size(this->_impl_.legacy_feature_triggered_);
3895 total_size += 2 *
3896 ::_pbi::FromIntSize(this->_internal_legacy_feature_triggered_size());
3897 total_size += data_size;
3898 }
3899
3900 // repeated .metrics.OmniboxEventProto.Feature feature_triggered = 25;
3901 {
3902 size_t data_size = 0;
3903 unsigned int count = static_cast<unsigned int>(this->_internal_feature_triggered_size());for (unsigned int i = 0; i < count; i++) {
3904 data_size += ::_pbi::WireFormatLite::EnumSize(
3905 this->_internal_feature_triggered(static_cast<int>(i)));
3906 }
3907 total_size += (2UL * count) + data_size;
3908 }
3909
3910 // repeated .metrics.OmniboxEventProto.Feature feature_triggered_in_session = 26;
3911 {
3912 size_t data_size = 0;
3913 unsigned int count = static_cast<unsigned int>(this->_internal_feature_triggered_in_session_size());for (unsigned int i = 0; i < count; i++) {
3914 data_size += ::_pbi::WireFormatLite::EnumSize(
3915 this->_internal_feature_triggered_in_session(static_cast<int>(i)));
3916 }
3917 total_size += (2UL * count) + data_size;
3918 }
3919
3920 cached_has_bits = _impl_._has_bits_[0];
3921 if (cached_has_bits & 0x000000ffu) {
3922 // optional .metrics.OmniboxEventProto.ProfileData profile_data = 23;
3923 if (cached_has_bits & 0x00000001u) {
3924 total_size += 2 +
3925 ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
3926 *_impl_.profile_data_);
3927 }
3928
3929 // optional int64 time_sec = 1;
3930 if (cached_has_bits & 0x00000002u) {
3931 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_time_sec());
3932 }
3933
3934 // optional int32 tab_id = 2;
3935 if (cached_has_bits & 0x00000004u) {
3936 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tab_id());
3937 }
3938
3939 // optional int32 typed_length = 3;
3940 if (cached_has_bits & 0x00000008u) {
3941 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_typed_length());
3942 }
3943
3944 // optional int32 num_typed_terms = 4;
3945 if (cached_has_bits & 0x00000010u) {
3946 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_typed_terms());
3947 }
3948
3949 // optional int32 selected_index = 5;
3950 if (cached_has_bits & 0x00000020u) {
3951 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_selected_index());
3952 }
3953
3954 // optional int64 typing_duration_ms = 7;
3955 if (cached_has_bits & 0x00000040u) {
3956 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_typing_duration_ms());
3957 }
3958
3959 // optional int32 completed_length = 6;
3960 if (cached_has_bits & 0x00000080u) {
3961 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_completed_length());
3962 }
3963
3964 }
3965 if (cached_has_bits & 0x0000ff00u) {
3966 // optional .metrics.OmniboxInputType input_type = 8;
3967 if (cached_has_bits & 0x00000100u) {
3968 total_size += 1 +
3969 ::_pbi::WireFormatLite::EnumSize(this->_internal_input_type());
3970 }
3971
3972 // optional int64 duration_since_last_default_match_update_ms = 13;
3973 if (cached_has_bits & 0x00000200u) {
3974 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_duration_since_last_default_match_update_ms());
3975 }
3976
3977 // optional .metrics.OmniboxEventProto.PageClassification current_page_classification = 10;
3978 if (cached_has_bits & 0x00000400u) {
3979 total_size += 1 +
3980 ::_pbi::WireFormatLite::EnumSize(this->_internal_current_page_classification());
3981 }
3982
3983 // optional bool just_deleted_text = 11;
3984 if (cached_has_bits & 0x00000800u) {
3985 total_size += 1 + 1;
3986 }
3987
3988 // optional bool selected_tab_match = 17;
3989 if (cached_has_bits & 0x00001000u) {
3990 total_size += 2 + 1;
3991 }
3992
3993 // optional bool DEPRECATED_is_top_result_hidden_in_dropdown = 14 [deprecated = true];
3994 if (cached_has_bits & 0x00002000u) {
3995 total_size += 1 + 1;
3996 }
3997
3998 // optional bool is_popup_open = 15;
3999 if (cached_has_bits & 0x00004000u) {
4000 total_size += 1 + 1;
4001 }
4002
4003 // optional .metrics.OmniboxEventProto.ModeType mode_type = 18;
4004 if (cached_has_bits & 0x00008000u) {
4005 total_size += 2 +
4006 ::_pbi::WireFormatLite::EnumSize(this->_internal_mode_type());
4007 }
4008
4009 }
4010 if (cached_has_bits & 0x001f0000u) {
4011 // optional bool is_paste_and_go = 16;
4012 if (cached_has_bits & 0x00010000u) {
4013 total_size += 2 + 1;
4014 }
4015
4016 // optional bool in_keyword_mode = 19;
4017 if (cached_has_bits & 0x00020000u) {
4018 total_size += 2 + 1;
4019 }
4020
4021 // optional bool is_query_started_from_tile = 21;
4022 if (cached_has_bits & 0x00040000u) {
4023 total_size += 2 + 1;
4024 }
4025
4026 // optional .metrics.OmniboxEventProto.KeywordModeEntryMethod keyword_mode_entry_method = 20;
4027 if (cached_has_bits & 0x00080000u) {
4028 total_size += 2 +
4029 ::_pbi::WireFormatLite::EnumSize(this->_internal_keyword_mode_entry_method());
4030 }
4031
4032 // optional .metrics.OmniboxEventProto.OmniboxPosition steady_state_omnibox_position = 27;
4033 if (cached_has_bits & 0x00100000u) {
4034 total_size += 2 +
4035 ::_pbi::WireFormatLite::EnumSize(this->_internal_steady_state_omnibox_position());
4036 }
4037
4038 }
4039 if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
4040 total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
4041 }
4042 int cached_size = ::_pbi::ToCachedSize(total_size);
4043 SetCachedSize(cached_size);
4044 return total_size;
4045 }
4046
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)4047 void OmniboxEventProto::CheckTypeAndMergeFrom(
4048 const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
4049 MergeFrom(*::_pbi::DownCast<const OmniboxEventProto*>(
4050 &from));
4051 }
4052
MergeFrom(const OmniboxEventProto & from)4053 void OmniboxEventProto::MergeFrom(const OmniboxEventProto& from) {
4054 OmniboxEventProto* const _this = this;
4055 // @@protoc_insertion_point(class_specific_merge_from_start:metrics.OmniboxEventProto)
4056 GOOGLE_DCHECK_NE(&from, _this);
4057 uint32_t cached_has_bits = 0;
4058 (void) cached_has_bits;
4059
4060 _this->_impl_.suggestion_.MergeFrom(from._impl_.suggestion_);
4061 _this->_impl_.provider_info_.MergeFrom(from._impl_.provider_info_);
4062 _this->_impl_.legacy_feature_triggered_in_session_.MergeFrom(from._impl_.legacy_feature_triggered_in_session_);
4063 _this->_impl_.legacy_feature_triggered_.MergeFrom(from._impl_.legacy_feature_triggered_);
4064 _this->_impl_.feature_triggered_.MergeFrom(from._impl_.feature_triggered_);
4065 _this->_impl_.feature_triggered_in_session_.MergeFrom(from._impl_.feature_triggered_in_session_);
4066 cached_has_bits = from._impl_._has_bits_[0];
4067 if (cached_has_bits & 0x000000ffu) {
4068 if (cached_has_bits & 0x00000001u) {
4069 _this->_internal_mutable_profile_data()->::metrics::OmniboxEventProto_ProfileData::MergeFrom(
4070 from._internal_profile_data());
4071 }
4072 if (cached_has_bits & 0x00000002u) {
4073 _this->_impl_.time_sec_ = from._impl_.time_sec_;
4074 }
4075 if (cached_has_bits & 0x00000004u) {
4076 _this->_impl_.tab_id_ = from._impl_.tab_id_;
4077 }
4078 if (cached_has_bits & 0x00000008u) {
4079 _this->_impl_.typed_length_ = from._impl_.typed_length_;
4080 }
4081 if (cached_has_bits & 0x00000010u) {
4082 _this->_impl_.num_typed_terms_ = from._impl_.num_typed_terms_;
4083 }
4084 if (cached_has_bits & 0x00000020u) {
4085 _this->_impl_.selected_index_ = from._impl_.selected_index_;
4086 }
4087 if (cached_has_bits & 0x00000040u) {
4088 _this->_impl_.typing_duration_ms_ = from._impl_.typing_duration_ms_;
4089 }
4090 if (cached_has_bits & 0x00000080u) {
4091 _this->_impl_.completed_length_ = from._impl_.completed_length_;
4092 }
4093 _this->_impl_._has_bits_[0] |= cached_has_bits;
4094 }
4095 if (cached_has_bits & 0x0000ff00u) {
4096 if (cached_has_bits & 0x00000100u) {
4097 _this->_impl_.input_type_ = from._impl_.input_type_;
4098 }
4099 if (cached_has_bits & 0x00000200u) {
4100 _this->_impl_.duration_since_last_default_match_update_ms_ = from._impl_.duration_since_last_default_match_update_ms_;
4101 }
4102 if (cached_has_bits & 0x00000400u) {
4103 _this->_impl_.current_page_classification_ = from._impl_.current_page_classification_;
4104 }
4105 if (cached_has_bits & 0x00000800u) {
4106 _this->_impl_.just_deleted_text_ = from._impl_.just_deleted_text_;
4107 }
4108 if (cached_has_bits & 0x00001000u) {
4109 _this->_impl_.selected_tab_match_ = from._impl_.selected_tab_match_;
4110 }
4111 if (cached_has_bits & 0x00002000u) {
4112 _this->_impl_.deprecated_is_top_result_hidden_in_dropdown_ = from._impl_.deprecated_is_top_result_hidden_in_dropdown_;
4113 }
4114 if (cached_has_bits & 0x00004000u) {
4115 _this->_impl_.is_popup_open_ = from._impl_.is_popup_open_;
4116 }
4117 if (cached_has_bits & 0x00008000u) {
4118 _this->_impl_.mode_type_ = from._impl_.mode_type_;
4119 }
4120 _this->_impl_._has_bits_[0] |= cached_has_bits;
4121 }
4122 if (cached_has_bits & 0x001f0000u) {
4123 if (cached_has_bits & 0x00010000u) {
4124 _this->_impl_.is_paste_and_go_ = from._impl_.is_paste_and_go_;
4125 }
4126 if (cached_has_bits & 0x00020000u) {
4127 _this->_impl_.in_keyword_mode_ = from._impl_.in_keyword_mode_;
4128 }
4129 if (cached_has_bits & 0x00040000u) {
4130 _this->_impl_.is_query_started_from_tile_ = from._impl_.is_query_started_from_tile_;
4131 }
4132 if (cached_has_bits & 0x00080000u) {
4133 _this->_impl_.keyword_mode_entry_method_ = from._impl_.keyword_mode_entry_method_;
4134 }
4135 if (cached_has_bits & 0x00100000u) {
4136 _this->_impl_.steady_state_omnibox_position_ = from._impl_.steady_state_omnibox_position_;
4137 }
4138 _this->_impl_._has_bits_[0] |= cached_has_bits;
4139 }
4140 _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
4141 }
4142
CopyFrom(const OmniboxEventProto & from)4143 void OmniboxEventProto::CopyFrom(const OmniboxEventProto& from) {
4144 // @@protoc_insertion_point(class_specific_copy_from_start:metrics.OmniboxEventProto)
4145 if (&from == this) return;
4146 Clear();
4147 MergeFrom(from);
4148 }
4149
IsInitialized() const4150 bool OmniboxEventProto::IsInitialized() const {
4151 return true;
4152 }
4153
InternalSwap(OmniboxEventProto * other)4154 void OmniboxEventProto::InternalSwap(OmniboxEventProto* other) {
4155 using std::swap;
4156 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
4157 swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
4158 _impl_.suggestion_.InternalSwap(&other->_impl_.suggestion_);
4159 _impl_.provider_info_.InternalSwap(&other->_impl_.provider_info_);
4160 _impl_.legacy_feature_triggered_in_session_.InternalSwap(&other->_impl_.legacy_feature_triggered_in_session_);
4161 _impl_.legacy_feature_triggered_.InternalSwap(&other->_impl_.legacy_feature_triggered_);
4162 _impl_.feature_triggered_.InternalSwap(&other->_impl_.feature_triggered_);
4163 _impl_.feature_triggered_in_session_.InternalSwap(&other->_impl_.feature_triggered_in_session_);
4164 ::PROTOBUF_NAMESPACE_ID::internal::memswap<
4165 PROTOBUF_FIELD_OFFSET(OmniboxEventProto, _impl_.steady_state_omnibox_position_)
4166 + sizeof(OmniboxEventProto::_impl_.steady_state_omnibox_position_)
4167 - PROTOBUF_FIELD_OFFSET(OmniboxEventProto, _impl_.profile_data_)>(
4168 reinterpret_cast<char*>(&_impl_.profile_data_),
4169 reinterpret_cast<char*>(&other->_impl_.profile_data_));
4170 }
4171
GetTypeName() const4172 std::string OmniboxEventProto::GetTypeName() const {
4173 return "metrics.OmniboxEventProto";
4174 }
4175
4176
4177 // @@protoc_insertion_point(namespace_scope)
4178 } // namespace metrics
4179 PROTOBUF_NAMESPACE_OPEN
4180 template<> PROTOBUF_NOINLINE ::metrics::OmniboxEventProto_Suggestion_ScoringSignals*
CreateMaybeMessage(Arena * arena)4181 Arena::CreateMaybeMessage< ::metrics::OmniboxEventProto_Suggestion_ScoringSignals >(Arena* arena) {
4182 return Arena::CreateMessageInternal< ::metrics::OmniboxEventProto_Suggestion_ScoringSignals >(arena);
4183 }
4184 template<> PROTOBUF_NOINLINE ::metrics::OmniboxEventProto_Suggestion*
CreateMaybeMessage(Arena * arena)4185 Arena::CreateMaybeMessage< ::metrics::OmniboxEventProto_Suggestion >(Arena* arena) {
4186 return Arena::CreateMessageInternal< ::metrics::OmniboxEventProto_Suggestion >(arena);
4187 }
4188 template<> PROTOBUF_NOINLINE ::metrics::OmniboxEventProto_ProviderInfo*
CreateMaybeMessage(Arena * arena)4189 Arena::CreateMaybeMessage< ::metrics::OmniboxEventProto_ProviderInfo >(Arena* arena) {
4190 return Arena::CreateMessageInternal< ::metrics::OmniboxEventProto_ProviderInfo >(arena);
4191 }
4192 template<> PROTOBUF_NOINLINE ::metrics::OmniboxEventProto_ProfileData*
CreateMaybeMessage(Arena * arena)4193 Arena::CreateMaybeMessage< ::metrics::OmniboxEventProto_ProfileData >(Arena* arena) {
4194 return Arena::CreateMessageInternal< ::metrics::OmniboxEventProto_ProfileData >(arena);
4195 }
4196 template<> PROTOBUF_NOINLINE ::metrics::OmniboxEventProto*
CreateMaybeMessage(Arena * arena)4197 Arena::CreateMaybeMessage< ::metrics::OmniboxEventProto >(Arena* arena) {
4198 return Arena::CreateMessageInternal< ::metrics::OmniboxEventProto >(arena);
4199 }
4200 PROTOBUF_NAMESPACE_CLOSE
4201
4202 // @@protoc_insertion_point(global_scope)
4203 #include <google/protobuf/port_undef.inc>
4204