1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: request_context_config.proto
3 
4 #include "request_context_config.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 org {
21 namespace chromium {
22 namespace net {
RequestContextConfigOptions(::_pbi::ConstantInitialized)23 PROTOBUF_CONSTEXPR RequestContextConfigOptions::RequestContextConfigOptions(
24     ::_pbi::ConstantInitialized): _impl_{
25     /*decltype(_impl_._has_bits_)*/{}
26   , /*decltype(_impl_._cached_size_)*/{}
27   , /*decltype(_impl_.user_agent_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
28   , /*decltype(_impl_.storage_path_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
29   , /*decltype(_impl_.quic_default_user_agent_id_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
30   , /*decltype(_impl_.experimental_options_)*/{&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}}
31   , /*decltype(_impl_.quic_enabled_)*/false
32   , /*decltype(_impl_.http2_enabled_)*/false
33   , /*decltype(_impl_.brotli_enabled_)*/false
34   , /*decltype(_impl_.disable_cache_)*/false
35   , /*decltype(_impl_.http_cache_mode_)*/0
36   , /*decltype(_impl_.http_cache_max_size_)*/int64_t{0}
37   , /*decltype(_impl_.mock_cert_verifier_)*/int64_t{0}
38   , /*decltype(_impl_.enable_network_quality_estimator_)*/false
39   , /*decltype(_impl_.bypass_public_key_pinning_for_local_trust_anchors_)*/false
40   , /*decltype(_impl_.network_thread_priority_)*/0} {}
41 struct RequestContextConfigOptionsDefaultTypeInternal {
RequestContextConfigOptionsDefaultTypeInternalorg::chromium::net::RequestContextConfigOptionsDefaultTypeInternal42   PROTOBUF_CONSTEXPR RequestContextConfigOptionsDefaultTypeInternal()
43       : _instance(::_pbi::ConstantInitialized{}) {}
~RequestContextConfigOptionsDefaultTypeInternalorg::chromium::net::RequestContextConfigOptionsDefaultTypeInternal44   ~RequestContextConfigOptionsDefaultTypeInternal() {}
45   union {
46     RequestContextConfigOptions _instance;
47   };
48 };
49 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 RequestContextConfigOptionsDefaultTypeInternal _RequestContextConfigOptions_default_instance_;
50 }  // namespace net
51 }  // namespace chromium
52 }  // namespace org
53 namespace org {
54 namespace chromium {
55 namespace net {
56 
57 // ===================================================================
58 
59 class RequestContextConfigOptions::_Internal {
60  public:
61   using HasBits = decltype(std::declval<RequestContextConfigOptions>()._impl_._has_bits_);
set_has_user_agent(HasBits * has_bits)62   static void set_has_user_agent(HasBits* has_bits) {
63     (*has_bits)[0] |= 1u;
64   }
set_has_storage_path(HasBits * has_bits)65   static void set_has_storage_path(HasBits* has_bits) {
66     (*has_bits)[0] |= 2u;
67   }
set_has_quic_enabled(HasBits * has_bits)68   static void set_has_quic_enabled(HasBits* has_bits) {
69     (*has_bits)[0] |= 16u;
70   }
set_has_quic_default_user_agent_id(HasBits * has_bits)71   static void set_has_quic_default_user_agent_id(HasBits* has_bits) {
72     (*has_bits)[0] |= 4u;
73   }
set_has_http2_enabled(HasBits * has_bits)74   static void set_has_http2_enabled(HasBits* has_bits) {
75     (*has_bits)[0] |= 32u;
76   }
set_has_brotli_enabled(HasBits * has_bits)77   static void set_has_brotli_enabled(HasBits* has_bits) {
78     (*has_bits)[0] |= 64u;
79   }
set_has_disable_cache(HasBits * has_bits)80   static void set_has_disable_cache(HasBits* has_bits) {
81     (*has_bits)[0] |= 128u;
82   }
set_has_http_cache_mode(HasBits * has_bits)83   static void set_has_http_cache_mode(HasBits* has_bits) {
84     (*has_bits)[0] |= 256u;
85   }
set_has_http_cache_max_size(HasBits * has_bits)86   static void set_has_http_cache_max_size(HasBits* has_bits) {
87     (*has_bits)[0] |= 512u;
88   }
set_has_experimental_options(HasBits * has_bits)89   static void set_has_experimental_options(HasBits* has_bits) {
90     (*has_bits)[0] |= 8u;
91   }
set_has_mock_cert_verifier(HasBits * has_bits)92   static void set_has_mock_cert_verifier(HasBits* has_bits) {
93     (*has_bits)[0] |= 1024u;
94   }
set_has_enable_network_quality_estimator(HasBits * has_bits)95   static void set_has_enable_network_quality_estimator(HasBits* has_bits) {
96     (*has_bits)[0] |= 2048u;
97   }
set_has_bypass_public_key_pinning_for_local_trust_anchors(HasBits * has_bits)98   static void set_has_bypass_public_key_pinning_for_local_trust_anchors(HasBits* has_bits) {
99     (*has_bits)[0] |= 4096u;
100   }
set_has_network_thread_priority(HasBits * has_bits)101   static void set_has_network_thread_priority(HasBits* has_bits) {
102     (*has_bits)[0] |= 8192u;
103   }
104 };
105 
RequestContextConfigOptions(::PROTOBUF_NAMESPACE_ID::Arena * arena,bool is_message_owned)106 RequestContextConfigOptions::RequestContextConfigOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena,
107                          bool is_message_owned)
108   : ::PROTOBUF_NAMESPACE_ID::MessageLite(arena, is_message_owned) {
109   SharedCtor(arena, is_message_owned);
110   // @@protoc_insertion_point(arena_constructor:org.chromium.net.RequestContextConfigOptions)
111 }
RequestContextConfigOptions(const RequestContextConfigOptions & from)112 RequestContextConfigOptions::RequestContextConfigOptions(const RequestContextConfigOptions& from)
113   : ::PROTOBUF_NAMESPACE_ID::MessageLite() {
114   RequestContextConfigOptions* const _this = this; (void)_this;
115   new (&_impl_) Impl_{
116       decltype(_impl_._has_bits_){from._impl_._has_bits_}
117     , /*decltype(_impl_._cached_size_)*/{}
118     , decltype(_impl_.user_agent_){}
119     , decltype(_impl_.storage_path_){}
120     , decltype(_impl_.quic_default_user_agent_id_){}
121     , decltype(_impl_.experimental_options_){}
122     , decltype(_impl_.quic_enabled_){}
123     , decltype(_impl_.http2_enabled_){}
124     , decltype(_impl_.brotli_enabled_){}
125     , decltype(_impl_.disable_cache_){}
126     , decltype(_impl_.http_cache_mode_){}
127     , decltype(_impl_.http_cache_max_size_){}
128     , decltype(_impl_.mock_cert_verifier_){}
129     , decltype(_impl_.enable_network_quality_estimator_){}
130     , decltype(_impl_.bypass_public_key_pinning_for_local_trust_anchors_){}
131     , decltype(_impl_.network_thread_priority_){}};
132 
133   _internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
134   _impl_.user_agent_.InitDefault();
135   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
136     _impl_.user_agent_.Set("", GetArenaForAllocation());
137   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
138   if (from._internal_has_user_agent()) {
139     _this->_impl_.user_agent_.Set(from._internal_user_agent(),
140       _this->GetArenaForAllocation());
141   }
142   _impl_.storage_path_.InitDefault();
143   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
144     _impl_.storage_path_.Set("", GetArenaForAllocation());
145   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
146   if (from._internal_has_storage_path()) {
147     _this->_impl_.storage_path_.Set(from._internal_storage_path(),
148       _this->GetArenaForAllocation());
149   }
150   _impl_.quic_default_user_agent_id_.InitDefault();
151   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
152     _impl_.quic_default_user_agent_id_.Set("", GetArenaForAllocation());
153   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
154   if (from._internal_has_quic_default_user_agent_id()) {
155     _this->_impl_.quic_default_user_agent_id_.Set(from._internal_quic_default_user_agent_id(),
156       _this->GetArenaForAllocation());
157   }
158   _impl_.experimental_options_.InitDefault();
159   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
160     _impl_.experimental_options_.Set("", GetArenaForAllocation());
161   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
162   if (from._internal_has_experimental_options()) {
163     _this->_impl_.experimental_options_.Set(from._internal_experimental_options(),
164       _this->GetArenaForAllocation());
165   }
166   ::memcpy(&_impl_.quic_enabled_, &from._impl_.quic_enabled_,
167     static_cast<size_t>(reinterpret_cast<char*>(&_impl_.network_thread_priority_) -
168     reinterpret_cast<char*>(&_impl_.quic_enabled_)) + sizeof(_impl_.network_thread_priority_));
169   // @@protoc_insertion_point(copy_constructor:org.chromium.net.RequestContextConfigOptions)
170 }
171 
SharedCtor(::_pb::Arena * arena,bool is_message_owned)172 inline void RequestContextConfigOptions::SharedCtor(
173     ::_pb::Arena* arena, bool is_message_owned) {
174   (void)arena;
175   (void)is_message_owned;
176   new (&_impl_) Impl_{
177       decltype(_impl_._has_bits_){}
178     , /*decltype(_impl_._cached_size_)*/{}
179     , decltype(_impl_.user_agent_){}
180     , decltype(_impl_.storage_path_){}
181     , decltype(_impl_.quic_default_user_agent_id_){}
182     , decltype(_impl_.experimental_options_){}
183     , decltype(_impl_.quic_enabled_){false}
184     , decltype(_impl_.http2_enabled_){false}
185     , decltype(_impl_.brotli_enabled_){false}
186     , decltype(_impl_.disable_cache_){false}
187     , decltype(_impl_.http_cache_mode_){0}
188     , decltype(_impl_.http_cache_max_size_){int64_t{0}}
189     , decltype(_impl_.mock_cert_verifier_){int64_t{0}}
190     , decltype(_impl_.enable_network_quality_estimator_){false}
191     , decltype(_impl_.bypass_public_key_pinning_for_local_trust_anchors_){false}
192     , decltype(_impl_.network_thread_priority_){0}
193   };
194   _impl_.user_agent_.InitDefault();
195   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
196     _impl_.user_agent_.Set("", GetArenaForAllocation());
197   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
198   _impl_.storage_path_.InitDefault();
199   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
200     _impl_.storage_path_.Set("", GetArenaForAllocation());
201   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
202   _impl_.quic_default_user_agent_id_.InitDefault();
203   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
204     _impl_.quic_default_user_agent_id_.Set("", GetArenaForAllocation());
205   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
206   _impl_.experimental_options_.InitDefault();
207   #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING
208     _impl_.experimental_options_.Set("", GetArenaForAllocation());
209   #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING
210 }
211 
~RequestContextConfigOptions()212 RequestContextConfigOptions::~RequestContextConfigOptions() {
213   // @@protoc_insertion_point(destructor:org.chromium.net.RequestContextConfigOptions)
214   if (auto *arena = _internal_metadata_.DeleteReturnArena<std::string>()) {
215   (void)arena;
216     return;
217   }
218   SharedDtor();
219 }
220 
SharedDtor()221 inline void RequestContextConfigOptions::SharedDtor() {
222   GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
223   _impl_.user_agent_.Destroy();
224   _impl_.storage_path_.Destroy();
225   _impl_.quic_default_user_agent_id_.Destroy();
226   _impl_.experimental_options_.Destroy();
227 }
228 
SetCachedSize(int size) const229 void RequestContextConfigOptions::SetCachedSize(int size) const {
230   _impl_._cached_size_.Set(size);
231 }
232 
Clear()233 void RequestContextConfigOptions::Clear() {
234 // @@protoc_insertion_point(message_clear_start:org.chromium.net.RequestContextConfigOptions)
235   uint32_t cached_has_bits = 0;
236   // Prevent compiler warnings about cached_has_bits being unused
237   (void) cached_has_bits;
238 
239   cached_has_bits = _impl_._has_bits_[0];
240   if (cached_has_bits & 0x0000000fu) {
241     if (cached_has_bits & 0x00000001u) {
242       _impl_.user_agent_.ClearNonDefaultToEmpty();
243     }
244     if (cached_has_bits & 0x00000002u) {
245       _impl_.storage_path_.ClearNonDefaultToEmpty();
246     }
247     if (cached_has_bits & 0x00000004u) {
248       _impl_.quic_default_user_agent_id_.ClearNonDefaultToEmpty();
249     }
250     if (cached_has_bits & 0x00000008u) {
251       _impl_.experimental_options_.ClearNonDefaultToEmpty();
252     }
253   }
254   if (cached_has_bits & 0x000000f0u) {
255     ::memset(&_impl_.quic_enabled_, 0, static_cast<size_t>(
256         reinterpret_cast<char*>(&_impl_.disable_cache_) -
257         reinterpret_cast<char*>(&_impl_.quic_enabled_)) + sizeof(_impl_.disable_cache_));
258   }
259   if (cached_has_bits & 0x00003f00u) {
260     ::memset(&_impl_.http_cache_mode_, 0, static_cast<size_t>(
261         reinterpret_cast<char*>(&_impl_.network_thread_priority_) -
262         reinterpret_cast<char*>(&_impl_.http_cache_mode_)) + sizeof(_impl_.network_thread_priority_));
263   }
264   _impl_._has_bits_.Clear();
265   _internal_metadata_.Clear<std::string>();
266 }
267 
_InternalParse(const char * ptr,::_pbi::ParseContext * ctx)268 const char* RequestContextConfigOptions::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) {
269 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
270   _Internal::HasBits has_bits{};
271   while (!ctx->Done(&ptr)) {
272     uint32_t tag;
273     ptr = ::_pbi::ReadTag(ptr, &tag);
274     switch (tag >> 3) {
275       // optional string user_agent = 1;
276       case 1:
277         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 10)) {
278           auto str = _internal_mutable_user_agent();
279           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
280           CHK_(ptr);
281         } else
282           goto handle_unusual;
283         continue;
284       // optional string storage_path = 2;
285       case 2:
286         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 18)) {
287           auto str = _internal_mutable_storage_path();
288           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
289           CHK_(ptr);
290         } else
291           goto handle_unusual;
292         continue;
293       // optional bool quic_enabled = 3;
294       case 3:
295         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 24)) {
296           _Internal::set_has_quic_enabled(&has_bits);
297           _impl_.quic_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
298           CHK_(ptr);
299         } else
300           goto handle_unusual;
301         continue;
302       // optional string quic_default_user_agent_id = 4;
303       case 4:
304         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 34)) {
305           auto str = _internal_mutable_quic_default_user_agent_id();
306           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
307           CHK_(ptr);
308         } else
309           goto handle_unusual;
310         continue;
311       // optional bool http2_enabled = 5;
312       case 5:
313         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
314           _Internal::set_has_http2_enabled(&has_bits);
315           _impl_.http2_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
316           CHK_(ptr);
317         } else
318           goto handle_unusual;
319         continue;
320       // optional bool brotli_enabled = 6;
321       case 6:
322         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 48)) {
323           _Internal::set_has_brotli_enabled(&has_bits);
324           _impl_.brotli_enabled_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
325           CHK_(ptr);
326         } else
327           goto handle_unusual;
328         continue;
329       // optional bool disable_cache = 7;
330       case 7:
331         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 56)) {
332           _Internal::set_has_disable_cache(&has_bits);
333           _impl_.disable_cache_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
334           CHK_(ptr);
335         } else
336           goto handle_unusual;
337         continue;
338       // optional int32 http_cache_mode = 8;
339       case 8:
340         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
341           _Internal::set_has_http_cache_mode(&has_bits);
342           _impl_.http_cache_mode_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
343           CHK_(ptr);
344         } else
345           goto handle_unusual;
346         continue;
347       // optional int64 http_cache_max_size = 9;
348       case 9:
349         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
350           _Internal::set_has_http_cache_max_size(&has_bits);
351           _impl_.http_cache_max_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
352           CHK_(ptr);
353         } else
354           goto handle_unusual;
355         continue;
356       // optional string experimental_options = 10;
357       case 10:
358         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 82)) {
359           auto str = _internal_mutable_experimental_options();
360           ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx);
361           CHK_(ptr);
362         } else
363           goto handle_unusual;
364         continue;
365       // optional int64 mock_cert_verifier = 11;
366       case 11:
367         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
368           _Internal::set_has_mock_cert_verifier(&has_bits);
369           _impl_.mock_cert_verifier_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
370           CHK_(ptr);
371         } else
372           goto handle_unusual;
373         continue;
374       // optional bool enable_network_quality_estimator = 12;
375       case 12:
376         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 96)) {
377           _Internal::set_has_enable_network_quality_estimator(&has_bits);
378           _impl_.enable_network_quality_estimator_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
379           CHK_(ptr);
380         } else
381           goto handle_unusual;
382         continue;
383       // optional bool bypass_public_key_pinning_for_local_trust_anchors = 13;
384       case 13:
385         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 104)) {
386           _Internal::set_has_bypass_public_key_pinning_for_local_trust_anchors(&has_bits);
387           _impl_.bypass_public_key_pinning_for_local_trust_anchors_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
388           CHK_(ptr);
389         } else
390           goto handle_unusual;
391         continue;
392       // optional int32 network_thread_priority = 14;
393       case 14:
394         if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 112)) {
395           _Internal::set_has_network_thread_priority(&has_bits);
396           _impl_.network_thread_priority_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
397           CHK_(ptr);
398         } else
399           goto handle_unusual;
400         continue;
401       default:
402         goto handle_unusual;
403     }  // switch
404   handle_unusual:
405     if ((tag == 0) || ((tag & 7) == 4)) {
406       CHK_(ptr);
407       ctx->SetLastTag(tag);
408       goto message_done;
409     }
410     ptr = UnknownFieldParse(
411         tag,
412         _internal_metadata_.mutable_unknown_fields<std::string>(),
413         ptr, ctx);
414     CHK_(ptr != nullptr);
415   }  // while
416 message_done:
417   _impl_._has_bits_.Or(has_bits);
418   return ptr;
419 failure:
420   ptr = nullptr;
421   goto message_done;
422 #undef CHK_
423 }
424 
_InternalSerialize(uint8_t * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const425 uint8_t* RequestContextConfigOptions::_InternalSerialize(
426     uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
427   // @@protoc_insertion_point(serialize_to_array_start:org.chromium.net.RequestContextConfigOptions)
428   uint32_t cached_has_bits = 0;
429   (void) cached_has_bits;
430 
431   cached_has_bits = _impl_._has_bits_[0];
432   // optional string user_agent = 1;
433   if (cached_has_bits & 0x00000001u) {
434     target = stream->WriteStringMaybeAliased(
435         1, this->_internal_user_agent(), target);
436   }
437 
438   // optional string storage_path = 2;
439   if (cached_has_bits & 0x00000002u) {
440     target = stream->WriteStringMaybeAliased(
441         2, this->_internal_storage_path(), target);
442   }
443 
444   // optional bool quic_enabled = 3;
445   if (cached_has_bits & 0x00000010u) {
446     target = stream->EnsureSpace(target);
447     target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_quic_enabled(), target);
448   }
449 
450   // optional string quic_default_user_agent_id = 4;
451   if (cached_has_bits & 0x00000004u) {
452     target = stream->WriteStringMaybeAliased(
453         4, this->_internal_quic_default_user_agent_id(), target);
454   }
455 
456   // optional bool http2_enabled = 5;
457   if (cached_has_bits & 0x00000020u) {
458     target = stream->EnsureSpace(target);
459     target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_http2_enabled(), target);
460   }
461 
462   // optional bool brotli_enabled = 6;
463   if (cached_has_bits & 0x00000040u) {
464     target = stream->EnsureSpace(target);
465     target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_brotli_enabled(), target);
466   }
467 
468   // optional bool disable_cache = 7;
469   if (cached_has_bits & 0x00000080u) {
470     target = stream->EnsureSpace(target);
471     target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_disable_cache(), target);
472   }
473 
474   // optional int32 http_cache_mode = 8;
475   if (cached_has_bits & 0x00000100u) {
476     target = stream->EnsureSpace(target);
477     target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_http_cache_mode(), target);
478   }
479 
480   // optional int64 http_cache_max_size = 9;
481   if (cached_has_bits & 0x00000200u) {
482     target = stream->EnsureSpace(target);
483     target = ::_pbi::WireFormatLite::WriteInt64ToArray(9, this->_internal_http_cache_max_size(), target);
484   }
485 
486   // optional string experimental_options = 10;
487   if (cached_has_bits & 0x00000008u) {
488     target = stream->WriteStringMaybeAliased(
489         10, this->_internal_experimental_options(), target);
490   }
491 
492   // optional int64 mock_cert_verifier = 11;
493   if (cached_has_bits & 0x00000400u) {
494     target = stream->EnsureSpace(target);
495     target = ::_pbi::WireFormatLite::WriteInt64ToArray(11, this->_internal_mock_cert_verifier(), target);
496   }
497 
498   // optional bool enable_network_quality_estimator = 12;
499   if (cached_has_bits & 0x00000800u) {
500     target = stream->EnsureSpace(target);
501     target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_enable_network_quality_estimator(), target);
502   }
503 
504   // optional bool bypass_public_key_pinning_for_local_trust_anchors = 13;
505   if (cached_has_bits & 0x00001000u) {
506     target = stream->EnsureSpace(target);
507     target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_bypass_public_key_pinning_for_local_trust_anchors(), target);
508   }
509 
510   // optional int32 network_thread_priority = 14;
511   if (cached_has_bits & 0x00002000u) {
512     target = stream->EnsureSpace(target);
513     target = ::_pbi::WireFormatLite::WriteInt32ToArray(14, this->_internal_network_thread_priority(), target);
514   }
515 
516   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
517     target = stream->WriteRaw(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).data(),
518         static_cast<int>(_internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size()), target);
519   }
520   // @@protoc_insertion_point(serialize_to_array_end:org.chromium.net.RequestContextConfigOptions)
521   return target;
522 }
523 
ByteSizeLong() const524 size_t RequestContextConfigOptions::ByteSizeLong() const {
525 // @@protoc_insertion_point(message_byte_size_start:org.chromium.net.RequestContextConfigOptions)
526   size_t total_size = 0;
527 
528   uint32_t cached_has_bits = 0;
529   // Prevent compiler warnings about cached_has_bits being unused
530   (void) cached_has_bits;
531 
532   cached_has_bits = _impl_._has_bits_[0];
533   if (cached_has_bits & 0x000000ffu) {
534     // optional string user_agent = 1;
535     if (cached_has_bits & 0x00000001u) {
536       total_size += 1 +
537         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
538           this->_internal_user_agent());
539     }
540 
541     // optional string storage_path = 2;
542     if (cached_has_bits & 0x00000002u) {
543       total_size += 1 +
544         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
545           this->_internal_storage_path());
546     }
547 
548     // optional string quic_default_user_agent_id = 4;
549     if (cached_has_bits & 0x00000004u) {
550       total_size += 1 +
551         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
552           this->_internal_quic_default_user_agent_id());
553     }
554 
555     // optional string experimental_options = 10;
556     if (cached_has_bits & 0x00000008u) {
557       total_size += 1 +
558         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
559           this->_internal_experimental_options());
560     }
561 
562     // optional bool quic_enabled = 3;
563     if (cached_has_bits & 0x00000010u) {
564       total_size += 1 + 1;
565     }
566 
567     // optional bool http2_enabled = 5;
568     if (cached_has_bits & 0x00000020u) {
569       total_size += 1 + 1;
570     }
571 
572     // optional bool brotli_enabled = 6;
573     if (cached_has_bits & 0x00000040u) {
574       total_size += 1 + 1;
575     }
576 
577     // optional bool disable_cache = 7;
578     if (cached_has_bits & 0x00000080u) {
579       total_size += 1 + 1;
580     }
581 
582   }
583   if (cached_has_bits & 0x00003f00u) {
584     // optional int32 http_cache_mode = 8;
585     if (cached_has_bits & 0x00000100u) {
586       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_http_cache_mode());
587     }
588 
589     // optional int64 http_cache_max_size = 9;
590     if (cached_has_bits & 0x00000200u) {
591       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_http_cache_max_size());
592     }
593 
594     // optional int64 mock_cert_verifier = 11;
595     if (cached_has_bits & 0x00000400u) {
596       total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_mock_cert_verifier());
597     }
598 
599     // optional bool enable_network_quality_estimator = 12;
600     if (cached_has_bits & 0x00000800u) {
601       total_size += 1 + 1;
602     }
603 
604     // optional bool bypass_public_key_pinning_for_local_trust_anchors = 13;
605     if (cached_has_bits & 0x00001000u) {
606       total_size += 1 + 1;
607     }
608 
609     // optional int32 network_thread_priority = 14;
610     if (cached_has_bits & 0x00002000u) {
611       total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_network_thread_priority());
612     }
613 
614   }
615   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
616     total_size += _internal_metadata_.unknown_fields<std::string>(::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString).size();
617   }
618   int cached_size = ::_pbi::ToCachedSize(total_size);
619   SetCachedSize(cached_size);
620   return total_size;
621 }
622 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)623 void RequestContextConfigOptions::CheckTypeAndMergeFrom(
624     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
625   MergeFrom(*::_pbi::DownCast<const RequestContextConfigOptions*>(
626       &from));
627 }
628 
MergeFrom(const RequestContextConfigOptions & from)629 void RequestContextConfigOptions::MergeFrom(const RequestContextConfigOptions& from) {
630   RequestContextConfigOptions* const _this = this;
631   // @@protoc_insertion_point(class_specific_merge_from_start:org.chromium.net.RequestContextConfigOptions)
632   GOOGLE_DCHECK_NE(&from, _this);
633   uint32_t cached_has_bits = 0;
634   (void) cached_has_bits;
635 
636   cached_has_bits = from._impl_._has_bits_[0];
637   if (cached_has_bits & 0x000000ffu) {
638     if (cached_has_bits & 0x00000001u) {
639       _this->_internal_set_user_agent(from._internal_user_agent());
640     }
641     if (cached_has_bits & 0x00000002u) {
642       _this->_internal_set_storage_path(from._internal_storage_path());
643     }
644     if (cached_has_bits & 0x00000004u) {
645       _this->_internal_set_quic_default_user_agent_id(from._internal_quic_default_user_agent_id());
646     }
647     if (cached_has_bits & 0x00000008u) {
648       _this->_internal_set_experimental_options(from._internal_experimental_options());
649     }
650     if (cached_has_bits & 0x00000010u) {
651       _this->_impl_.quic_enabled_ = from._impl_.quic_enabled_;
652     }
653     if (cached_has_bits & 0x00000020u) {
654       _this->_impl_.http2_enabled_ = from._impl_.http2_enabled_;
655     }
656     if (cached_has_bits & 0x00000040u) {
657       _this->_impl_.brotli_enabled_ = from._impl_.brotli_enabled_;
658     }
659     if (cached_has_bits & 0x00000080u) {
660       _this->_impl_.disable_cache_ = from._impl_.disable_cache_;
661     }
662     _this->_impl_._has_bits_[0] |= cached_has_bits;
663   }
664   if (cached_has_bits & 0x00003f00u) {
665     if (cached_has_bits & 0x00000100u) {
666       _this->_impl_.http_cache_mode_ = from._impl_.http_cache_mode_;
667     }
668     if (cached_has_bits & 0x00000200u) {
669       _this->_impl_.http_cache_max_size_ = from._impl_.http_cache_max_size_;
670     }
671     if (cached_has_bits & 0x00000400u) {
672       _this->_impl_.mock_cert_verifier_ = from._impl_.mock_cert_verifier_;
673     }
674     if (cached_has_bits & 0x00000800u) {
675       _this->_impl_.enable_network_quality_estimator_ = from._impl_.enable_network_quality_estimator_;
676     }
677     if (cached_has_bits & 0x00001000u) {
678       _this->_impl_.bypass_public_key_pinning_for_local_trust_anchors_ = from._impl_.bypass_public_key_pinning_for_local_trust_anchors_;
679     }
680     if (cached_has_bits & 0x00002000u) {
681       _this->_impl_.network_thread_priority_ = from._impl_.network_thread_priority_;
682     }
683     _this->_impl_._has_bits_[0] |= cached_has_bits;
684   }
685   _this->_internal_metadata_.MergeFrom<std::string>(from._internal_metadata_);
686 }
687 
CopyFrom(const RequestContextConfigOptions & from)688 void RequestContextConfigOptions::CopyFrom(const RequestContextConfigOptions& from) {
689 // @@protoc_insertion_point(class_specific_copy_from_start:org.chromium.net.RequestContextConfigOptions)
690   if (&from == this) return;
691   Clear();
692   MergeFrom(from);
693 }
694 
IsInitialized() const695 bool RequestContextConfigOptions::IsInitialized() const {
696   return true;
697 }
698 
InternalSwap(RequestContextConfigOptions * other)699 void RequestContextConfigOptions::InternalSwap(RequestContextConfigOptions* other) {
700   using std::swap;
701   auto* lhs_arena = GetArenaForAllocation();
702   auto* rhs_arena = other->GetArenaForAllocation();
703   _internal_metadata_.InternalSwap(&other->_internal_metadata_);
704   swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
705   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
706       &_impl_.user_agent_, lhs_arena,
707       &other->_impl_.user_agent_, rhs_arena
708   );
709   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
710       &_impl_.storage_path_, lhs_arena,
711       &other->_impl_.storage_path_, rhs_arena
712   );
713   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
714       &_impl_.quic_default_user_agent_id_, lhs_arena,
715       &other->_impl_.quic_default_user_agent_id_, rhs_arena
716   );
717   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap(
718       &_impl_.experimental_options_, lhs_arena,
719       &other->_impl_.experimental_options_, rhs_arena
720   );
721   ::PROTOBUF_NAMESPACE_ID::internal::memswap<
722       PROTOBUF_FIELD_OFFSET(RequestContextConfigOptions, _impl_.network_thread_priority_)
723       + sizeof(RequestContextConfigOptions::_impl_.network_thread_priority_)
724       - PROTOBUF_FIELD_OFFSET(RequestContextConfigOptions, _impl_.quic_enabled_)>(
725           reinterpret_cast<char*>(&_impl_.quic_enabled_),
726           reinterpret_cast<char*>(&other->_impl_.quic_enabled_));
727 }
728 
GetTypeName() const729 std::string RequestContextConfigOptions::GetTypeName() const {
730   return "org.chromium.net.RequestContextConfigOptions";
731 }
732 
733 
734 // @@protoc_insertion_point(namespace_scope)
735 }  // namespace net
736 }  // namespace chromium
737 }  // namespace org
738 PROTOBUF_NAMESPACE_OPEN
739 template<> PROTOBUF_NOINLINE ::org::chromium::net::RequestContextConfigOptions*
CreateMaybeMessage(Arena * arena)740 Arena::CreateMaybeMessage< ::org::chromium::net::RequestContextConfigOptions >(Arena* arena) {
741   return Arena::CreateMessageInternal< ::org::chromium::net::RequestContextConfigOptions >(arena);
742 }
743 PROTOBUF_NAMESPACE_CLOSE
744 
745 // @@protoc_insertion_point(global_scope)
746 #include <google/protobuf/port_undef.inc>
747