toolkit/components/downloads/csd.pb.cc

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Generated by the protocol buffer compiler. DO NOT EDIT!
michael@0 2
michael@0 3 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
michael@0 4 #include "csd.pb.h"
michael@0 5
michael@0 6 #include <algorithm>
michael@0 7
michael@0 8 #include <google/protobuf/stubs/once.h>
michael@0 9 #include <google/protobuf/io/coded_stream.h>
michael@0 10 #include <google/protobuf/wire_format_lite_inl.h>
michael@0 11 // @@protoc_insertion_point(includes)
michael@0 12
michael@0 13 namespace safe_browsing {
michael@0 14
michael@0 15 void protobuf_ShutdownFile_csd_2eproto() {
michael@0 16 delete ClientPhishingRequest::default_instance_;
michael@0 17 delete ClientPhishingRequest_Feature::default_instance_;
michael@0 18 delete ClientPhishingResponse::default_instance_;
michael@0 19 delete ClientMalwareRequest::default_instance_;
michael@0 20 delete ClientMalwareRequest_Feature::default_instance_;
michael@0 21 delete ClientMalwareResponse::default_instance_;
michael@0 22 delete ClientDownloadRequest::default_instance_;
michael@0 23 delete ClientDownloadRequest_Digests::default_instance_;
michael@0 24 delete ClientDownloadRequest_Resource::default_instance_;
michael@0 25 delete ClientDownloadRequest_CertificateChain::default_instance_;
michael@0 26 delete ClientDownloadRequest_CertificateChain_Element::default_instance_;
michael@0 27 delete ClientDownloadRequest_SignatureInfo::default_instance_;
michael@0 28 delete ClientDownloadResponse::default_instance_;
michael@0 29 delete ClientDownloadResponse_MoreInfo::default_instance_;
michael@0 30 delete ClientDownloadReport::default_instance_;
michael@0 31 delete ClientDownloadReport_UserInformation::default_instance_;
michael@0 32 delete ClientUploadResponse::default_instance_;
michael@0 33 }
michael@0 34
michael@0 35 void protobuf_AddDesc_csd_2eproto() {
michael@0 36 static bool already_here = false;
michael@0 37 if (already_here) return;
michael@0 38 already_here = true;
michael@0 39 GOOGLE_PROTOBUF_VERIFY_VERSION;
michael@0 40
michael@0 41 ClientPhishingRequest::default_instance_ = new ClientPhishingRequest();
michael@0 42 ClientPhishingRequest_Feature::default_instance_ = new ClientPhishingRequest_Feature();
michael@0 43 ClientPhishingResponse::default_instance_ = new ClientPhishingResponse();
michael@0 44 ClientMalwareRequest::default_instance_ = new ClientMalwareRequest();
michael@0 45 ClientMalwareRequest_Feature::default_instance_ = new ClientMalwareRequest_Feature();
michael@0 46 ClientMalwareResponse::default_instance_ = new ClientMalwareResponse();
michael@0 47 ClientDownloadRequest::default_instance_ = new ClientDownloadRequest();
michael@0 48 ClientDownloadRequest_Digests::default_instance_ = new ClientDownloadRequest_Digests();
michael@0 49 ClientDownloadRequest_Resource::default_instance_ = new ClientDownloadRequest_Resource();
michael@0 50 ClientDownloadRequest_CertificateChain::default_instance_ = new ClientDownloadRequest_CertificateChain();
michael@0 51 ClientDownloadRequest_CertificateChain_Element::default_instance_ = new ClientDownloadRequest_CertificateChain_Element();
michael@0 52 ClientDownloadRequest_SignatureInfo::default_instance_ = new ClientDownloadRequest_SignatureInfo();
michael@0 53 ClientDownloadResponse::default_instance_ = new ClientDownloadResponse();
michael@0 54 ClientDownloadResponse_MoreInfo::default_instance_ = new ClientDownloadResponse_MoreInfo();
michael@0 55 ClientDownloadReport::default_instance_ = new ClientDownloadReport();
michael@0 56 ClientDownloadReport_UserInformation::default_instance_ = new ClientDownloadReport_UserInformation();
michael@0 57 ClientUploadResponse::default_instance_ = new ClientUploadResponse();
michael@0 58 ClientPhishingRequest::default_instance_->InitAsDefaultInstance();
michael@0 59 ClientPhishingRequest_Feature::default_instance_->InitAsDefaultInstance();
michael@0 60 ClientPhishingResponse::default_instance_->InitAsDefaultInstance();
michael@0 61 ClientMalwareRequest::default_instance_->InitAsDefaultInstance();
michael@0 62 ClientMalwareRequest_Feature::default_instance_->InitAsDefaultInstance();
michael@0 63 ClientMalwareResponse::default_instance_->InitAsDefaultInstance();
michael@0 64 ClientDownloadRequest::default_instance_->InitAsDefaultInstance();
michael@0 65 ClientDownloadRequest_Digests::default_instance_->InitAsDefaultInstance();
michael@0 66 ClientDownloadRequest_Resource::default_instance_->InitAsDefaultInstance();
michael@0 67 ClientDownloadRequest_CertificateChain::default_instance_->InitAsDefaultInstance();
michael@0 68 ClientDownloadRequest_CertificateChain_Element::default_instance_->InitAsDefaultInstance();
michael@0 69 ClientDownloadRequest_SignatureInfo::default_instance_->InitAsDefaultInstance();
michael@0 70 ClientDownloadResponse::default_instance_->InitAsDefaultInstance();
michael@0 71 ClientDownloadResponse_MoreInfo::default_instance_->InitAsDefaultInstance();
michael@0 72 ClientDownloadReport::default_instance_->InitAsDefaultInstance();
michael@0 73 ClientDownloadReport_UserInformation::default_instance_->InitAsDefaultInstance();
michael@0 74 ClientUploadResponse::default_instance_->InitAsDefaultInstance();
michael@0 75 ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_csd_2eproto);
michael@0 76 }
michael@0 77
michael@0 78 // Force AddDescriptors() to be called at static initialization time.
michael@0 79 struct StaticDescriptorInitializer_csd_2eproto {
michael@0 80 StaticDescriptorInitializer_csd_2eproto() {
michael@0 81 protobuf_AddDesc_csd_2eproto();
michael@0 82 }
michael@0 83 } static_descriptor_initializer_csd_2eproto_;
michael@0 84
michael@0 85
michael@0 86 // ===================================================================
michael@0 87
michael@0 88 #ifndef _MSC_VER
michael@0 89 const int ClientPhishingRequest_Feature::kNameFieldNumber;
michael@0 90 const int ClientPhishingRequest_Feature::kValueFieldNumber;
michael@0 91 #endif // !_MSC_VER
michael@0 92
michael@0 93 ClientPhishingRequest_Feature::ClientPhishingRequest_Feature()
michael@0 94 : ::google::protobuf::MessageLite() {
michael@0 95 SharedCtor();
michael@0 96 }
michael@0 97
michael@0 98 void ClientPhishingRequest_Feature::InitAsDefaultInstance() {
michael@0 99 }
michael@0 100
michael@0 101 ClientPhishingRequest_Feature::ClientPhishingRequest_Feature(const ClientPhishingRequest_Feature& from)
michael@0 102 : ::google::protobuf::MessageLite() {
michael@0 103 SharedCtor();
michael@0 104 MergeFrom(from);
michael@0 105 }
michael@0 106
michael@0 107 void ClientPhishingRequest_Feature::SharedCtor() {
michael@0 108 _cached_size_ = 0;
michael@0 109 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 110 value_ = 0;
michael@0 111 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 112 }
michael@0 113
michael@0 114 ClientPhishingRequest_Feature::~ClientPhishingRequest_Feature() {
michael@0 115 SharedDtor();
michael@0 116 }
michael@0 117
michael@0 118 void ClientPhishingRequest_Feature::SharedDtor() {
michael@0 119 if (name_ != &::google::protobuf::internal::kEmptyString) {
michael@0 120 delete name_;
michael@0 121 }
michael@0 122 if (this != default_instance_) {
michael@0 123 }
michael@0 124 }
michael@0 125
michael@0 126 void ClientPhishingRequest_Feature::SetCachedSize(int size) const {
michael@0 127 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 128 _cached_size_ = size;
michael@0 129 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 130 }
michael@0 131 const ClientPhishingRequest_Feature& ClientPhishingRequest_Feature::default_instance() {
michael@0 132 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 133 }
michael@0 134
michael@0 135 ClientPhishingRequest_Feature* ClientPhishingRequest_Feature::default_instance_ = NULL;
michael@0 136
michael@0 137 ClientPhishingRequest_Feature* ClientPhishingRequest_Feature::New() const {
michael@0 138 return new ClientPhishingRequest_Feature;
michael@0 139 }
michael@0 140
michael@0 141 void ClientPhishingRequest_Feature::Clear() {
michael@0 142 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 143 if (has_name()) {
michael@0 144 if (name_ != &::google::protobuf::internal::kEmptyString) {
michael@0 145 name_->clear();
michael@0 146 }
michael@0 147 }
michael@0 148 value_ = 0;
michael@0 149 }
michael@0 150 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 151 }
michael@0 152
michael@0 153 bool ClientPhishingRequest_Feature::MergePartialFromCodedStream(
michael@0 154 ::google::protobuf::io::CodedInputStream* input) {
michael@0 155 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 156 ::google::protobuf::uint32 tag;
michael@0 157 while ((tag = input->ReadTag()) != 0) {
michael@0 158 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 159 // required string name = 1;
michael@0 160 case 1: {
michael@0 161 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 162 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 163 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 164 input, this->mutable_name()));
michael@0 165 } else {
michael@0 166 goto handle_uninterpreted;
michael@0 167 }
michael@0 168 if (input->ExpectTag(17)) goto parse_value;
michael@0 169 break;
michael@0 170 }
michael@0 171
michael@0 172 // required double value = 2;
michael@0 173 case 2: {
michael@0 174 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 175 ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
michael@0 176 parse_value:
michael@0 177 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 178 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
michael@0 179 input, &value_)));
michael@0 180 set_has_value();
michael@0 181 } else {
michael@0 182 goto handle_uninterpreted;
michael@0 183 }
michael@0 184 if (input->ExpectAtEnd()) return true;
michael@0 185 break;
michael@0 186 }
michael@0 187
michael@0 188 default: {
michael@0 189 handle_uninterpreted:
michael@0 190 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 191 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 192 return true;
michael@0 193 }
michael@0 194 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 195 break;
michael@0 196 }
michael@0 197 }
michael@0 198 }
michael@0 199 return true;
michael@0 200 #undef DO_
michael@0 201 }
michael@0 202
michael@0 203 void ClientPhishingRequest_Feature::SerializeWithCachedSizes(
michael@0 204 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 205 // required string name = 1;
michael@0 206 if (has_name()) {
michael@0 207 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 208 1, this->name(), output);
michael@0 209 }
michael@0 210
michael@0 211 // required double value = 2;
michael@0 212 if (has_value()) {
michael@0 213 ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output);
michael@0 214 }
michael@0 215
michael@0 216 }
michael@0 217
michael@0 218 int ClientPhishingRequest_Feature::ByteSize() const {
michael@0 219 int total_size = 0;
michael@0 220
michael@0 221 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 222 // required string name = 1;
michael@0 223 if (has_name()) {
michael@0 224 total_size += 1 +
michael@0 225 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 226 this->name());
michael@0 227 }
michael@0 228
michael@0 229 // required double value = 2;
michael@0 230 if (has_value()) {
michael@0 231 total_size += 1 + 8;
michael@0 232 }
michael@0 233
michael@0 234 }
michael@0 235 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 236 _cached_size_ = total_size;
michael@0 237 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 238 return total_size;
michael@0 239 }
michael@0 240
michael@0 241 void ClientPhishingRequest_Feature::CheckTypeAndMergeFrom(
michael@0 242 const ::google::protobuf::MessageLite& from) {
michael@0 243 MergeFrom(*::google::protobuf::down_cast<const ClientPhishingRequest_Feature*>(&from));
michael@0 244 }
michael@0 245
michael@0 246 void ClientPhishingRequest_Feature::MergeFrom(const ClientPhishingRequest_Feature& from) {
michael@0 247 GOOGLE_CHECK_NE(&from, this);
michael@0 248 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 249 if (from.has_name()) {
michael@0 250 set_name(from.name());
michael@0 251 }
michael@0 252 if (from.has_value()) {
michael@0 253 set_value(from.value());
michael@0 254 }
michael@0 255 }
michael@0 256 }
michael@0 257
michael@0 258 void ClientPhishingRequest_Feature::CopyFrom(const ClientPhishingRequest_Feature& from) {
michael@0 259 if (&from == this) return;
michael@0 260 Clear();
michael@0 261 MergeFrom(from);
michael@0 262 }
michael@0 263
michael@0 264 bool ClientPhishingRequest_Feature::IsInitialized() const {
michael@0 265 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
michael@0 266
michael@0 267 return true;
michael@0 268 }
michael@0 269
michael@0 270 void ClientPhishingRequest_Feature::Swap(ClientPhishingRequest_Feature* other) {
michael@0 271 if (other != this) {
michael@0 272 std::swap(name_, other->name_);
michael@0 273 std::swap(value_, other->value_);
michael@0 274 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 275 std::swap(_cached_size_, other->_cached_size_);
michael@0 276 }
michael@0 277 }
michael@0 278
michael@0 279 ::std::string ClientPhishingRequest_Feature::GetTypeName() const {
michael@0 280 return "safe_browsing.ClientPhishingRequest.Feature";
michael@0 281 }
michael@0 282
michael@0 283
michael@0 284 // -------------------------------------------------------------------
michael@0 285
michael@0 286 #ifndef _MSC_VER
michael@0 287 const int ClientPhishingRequest::kUrlFieldNumber;
michael@0 288 const int ClientPhishingRequest::kOBSOLETEHashPrefixFieldNumber;
michael@0 289 const int ClientPhishingRequest::kClientScoreFieldNumber;
michael@0 290 const int ClientPhishingRequest::kIsPhishingFieldNumber;
michael@0 291 const int ClientPhishingRequest::kFeatureMapFieldNumber;
michael@0 292 const int ClientPhishingRequest::kModelVersionFieldNumber;
michael@0 293 const int ClientPhishingRequest::kNonModelFeatureMapFieldNumber;
michael@0 294 const int ClientPhishingRequest::kOBSOLETEReferrerUrlFieldNumber;
michael@0 295 #endif // !_MSC_VER
michael@0 296
michael@0 297 ClientPhishingRequest::ClientPhishingRequest()
michael@0 298 : ::google::protobuf::MessageLite() {
michael@0 299 SharedCtor();
michael@0 300 }
michael@0 301
michael@0 302 void ClientPhishingRequest::InitAsDefaultInstance() {
michael@0 303 }
michael@0 304
michael@0 305 ClientPhishingRequest::ClientPhishingRequest(const ClientPhishingRequest& from)
michael@0 306 : ::google::protobuf::MessageLite() {
michael@0 307 SharedCtor();
michael@0 308 MergeFrom(from);
michael@0 309 }
michael@0 310
michael@0 311 void ClientPhishingRequest::SharedCtor() {
michael@0 312 _cached_size_ = 0;
michael@0 313 url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 314 obsolete_hash_prefix_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 315 client_score_ = 0;
michael@0 316 is_phishing_ = false;
michael@0 317 model_version_ = 0;
michael@0 318 obsolete_referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 319 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 320 }
michael@0 321
michael@0 322 ClientPhishingRequest::~ClientPhishingRequest() {
michael@0 323 SharedDtor();
michael@0 324 }
michael@0 325
michael@0 326 void ClientPhishingRequest::SharedDtor() {
michael@0 327 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 328 delete url_;
michael@0 329 }
michael@0 330 if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) {
michael@0 331 delete obsolete_hash_prefix_;
michael@0 332 }
michael@0 333 if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 334 delete obsolete_referrer_url_;
michael@0 335 }
michael@0 336 if (this != default_instance_) {
michael@0 337 }
michael@0 338 }
michael@0 339
michael@0 340 void ClientPhishingRequest::SetCachedSize(int size) const {
michael@0 341 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 342 _cached_size_ = size;
michael@0 343 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 344 }
michael@0 345 const ClientPhishingRequest& ClientPhishingRequest::default_instance() {
michael@0 346 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 347 }
michael@0 348
michael@0 349 ClientPhishingRequest* ClientPhishingRequest::default_instance_ = NULL;
michael@0 350
michael@0 351 ClientPhishingRequest* ClientPhishingRequest::New() const {
michael@0 352 return new ClientPhishingRequest;
michael@0 353 }
michael@0 354
michael@0 355 void ClientPhishingRequest::Clear() {
michael@0 356 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 357 if (has_url()) {
michael@0 358 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 359 url_->clear();
michael@0 360 }
michael@0 361 }
michael@0 362 if (has_obsolete_hash_prefix()) {
michael@0 363 if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) {
michael@0 364 obsolete_hash_prefix_->clear();
michael@0 365 }
michael@0 366 }
michael@0 367 client_score_ = 0;
michael@0 368 is_phishing_ = false;
michael@0 369 model_version_ = 0;
michael@0 370 if (has_obsolete_referrer_url()) {
michael@0 371 if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 372 obsolete_referrer_url_->clear();
michael@0 373 }
michael@0 374 }
michael@0 375 }
michael@0 376 feature_map_.Clear();
michael@0 377 non_model_feature_map_.Clear();
michael@0 378 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 379 }
michael@0 380
michael@0 381 bool ClientPhishingRequest::MergePartialFromCodedStream(
michael@0 382 ::google::protobuf::io::CodedInputStream* input) {
michael@0 383 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 384 ::google::protobuf::uint32 tag;
michael@0 385 while ((tag = input->ReadTag()) != 0) {
michael@0 386 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 387 // optional string url = 1;
michael@0 388 case 1: {
michael@0 389 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 390 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 391 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 392 input, this->mutable_url()));
michael@0 393 } else {
michael@0 394 goto handle_uninterpreted;
michael@0 395 }
michael@0 396 if (input->ExpectTag(21)) goto parse_client_score;
michael@0 397 break;
michael@0 398 }
michael@0 399
michael@0 400 // required float client_score = 2;
michael@0 401 case 2: {
michael@0 402 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 403 ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) {
michael@0 404 parse_client_score:
michael@0 405 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 406 float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
michael@0 407 input, &client_score_)));
michael@0 408 set_has_client_score();
michael@0 409 } else {
michael@0 410 goto handle_uninterpreted;
michael@0 411 }
michael@0 412 if (input->ExpectTag(32)) goto parse_is_phishing;
michael@0 413 break;
michael@0 414 }
michael@0 415
michael@0 416 // optional bool is_phishing = 4;
michael@0 417 case 4: {
michael@0 418 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 419 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 420 parse_is_phishing:
michael@0 421 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 422 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
michael@0 423 input, &is_phishing_)));
michael@0 424 set_has_is_phishing();
michael@0 425 } else {
michael@0 426 goto handle_uninterpreted;
michael@0 427 }
michael@0 428 if (input->ExpectTag(42)) goto parse_feature_map;
michael@0 429 break;
michael@0 430 }
michael@0 431
michael@0 432 // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5;
michael@0 433 case 5: {
michael@0 434 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 435 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 436 parse_feature_map:
michael@0 437 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 438 input, add_feature_map()));
michael@0 439 } else {
michael@0 440 goto handle_uninterpreted;
michael@0 441 }
michael@0 442 if (input->ExpectTag(42)) goto parse_feature_map;
michael@0 443 if (input->ExpectTag(48)) goto parse_model_version;
michael@0 444 break;
michael@0 445 }
michael@0 446
michael@0 447 // optional int32 model_version = 6;
michael@0 448 case 6: {
michael@0 449 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 450 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 451 parse_model_version:
michael@0 452 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 453 ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
michael@0 454 input, &model_version_)));
michael@0 455 set_has_model_version();
michael@0 456 } else {
michael@0 457 goto handle_uninterpreted;
michael@0 458 }
michael@0 459 if (input->ExpectTag(66)) goto parse_non_model_feature_map;
michael@0 460 break;
michael@0 461 }
michael@0 462
michael@0 463 // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8;
michael@0 464 case 8: {
michael@0 465 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 466 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 467 parse_non_model_feature_map:
michael@0 468 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 469 input, add_non_model_feature_map()));
michael@0 470 } else {
michael@0 471 goto handle_uninterpreted;
michael@0 472 }
michael@0 473 if (input->ExpectTag(66)) goto parse_non_model_feature_map;
michael@0 474 if (input->ExpectTag(74)) goto parse_OBSOLETE_referrer_url;
michael@0 475 break;
michael@0 476 }
michael@0 477
michael@0 478 // optional string OBSOLETE_referrer_url = 9;
michael@0 479 case 9: {
michael@0 480 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 481 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 482 parse_OBSOLETE_referrer_url:
michael@0 483 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 484 input, this->mutable_obsolete_referrer_url()));
michael@0 485 } else {
michael@0 486 goto handle_uninterpreted;
michael@0 487 }
michael@0 488 if (input->ExpectTag(82)) goto parse_OBSOLETE_hash_prefix;
michael@0 489 break;
michael@0 490 }
michael@0 491
michael@0 492 // optional bytes OBSOLETE_hash_prefix = 10;
michael@0 493 case 10: {
michael@0 494 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 495 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 496 parse_OBSOLETE_hash_prefix:
michael@0 497 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 498 input, this->mutable_obsolete_hash_prefix()));
michael@0 499 } else {
michael@0 500 goto handle_uninterpreted;
michael@0 501 }
michael@0 502 if (input->ExpectAtEnd()) return true;
michael@0 503 break;
michael@0 504 }
michael@0 505
michael@0 506 default: {
michael@0 507 handle_uninterpreted:
michael@0 508 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 509 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 510 return true;
michael@0 511 }
michael@0 512 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 513 break;
michael@0 514 }
michael@0 515 }
michael@0 516 }
michael@0 517 return true;
michael@0 518 #undef DO_
michael@0 519 }
michael@0 520
michael@0 521 void ClientPhishingRequest::SerializeWithCachedSizes(
michael@0 522 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 523 // optional string url = 1;
michael@0 524 if (has_url()) {
michael@0 525 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 526 1, this->url(), output);
michael@0 527 }
michael@0 528
michael@0 529 // required float client_score = 2;
michael@0 530 if (has_client_score()) {
michael@0 531 ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->client_score(), output);
michael@0 532 }
michael@0 533
michael@0 534 // optional bool is_phishing = 4;
michael@0 535 if (has_is_phishing()) {
michael@0 536 ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->is_phishing(), output);
michael@0 537 }
michael@0 538
michael@0 539 // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5;
michael@0 540 for (int i = 0; i < this->feature_map_size(); i++) {
michael@0 541 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 542 5, this->feature_map(i), output);
michael@0 543 }
michael@0 544
michael@0 545 // optional int32 model_version = 6;
michael@0 546 if (has_model_version()) {
michael@0 547 ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->model_version(), output);
michael@0 548 }
michael@0 549
michael@0 550 // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8;
michael@0 551 for (int i = 0; i < this->non_model_feature_map_size(); i++) {
michael@0 552 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 553 8, this->non_model_feature_map(i), output);
michael@0 554 }
michael@0 555
michael@0 556 // optional string OBSOLETE_referrer_url = 9;
michael@0 557 if (has_obsolete_referrer_url()) {
michael@0 558 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 559 9, this->obsolete_referrer_url(), output);
michael@0 560 }
michael@0 561
michael@0 562 // optional bytes OBSOLETE_hash_prefix = 10;
michael@0 563 if (has_obsolete_hash_prefix()) {
michael@0 564 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 565 10, this->obsolete_hash_prefix(), output);
michael@0 566 }
michael@0 567
michael@0 568 }
michael@0 569
michael@0 570 int ClientPhishingRequest::ByteSize() const {
michael@0 571 int total_size = 0;
michael@0 572
michael@0 573 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 574 // optional string url = 1;
michael@0 575 if (has_url()) {
michael@0 576 total_size += 1 +
michael@0 577 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 578 this->url());
michael@0 579 }
michael@0 580
michael@0 581 // optional bytes OBSOLETE_hash_prefix = 10;
michael@0 582 if (has_obsolete_hash_prefix()) {
michael@0 583 total_size += 1 +
michael@0 584 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 585 this->obsolete_hash_prefix());
michael@0 586 }
michael@0 587
michael@0 588 // required float client_score = 2;
michael@0 589 if (has_client_score()) {
michael@0 590 total_size += 1 + 4;
michael@0 591 }
michael@0 592
michael@0 593 // optional bool is_phishing = 4;
michael@0 594 if (has_is_phishing()) {
michael@0 595 total_size += 1 + 1;
michael@0 596 }
michael@0 597
michael@0 598 // optional int32 model_version = 6;
michael@0 599 if (has_model_version()) {
michael@0 600 total_size += 1 +
michael@0 601 ::google::protobuf::internal::WireFormatLite::Int32Size(
michael@0 602 this->model_version());
michael@0 603 }
michael@0 604
michael@0 605 // optional string OBSOLETE_referrer_url = 9;
michael@0 606 if (has_obsolete_referrer_url()) {
michael@0 607 total_size += 1 +
michael@0 608 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 609 this->obsolete_referrer_url());
michael@0 610 }
michael@0 611
michael@0 612 }
michael@0 613 // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5;
michael@0 614 total_size += 1 * this->feature_map_size();
michael@0 615 for (int i = 0; i < this->feature_map_size(); i++) {
michael@0 616 total_size +=
michael@0 617 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 618 this->feature_map(i));
michael@0 619 }
michael@0 620
michael@0 621 // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8;
michael@0 622 total_size += 1 * this->non_model_feature_map_size();
michael@0 623 for (int i = 0; i < this->non_model_feature_map_size(); i++) {
michael@0 624 total_size +=
michael@0 625 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 626 this->non_model_feature_map(i));
michael@0 627 }
michael@0 628
michael@0 629 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 630 _cached_size_ = total_size;
michael@0 631 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 632 return total_size;
michael@0 633 }
michael@0 634
michael@0 635 void ClientPhishingRequest::CheckTypeAndMergeFrom(
michael@0 636 const ::google::protobuf::MessageLite& from) {
michael@0 637 MergeFrom(*::google::protobuf::down_cast<const ClientPhishingRequest*>(&from));
michael@0 638 }
michael@0 639
michael@0 640 void ClientPhishingRequest::MergeFrom(const ClientPhishingRequest& from) {
michael@0 641 GOOGLE_CHECK_NE(&from, this);
michael@0 642 feature_map_.MergeFrom(from.feature_map_);
michael@0 643 non_model_feature_map_.MergeFrom(from.non_model_feature_map_);
michael@0 644 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 645 if (from.has_url()) {
michael@0 646 set_url(from.url());
michael@0 647 }
michael@0 648 if (from.has_obsolete_hash_prefix()) {
michael@0 649 set_obsolete_hash_prefix(from.obsolete_hash_prefix());
michael@0 650 }
michael@0 651 if (from.has_client_score()) {
michael@0 652 set_client_score(from.client_score());
michael@0 653 }
michael@0 654 if (from.has_is_phishing()) {
michael@0 655 set_is_phishing(from.is_phishing());
michael@0 656 }
michael@0 657 if (from.has_model_version()) {
michael@0 658 set_model_version(from.model_version());
michael@0 659 }
michael@0 660 if (from.has_obsolete_referrer_url()) {
michael@0 661 set_obsolete_referrer_url(from.obsolete_referrer_url());
michael@0 662 }
michael@0 663 }
michael@0 664 }
michael@0 665
michael@0 666 void ClientPhishingRequest::CopyFrom(const ClientPhishingRequest& from) {
michael@0 667 if (&from == this) return;
michael@0 668 Clear();
michael@0 669 MergeFrom(from);
michael@0 670 }
michael@0 671
michael@0 672 bool ClientPhishingRequest::IsInitialized() const {
michael@0 673 if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false;
michael@0 674
michael@0 675 for (int i = 0; i < feature_map_size(); i++) {
michael@0 676 if (!this->feature_map(i).IsInitialized()) return false;
michael@0 677 }
michael@0 678 for (int i = 0; i < non_model_feature_map_size(); i++) {
michael@0 679 if (!this->non_model_feature_map(i).IsInitialized()) return false;
michael@0 680 }
michael@0 681 return true;
michael@0 682 }
michael@0 683
michael@0 684 void ClientPhishingRequest::Swap(ClientPhishingRequest* other) {
michael@0 685 if (other != this) {
michael@0 686 std::swap(url_, other->url_);
michael@0 687 std::swap(obsolete_hash_prefix_, other->obsolete_hash_prefix_);
michael@0 688 std::swap(client_score_, other->client_score_);
michael@0 689 std::swap(is_phishing_, other->is_phishing_);
michael@0 690 feature_map_.Swap(&other->feature_map_);
michael@0 691 std::swap(model_version_, other->model_version_);
michael@0 692 non_model_feature_map_.Swap(&other->non_model_feature_map_);
michael@0 693 std::swap(obsolete_referrer_url_, other->obsolete_referrer_url_);
michael@0 694 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 695 std::swap(_cached_size_, other->_cached_size_);
michael@0 696 }
michael@0 697 }
michael@0 698
michael@0 699 ::std::string ClientPhishingRequest::GetTypeName() const {
michael@0 700 return "safe_browsing.ClientPhishingRequest";
michael@0 701 }
michael@0 702
michael@0 703
michael@0 704 // ===================================================================
michael@0 705
michael@0 706 #ifndef _MSC_VER
michael@0 707 const int ClientPhishingResponse::kPhishyFieldNumber;
michael@0 708 const int ClientPhishingResponse::kOBSOLETEWhitelistExpressionFieldNumber;
michael@0 709 #endif // !_MSC_VER
michael@0 710
michael@0 711 ClientPhishingResponse::ClientPhishingResponse()
michael@0 712 : ::google::protobuf::MessageLite() {
michael@0 713 SharedCtor();
michael@0 714 }
michael@0 715
michael@0 716 void ClientPhishingResponse::InitAsDefaultInstance() {
michael@0 717 }
michael@0 718
michael@0 719 ClientPhishingResponse::ClientPhishingResponse(const ClientPhishingResponse& from)
michael@0 720 : ::google::protobuf::MessageLite() {
michael@0 721 SharedCtor();
michael@0 722 MergeFrom(from);
michael@0 723 }
michael@0 724
michael@0 725 void ClientPhishingResponse::SharedCtor() {
michael@0 726 _cached_size_ = 0;
michael@0 727 phishy_ = false;
michael@0 728 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 729 }
michael@0 730
michael@0 731 ClientPhishingResponse::~ClientPhishingResponse() {
michael@0 732 SharedDtor();
michael@0 733 }
michael@0 734
michael@0 735 void ClientPhishingResponse::SharedDtor() {
michael@0 736 if (this != default_instance_) {
michael@0 737 }
michael@0 738 }
michael@0 739
michael@0 740 void ClientPhishingResponse::SetCachedSize(int size) const {
michael@0 741 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 742 _cached_size_ = size;
michael@0 743 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 744 }
michael@0 745 const ClientPhishingResponse& ClientPhishingResponse::default_instance() {
michael@0 746 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 747 }
michael@0 748
michael@0 749 ClientPhishingResponse* ClientPhishingResponse::default_instance_ = NULL;
michael@0 750
michael@0 751 ClientPhishingResponse* ClientPhishingResponse::New() const {
michael@0 752 return new ClientPhishingResponse;
michael@0 753 }
michael@0 754
michael@0 755 void ClientPhishingResponse::Clear() {
michael@0 756 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 757 phishy_ = false;
michael@0 758 }
michael@0 759 obsolete_whitelist_expression_.Clear();
michael@0 760 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 761 }
michael@0 762
michael@0 763 bool ClientPhishingResponse::MergePartialFromCodedStream(
michael@0 764 ::google::protobuf::io::CodedInputStream* input) {
michael@0 765 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 766 ::google::protobuf::uint32 tag;
michael@0 767 while ((tag = input->ReadTag()) != 0) {
michael@0 768 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 769 // required bool phishy = 1;
michael@0 770 case 1: {
michael@0 771 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 772 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 773 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 774 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
michael@0 775 input, &phishy_)));
michael@0 776 set_has_phishy();
michael@0 777 } else {
michael@0 778 goto handle_uninterpreted;
michael@0 779 }
michael@0 780 if (input->ExpectTag(18)) goto parse_OBSOLETE_whitelist_expression;
michael@0 781 break;
michael@0 782 }
michael@0 783
michael@0 784 // repeated string OBSOLETE_whitelist_expression = 2;
michael@0 785 case 2: {
michael@0 786 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 787 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 788 parse_OBSOLETE_whitelist_expression:
michael@0 789 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 790 input, this->add_obsolete_whitelist_expression()));
michael@0 791 } else {
michael@0 792 goto handle_uninterpreted;
michael@0 793 }
michael@0 794 if (input->ExpectTag(18)) goto parse_OBSOLETE_whitelist_expression;
michael@0 795 if (input->ExpectAtEnd()) return true;
michael@0 796 break;
michael@0 797 }
michael@0 798
michael@0 799 default: {
michael@0 800 handle_uninterpreted:
michael@0 801 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 802 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 803 return true;
michael@0 804 }
michael@0 805 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 806 break;
michael@0 807 }
michael@0 808 }
michael@0 809 }
michael@0 810 return true;
michael@0 811 #undef DO_
michael@0 812 }
michael@0 813
michael@0 814 void ClientPhishingResponse::SerializeWithCachedSizes(
michael@0 815 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 816 // required bool phishy = 1;
michael@0 817 if (has_phishy()) {
michael@0 818 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->phishy(), output);
michael@0 819 }
michael@0 820
michael@0 821 // repeated string OBSOLETE_whitelist_expression = 2;
michael@0 822 for (int i = 0; i < this->obsolete_whitelist_expression_size(); i++) {
michael@0 823 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 824 2, this->obsolete_whitelist_expression(i), output);
michael@0 825 }
michael@0 826
michael@0 827 }
michael@0 828
michael@0 829 int ClientPhishingResponse::ByteSize() const {
michael@0 830 int total_size = 0;
michael@0 831
michael@0 832 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 833 // required bool phishy = 1;
michael@0 834 if (has_phishy()) {
michael@0 835 total_size += 1 + 1;
michael@0 836 }
michael@0 837
michael@0 838 }
michael@0 839 // repeated string OBSOLETE_whitelist_expression = 2;
michael@0 840 total_size += 1 * this->obsolete_whitelist_expression_size();
michael@0 841 for (int i = 0; i < this->obsolete_whitelist_expression_size(); i++) {
michael@0 842 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 843 this->obsolete_whitelist_expression(i));
michael@0 844 }
michael@0 845
michael@0 846 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 847 _cached_size_ = total_size;
michael@0 848 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 849 return total_size;
michael@0 850 }
michael@0 851
michael@0 852 void ClientPhishingResponse::CheckTypeAndMergeFrom(
michael@0 853 const ::google::protobuf::MessageLite& from) {
michael@0 854 MergeFrom(*::google::protobuf::down_cast<const ClientPhishingResponse*>(&from));
michael@0 855 }
michael@0 856
michael@0 857 void ClientPhishingResponse::MergeFrom(const ClientPhishingResponse& from) {
michael@0 858 GOOGLE_CHECK_NE(&from, this);
michael@0 859 obsolete_whitelist_expression_.MergeFrom(from.obsolete_whitelist_expression_);
michael@0 860 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 861 if (from.has_phishy()) {
michael@0 862 set_phishy(from.phishy());
michael@0 863 }
michael@0 864 }
michael@0 865 }
michael@0 866
michael@0 867 void ClientPhishingResponse::CopyFrom(const ClientPhishingResponse& from) {
michael@0 868 if (&from == this) return;
michael@0 869 Clear();
michael@0 870 MergeFrom(from);
michael@0 871 }
michael@0 872
michael@0 873 bool ClientPhishingResponse::IsInitialized() const {
michael@0 874 if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
michael@0 875
michael@0 876 return true;
michael@0 877 }
michael@0 878
michael@0 879 void ClientPhishingResponse::Swap(ClientPhishingResponse* other) {
michael@0 880 if (other != this) {
michael@0 881 std::swap(phishy_, other->phishy_);
michael@0 882 obsolete_whitelist_expression_.Swap(&other->obsolete_whitelist_expression_);
michael@0 883 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 884 std::swap(_cached_size_, other->_cached_size_);
michael@0 885 }
michael@0 886 }
michael@0 887
michael@0 888 ::std::string ClientPhishingResponse::GetTypeName() const {
michael@0 889 return "safe_browsing.ClientPhishingResponse";
michael@0 890 }
michael@0 891
michael@0 892
michael@0 893 // ===================================================================
michael@0 894
michael@0 895 #ifndef _MSC_VER
michael@0 896 const int ClientMalwareRequest_Feature::kNameFieldNumber;
michael@0 897 const int ClientMalwareRequest_Feature::kValueFieldNumber;
michael@0 898 const int ClientMalwareRequest_Feature::kMetainfoFieldNumber;
michael@0 899 #endif // !_MSC_VER
michael@0 900
michael@0 901 ClientMalwareRequest_Feature::ClientMalwareRequest_Feature()
michael@0 902 : ::google::protobuf::MessageLite() {
michael@0 903 SharedCtor();
michael@0 904 }
michael@0 905
michael@0 906 void ClientMalwareRequest_Feature::InitAsDefaultInstance() {
michael@0 907 }
michael@0 908
michael@0 909 ClientMalwareRequest_Feature::ClientMalwareRequest_Feature(const ClientMalwareRequest_Feature& from)
michael@0 910 : ::google::protobuf::MessageLite() {
michael@0 911 SharedCtor();
michael@0 912 MergeFrom(from);
michael@0 913 }
michael@0 914
michael@0 915 void ClientMalwareRequest_Feature::SharedCtor() {
michael@0 916 _cached_size_ = 0;
michael@0 917 name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 918 value_ = 0;
michael@0 919 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 920 }
michael@0 921
michael@0 922 ClientMalwareRequest_Feature::~ClientMalwareRequest_Feature() {
michael@0 923 SharedDtor();
michael@0 924 }
michael@0 925
michael@0 926 void ClientMalwareRequest_Feature::SharedDtor() {
michael@0 927 if (name_ != &::google::protobuf::internal::kEmptyString) {
michael@0 928 delete name_;
michael@0 929 }
michael@0 930 if (this != default_instance_) {
michael@0 931 }
michael@0 932 }
michael@0 933
michael@0 934 void ClientMalwareRequest_Feature::SetCachedSize(int size) const {
michael@0 935 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 936 _cached_size_ = size;
michael@0 937 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 938 }
michael@0 939 const ClientMalwareRequest_Feature& ClientMalwareRequest_Feature::default_instance() {
michael@0 940 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 941 }
michael@0 942
michael@0 943 ClientMalwareRequest_Feature* ClientMalwareRequest_Feature::default_instance_ = NULL;
michael@0 944
michael@0 945 ClientMalwareRequest_Feature* ClientMalwareRequest_Feature::New() const {
michael@0 946 return new ClientMalwareRequest_Feature;
michael@0 947 }
michael@0 948
michael@0 949 void ClientMalwareRequest_Feature::Clear() {
michael@0 950 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 951 if (has_name()) {
michael@0 952 if (name_ != &::google::protobuf::internal::kEmptyString) {
michael@0 953 name_->clear();
michael@0 954 }
michael@0 955 }
michael@0 956 value_ = 0;
michael@0 957 }
michael@0 958 metainfo_.Clear();
michael@0 959 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 960 }
michael@0 961
michael@0 962 bool ClientMalwareRequest_Feature::MergePartialFromCodedStream(
michael@0 963 ::google::protobuf::io::CodedInputStream* input) {
michael@0 964 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 965 ::google::protobuf::uint32 tag;
michael@0 966 while ((tag = input->ReadTag()) != 0) {
michael@0 967 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 968 // required string name = 1;
michael@0 969 case 1: {
michael@0 970 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 971 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 972 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 973 input, this->mutable_name()));
michael@0 974 } else {
michael@0 975 goto handle_uninterpreted;
michael@0 976 }
michael@0 977 if (input->ExpectTag(17)) goto parse_value;
michael@0 978 break;
michael@0 979 }
michael@0 980
michael@0 981 // required double value = 2;
michael@0 982 case 2: {
michael@0 983 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 984 ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) {
michael@0 985 parse_value:
michael@0 986 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 987 double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
michael@0 988 input, &value_)));
michael@0 989 set_has_value();
michael@0 990 } else {
michael@0 991 goto handle_uninterpreted;
michael@0 992 }
michael@0 993 if (input->ExpectTag(26)) goto parse_metainfo;
michael@0 994 break;
michael@0 995 }
michael@0 996
michael@0 997 // repeated string metainfo = 3;
michael@0 998 case 3: {
michael@0 999 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1000 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1001 parse_metainfo:
michael@0 1002 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 1003 input, this->add_metainfo()));
michael@0 1004 } else {
michael@0 1005 goto handle_uninterpreted;
michael@0 1006 }
michael@0 1007 if (input->ExpectTag(26)) goto parse_metainfo;
michael@0 1008 if (input->ExpectAtEnd()) return true;
michael@0 1009 break;
michael@0 1010 }
michael@0 1011
michael@0 1012 default: {
michael@0 1013 handle_uninterpreted:
michael@0 1014 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1015 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 1016 return true;
michael@0 1017 }
michael@0 1018 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 1019 break;
michael@0 1020 }
michael@0 1021 }
michael@0 1022 }
michael@0 1023 return true;
michael@0 1024 #undef DO_
michael@0 1025 }
michael@0 1026
michael@0 1027 void ClientMalwareRequest_Feature::SerializeWithCachedSizes(
michael@0 1028 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 1029 // required string name = 1;
michael@0 1030 if (has_name()) {
michael@0 1031 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 1032 1, this->name(), output);
michael@0 1033 }
michael@0 1034
michael@0 1035 // required double value = 2;
michael@0 1036 if (has_value()) {
michael@0 1037 ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output);
michael@0 1038 }
michael@0 1039
michael@0 1040 // repeated string metainfo = 3;
michael@0 1041 for (int i = 0; i < this->metainfo_size(); i++) {
michael@0 1042 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 1043 3, this->metainfo(i), output);
michael@0 1044 }
michael@0 1045
michael@0 1046 }
michael@0 1047
michael@0 1048 int ClientMalwareRequest_Feature::ByteSize() const {
michael@0 1049 int total_size = 0;
michael@0 1050
michael@0 1051 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1052 // required string name = 1;
michael@0 1053 if (has_name()) {
michael@0 1054 total_size += 1 +
michael@0 1055 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 1056 this->name());
michael@0 1057 }
michael@0 1058
michael@0 1059 // required double value = 2;
michael@0 1060 if (has_value()) {
michael@0 1061 total_size += 1 + 8;
michael@0 1062 }
michael@0 1063
michael@0 1064 }
michael@0 1065 // repeated string metainfo = 3;
michael@0 1066 total_size += 1 * this->metainfo_size();
michael@0 1067 for (int i = 0; i < this->metainfo_size(); i++) {
michael@0 1068 total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 1069 this->metainfo(i));
michael@0 1070 }
michael@0 1071
michael@0 1072 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1073 _cached_size_ = total_size;
michael@0 1074 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1075 return total_size;
michael@0 1076 }
michael@0 1077
michael@0 1078 void ClientMalwareRequest_Feature::CheckTypeAndMergeFrom(
michael@0 1079 const ::google::protobuf::MessageLite& from) {
michael@0 1080 MergeFrom(*::google::protobuf::down_cast<const ClientMalwareRequest_Feature*>(&from));
michael@0 1081 }
michael@0 1082
michael@0 1083 void ClientMalwareRequest_Feature::MergeFrom(const ClientMalwareRequest_Feature& from) {
michael@0 1084 GOOGLE_CHECK_NE(&from, this);
michael@0 1085 metainfo_.MergeFrom(from.metainfo_);
michael@0 1086 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1087 if (from.has_name()) {
michael@0 1088 set_name(from.name());
michael@0 1089 }
michael@0 1090 if (from.has_value()) {
michael@0 1091 set_value(from.value());
michael@0 1092 }
michael@0 1093 }
michael@0 1094 }
michael@0 1095
michael@0 1096 void ClientMalwareRequest_Feature::CopyFrom(const ClientMalwareRequest_Feature& from) {
michael@0 1097 if (&from == this) return;
michael@0 1098 Clear();
michael@0 1099 MergeFrom(from);
michael@0 1100 }
michael@0 1101
michael@0 1102 bool ClientMalwareRequest_Feature::IsInitialized() const {
michael@0 1103 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
michael@0 1104
michael@0 1105 return true;
michael@0 1106 }
michael@0 1107
michael@0 1108 void ClientMalwareRequest_Feature::Swap(ClientMalwareRequest_Feature* other) {
michael@0 1109 if (other != this) {
michael@0 1110 std::swap(name_, other->name_);
michael@0 1111 std::swap(value_, other->value_);
michael@0 1112 metainfo_.Swap(&other->metainfo_);
michael@0 1113 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 1114 std::swap(_cached_size_, other->_cached_size_);
michael@0 1115 }
michael@0 1116 }
michael@0 1117
michael@0 1118 ::std::string ClientMalwareRequest_Feature::GetTypeName() const {
michael@0 1119 return "safe_browsing.ClientMalwareRequest.Feature";
michael@0 1120 }
michael@0 1121
michael@0 1122
michael@0 1123 // -------------------------------------------------------------------
michael@0 1124
michael@0 1125 #ifndef _MSC_VER
michael@0 1126 const int ClientMalwareRequest::kUrlFieldNumber;
michael@0 1127 const int ClientMalwareRequest::kFeatureMapFieldNumber;
michael@0 1128 const int ClientMalwareRequest::kReferrerUrlFieldNumber;
michael@0 1129 #endif // !_MSC_VER
michael@0 1130
michael@0 1131 ClientMalwareRequest::ClientMalwareRequest()
michael@0 1132 : ::google::protobuf::MessageLite() {
michael@0 1133 SharedCtor();
michael@0 1134 }
michael@0 1135
michael@0 1136 void ClientMalwareRequest::InitAsDefaultInstance() {
michael@0 1137 }
michael@0 1138
michael@0 1139 ClientMalwareRequest::ClientMalwareRequest(const ClientMalwareRequest& from)
michael@0 1140 : ::google::protobuf::MessageLite() {
michael@0 1141 SharedCtor();
michael@0 1142 MergeFrom(from);
michael@0 1143 }
michael@0 1144
michael@0 1145 void ClientMalwareRequest::SharedCtor() {
michael@0 1146 _cached_size_ = 0;
michael@0 1147 url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1148 referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1149 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1150 }
michael@0 1151
michael@0 1152 ClientMalwareRequest::~ClientMalwareRequest() {
michael@0 1153 SharedDtor();
michael@0 1154 }
michael@0 1155
michael@0 1156 void ClientMalwareRequest::SharedDtor() {
michael@0 1157 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1158 delete url_;
michael@0 1159 }
michael@0 1160 if (referrer_url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1161 delete referrer_url_;
michael@0 1162 }
michael@0 1163 if (this != default_instance_) {
michael@0 1164 }
michael@0 1165 }
michael@0 1166
michael@0 1167 void ClientMalwareRequest::SetCachedSize(int size) const {
michael@0 1168 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1169 _cached_size_ = size;
michael@0 1170 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1171 }
michael@0 1172 const ClientMalwareRequest& ClientMalwareRequest::default_instance() {
michael@0 1173 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 1174 }
michael@0 1175
michael@0 1176 ClientMalwareRequest* ClientMalwareRequest::default_instance_ = NULL;
michael@0 1177
michael@0 1178 ClientMalwareRequest* ClientMalwareRequest::New() const {
michael@0 1179 return new ClientMalwareRequest;
michael@0 1180 }
michael@0 1181
michael@0 1182 void ClientMalwareRequest::Clear() {
michael@0 1183 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1184 if (has_url()) {
michael@0 1185 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1186 url_->clear();
michael@0 1187 }
michael@0 1188 }
michael@0 1189 if (has_referrer_url()) {
michael@0 1190 if (referrer_url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1191 referrer_url_->clear();
michael@0 1192 }
michael@0 1193 }
michael@0 1194 }
michael@0 1195 feature_map_.Clear();
michael@0 1196 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1197 }
michael@0 1198
michael@0 1199 bool ClientMalwareRequest::MergePartialFromCodedStream(
michael@0 1200 ::google::protobuf::io::CodedInputStream* input) {
michael@0 1201 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 1202 ::google::protobuf::uint32 tag;
michael@0 1203 while ((tag = input->ReadTag()) != 0) {
michael@0 1204 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 1205 // required string url = 1;
michael@0 1206 case 1: {
michael@0 1207 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1208 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1209 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 1210 input, this->mutable_url()));
michael@0 1211 } else {
michael@0 1212 goto handle_uninterpreted;
michael@0 1213 }
michael@0 1214 if (input->ExpectTag(18)) goto parse_feature_map;
michael@0 1215 break;
michael@0 1216 }
michael@0 1217
michael@0 1218 // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2;
michael@0 1219 case 2: {
michael@0 1220 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1221 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1222 parse_feature_map:
michael@0 1223 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 1224 input, add_feature_map()));
michael@0 1225 } else {
michael@0 1226 goto handle_uninterpreted;
michael@0 1227 }
michael@0 1228 if (input->ExpectTag(18)) goto parse_feature_map;
michael@0 1229 if (input->ExpectTag(34)) goto parse_referrer_url;
michael@0 1230 break;
michael@0 1231 }
michael@0 1232
michael@0 1233 // optional string referrer_url = 4;
michael@0 1234 case 4: {
michael@0 1235 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1236 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1237 parse_referrer_url:
michael@0 1238 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 1239 input, this->mutable_referrer_url()));
michael@0 1240 } else {
michael@0 1241 goto handle_uninterpreted;
michael@0 1242 }
michael@0 1243 if (input->ExpectAtEnd()) return true;
michael@0 1244 break;
michael@0 1245 }
michael@0 1246
michael@0 1247 default: {
michael@0 1248 handle_uninterpreted:
michael@0 1249 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1250 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 1251 return true;
michael@0 1252 }
michael@0 1253 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 1254 break;
michael@0 1255 }
michael@0 1256 }
michael@0 1257 }
michael@0 1258 return true;
michael@0 1259 #undef DO_
michael@0 1260 }
michael@0 1261
michael@0 1262 void ClientMalwareRequest::SerializeWithCachedSizes(
michael@0 1263 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 1264 // required string url = 1;
michael@0 1265 if (has_url()) {
michael@0 1266 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 1267 1, this->url(), output);
michael@0 1268 }
michael@0 1269
michael@0 1270 // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2;
michael@0 1271 for (int i = 0; i < this->feature_map_size(); i++) {
michael@0 1272 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 1273 2, this->feature_map(i), output);
michael@0 1274 }
michael@0 1275
michael@0 1276 // optional string referrer_url = 4;
michael@0 1277 if (has_referrer_url()) {
michael@0 1278 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 1279 4, this->referrer_url(), output);
michael@0 1280 }
michael@0 1281
michael@0 1282 }
michael@0 1283
michael@0 1284 int ClientMalwareRequest::ByteSize() const {
michael@0 1285 int total_size = 0;
michael@0 1286
michael@0 1287 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1288 // required string url = 1;
michael@0 1289 if (has_url()) {
michael@0 1290 total_size += 1 +
michael@0 1291 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 1292 this->url());
michael@0 1293 }
michael@0 1294
michael@0 1295 // optional string referrer_url = 4;
michael@0 1296 if (has_referrer_url()) {
michael@0 1297 total_size += 1 +
michael@0 1298 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 1299 this->referrer_url());
michael@0 1300 }
michael@0 1301
michael@0 1302 }
michael@0 1303 // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2;
michael@0 1304 total_size += 1 * this->feature_map_size();
michael@0 1305 for (int i = 0; i < this->feature_map_size(); i++) {
michael@0 1306 total_size +=
michael@0 1307 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 1308 this->feature_map(i));
michael@0 1309 }
michael@0 1310
michael@0 1311 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1312 _cached_size_ = total_size;
michael@0 1313 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1314 return total_size;
michael@0 1315 }
michael@0 1316
michael@0 1317 void ClientMalwareRequest::CheckTypeAndMergeFrom(
michael@0 1318 const ::google::protobuf::MessageLite& from) {
michael@0 1319 MergeFrom(*::google::protobuf::down_cast<const ClientMalwareRequest*>(&from));
michael@0 1320 }
michael@0 1321
michael@0 1322 void ClientMalwareRequest::MergeFrom(const ClientMalwareRequest& from) {
michael@0 1323 GOOGLE_CHECK_NE(&from, this);
michael@0 1324 feature_map_.MergeFrom(from.feature_map_);
michael@0 1325 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1326 if (from.has_url()) {
michael@0 1327 set_url(from.url());
michael@0 1328 }
michael@0 1329 if (from.has_referrer_url()) {
michael@0 1330 set_referrer_url(from.referrer_url());
michael@0 1331 }
michael@0 1332 }
michael@0 1333 }
michael@0 1334
michael@0 1335 void ClientMalwareRequest::CopyFrom(const ClientMalwareRequest& from) {
michael@0 1336 if (&from == this) return;
michael@0 1337 Clear();
michael@0 1338 MergeFrom(from);
michael@0 1339 }
michael@0 1340
michael@0 1341 bool ClientMalwareRequest::IsInitialized() const {
michael@0 1342 if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
michael@0 1343
michael@0 1344 for (int i = 0; i < feature_map_size(); i++) {
michael@0 1345 if (!this->feature_map(i).IsInitialized()) return false;
michael@0 1346 }
michael@0 1347 return true;
michael@0 1348 }
michael@0 1349
michael@0 1350 void ClientMalwareRequest::Swap(ClientMalwareRequest* other) {
michael@0 1351 if (other != this) {
michael@0 1352 std::swap(url_, other->url_);
michael@0 1353 feature_map_.Swap(&other->feature_map_);
michael@0 1354 std::swap(referrer_url_, other->referrer_url_);
michael@0 1355 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 1356 std::swap(_cached_size_, other->_cached_size_);
michael@0 1357 }
michael@0 1358 }
michael@0 1359
michael@0 1360 ::std::string ClientMalwareRequest::GetTypeName() const {
michael@0 1361 return "safe_browsing.ClientMalwareRequest";
michael@0 1362 }
michael@0 1363
michael@0 1364
michael@0 1365 // ===================================================================
michael@0 1366
michael@0 1367 #ifndef _MSC_VER
michael@0 1368 const int ClientMalwareResponse::kBlacklistFieldNumber;
michael@0 1369 const int ClientMalwareResponse::kBadIpFieldNumber;
michael@0 1370 #endif // !_MSC_VER
michael@0 1371
michael@0 1372 ClientMalwareResponse::ClientMalwareResponse()
michael@0 1373 : ::google::protobuf::MessageLite() {
michael@0 1374 SharedCtor();
michael@0 1375 }
michael@0 1376
michael@0 1377 void ClientMalwareResponse::InitAsDefaultInstance() {
michael@0 1378 }
michael@0 1379
michael@0 1380 ClientMalwareResponse::ClientMalwareResponse(const ClientMalwareResponse& from)
michael@0 1381 : ::google::protobuf::MessageLite() {
michael@0 1382 SharedCtor();
michael@0 1383 MergeFrom(from);
michael@0 1384 }
michael@0 1385
michael@0 1386 void ClientMalwareResponse::SharedCtor() {
michael@0 1387 _cached_size_ = 0;
michael@0 1388 blacklist_ = false;
michael@0 1389 bad_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1390 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1391 }
michael@0 1392
michael@0 1393 ClientMalwareResponse::~ClientMalwareResponse() {
michael@0 1394 SharedDtor();
michael@0 1395 }
michael@0 1396
michael@0 1397 void ClientMalwareResponse::SharedDtor() {
michael@0 1398 if (bad_ip_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1399 delete bad_ip_;
michael@0 1400 }
michael@0 1401 if (this != default_instance_) {
michael@0 1402 }
michael@0 1403 }
michael@0 1404
michael@0 1405 void ClientMalwareResponse::SetCachedSize(int size) const {
michael@0 1406 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1407 _cached_size_ = size;
michael@0 1408 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1409 }
michael@0 1410 const ClientMalwareResponse& ClientMalwareResponse::default_instance() {
michael@0 1411 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 1412 }
michael@0 1413
michael@0 1414 ClientMalwareResponse* ClientMalwareResponse::default_instance_ = NULL;
michael@0 1415
michael@0 1416 ClientMalwareResponse* ClientMalwareResponse::New() const {
michael@0 1417 return new ClientMalwareResponse;
michael@0 1418 }
michael@0 1419
michael@0 1420 void ClientMalwareResponse::Clear() {
michael@0 1421 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1422 blacklist_ = false;
michael@0 1423 if (has_bad_ip()) {
michael@0 1424 if (bad_ip_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1425 bad_ip_->clear();
michael@0 1426 }
michael@0 1427 }
michael@0 1428 }
michael@0 1429 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1430 }
michael@0 1431
michael@0 1432 bool ClientMalwareResponse::MergePartialFromCodedStream(
michael@0 1433 ::google::protobuf::io::CodedInputStream* input) {
michael@0 1434 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 1435 ::google::protobuf::uint32 tag;
michael@0 1436 while ((tag = input->ReadTag()) != 0) {
michael@0 1437 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 1438 // required bool blacklist = 1;
michael@0 1439 case 1: {
michael@0 1440 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1441 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 1442 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 1443 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
michael@0 1444 input, &blacklist_)));
michael@0 1445 set_has_blacklist();
michael@0 1446 } else {
michael@0 1447 goto handle_uninterpreted;
michael@0 1448 }
michael@0 1449 if (input->ExpectTag(18)) goto parse_bad_ip;
michael@0 1450 break;
michael@0 1451 }
michael@0 1452
michael@0 1453 // optional string bad_ip = 2;
michael@0 1454 case 2: {
michael@0 1455 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1456 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1457 parse_bad_ip:
michael@0 1458 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 1459 input, this->mutable_bad_ip()));
michael@0 1460 } else {
michael@0 1461 goto handle_uninterpreted;
michael@0 1462 }
michael@0 1463 if (input->ExpectAtEnd()) return true;
michael@0 1464 break;
michael@0 1465 }
michael@0 1466
michael@0 1467 default: {
michael@0 1468 handle_uninterpreted:
michael@0 1469 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1470 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 1471 return true;
michael@0 1472 }
michael@0 1473 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 1474 break;
michael@0 1475 }
michael@0 1476 }
michael@0 1477 }
michael@0 1478 return true;
michael@0 1479 #undef DO_
michael@0 1480 }
michael@0 1481
michael@0 1482 void ClientMalwareResponse::SerializeWithCachedSizes(
michael@0 1483 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 1484 // required bool blacklist = 1;
michael@0 1485 if (has_blacklist()) {
michael@0 1486 ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->blacklist(), output);
michael@0 1487 }
michael@0 1488
michael@0 1489 // optional string bad_ip = 2;
michael@0 1490 if (has_bad_ip()) {
michael@0 1491 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 1492 2, this->bad_ip(), output);
michael@0 1493 }
michael@0 1494
michael@0 1495 }
michael@0 1496
michael@0 1497 int ClientMalwareResponse::ByteSize() const {
michael@0 1498 int total_size = 0;
michael@0 1499
michael@0 1500 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1501 // required bool blacklist = 1;
michael@0 1502 if (has_blacklist()) {
michael@0 1503 total_size += 1 + 1;
michael@0 1504 }
michael@0 1505
michael@0 1506 // optional string bad_ip = 2;
michael@0 1507 if (has_bad_ip()) {
michael@0 1508 total_size += 1 +
michael@0 1509 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 1510 this->bad_ip());
michael@0 1511 }
michael@0 1512
michael@0 1513 }
michael@0 1514 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1515 _cached_size_ = total_size;
michael@0 1516 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1517 return total_size;
michael@0 1518 }
michael@0 1519
michael@0 1520 void ClientMalwareResponse::CheckTypeAndMergeFrom(
michael@0 1521 const ::google::protobuf::MessageLite& from) {
michael@0 1522 MergeFrom(*::google::protobuf::down_cast<const ClientMalwareResponse*>(&from));
michael@0 1523 }
michael@0 1524
michael@0 1525 void ClientMalwareResponse::MergeFrom(const ClientMalwareResponse& from) {
michael@0 1526 GOOGLE_CHECK_NE(&from, this);
michael@0 1527 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1528 if (from.has_blacklist()) {
michael@0 1529 set_blacklist(from.blacklist());
michael@0 1530 }
michael@0 1531 if (from.has_bad_ip()) {
michael@0 1532 set_bad_ip(from.bad_ip());
michael@0 1533 }
michael@0 1534 }
michael@0 1535 }
michael@0 1536
michael@0 1537 void ClientMalwareResponse::CopyFrom(const ClientMalwareResponse& from) {
michael@0 1538 if (&from == this) return;
michael@0 1539 Clear();
michael@0 1540 MergeFrom(from);
michael@0 1541 }
michael@0 1542
michael@0 1543 bool ClientMalwareResponse::IsInitialized() const {
michael@0 1544 if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
michael@0 1545
michael@0 1546 return true;
michael@0 1547 }
michael@0 1548
michael@0 1549 void ClientMalwareResponse::Swap(ClientMalwareResponse* other) {
michael@0 1550 if (other != this) {
michael@0 1551 std::swap(blacklist_, other->blacklist_);
michael@0 1552 std::swap(bad_ip_, other->bad_ip_);
michael@0 1553 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 1554 std::swap(_cached_size_, other->_cached_size_);
michael@0 1555 }
michael@0 1556 }
michael@0 1557
michael@0 1558 ::std::string ClientMalwareResponse::GetTypeName() const {
michael@0 1559 return "safe_browsing.ClientMalwareResponse";
michael@0 1560 }
michael@0 1561
michael@0 1562
michael@0 1563 // ===================================================================
michael@0 1564
michael@0 1565 bool ClientDownloadRequest_ResourceType_IsValid(int value) {
michael@0 1566 switch(value) {
michael@0 1567 case 0:
michael@0 1568 case 1:
michael@0 1569 case 2:
michael@0 1570 case 3:
michael@0 1571 return true;
michael@0 1572 default:
michael@0 1573 return false;
michael@0 1574 }
michael@0 1575 }
michael@0 1576
michael@0 1577 #ifndef _MSC_VER
michael@0 1578 const ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_URL;
michael@0 1579 const ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_REDIRECT;
michael@0 1580 const ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_URL;
michael@0 1581 const ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_REDIRECT;
michael@0 1582 const ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MIN;
michael@0 1583 const ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MAX;
michael@0 1584 const int ClientDownloadRequest::ResourceType_ARRAYSIZE;
michael@0 1585 #endif // _MSC_VER
michael@0 1586 bool ClientDownloadRequest_DownloadType_IsValid(int value) {
michael@0 1587 switch(value) {
michael@0 1588 case 0:
michael@0 1589 case 1:
michael@0 1590 case 2:
michael@0 1591 case 3:
michael@0 1592 return true;
michael@0 1593 default:
michael@0 1594 return false;
michael@0 1595 }
michael@0 1596 }
michael@0 1597
michael@0 1598 #ifndef _MSC_VER
michael@0 1599 const ClientDownloadRequest_DownloadType ClientDownloadRequest::WIN_EXECUTABLE;
michael@0 1600 const ClientDownloadRequest_DownloadType ClientDownloadRequest::CHROME_EXTENSION;
michael@0 1601 const ClientDownloadRequest_DownloadType ClientDownloadRequest::ANDROID_APK;
michael@0 1602 const ClientDownloadRequest_DownloadType ClientDownloadRequest::ZIPPED_EXECUTABLE;
michael@0 1603 const ClientDownloadRequest_DownloadType ClientDownloadRequest::DownloadType_MIN;
michael@0 1604 const ClientDownloadRequest_DownloadType ClientDownloadRequest::DownloadType_MAX;
michael@0 1605 const int ClientDownloadRequest::DownloadType_ARRAYSIZE;
michael@0 1606 #endif // _MSC_VER
michael@0 1607 #ifndef _MSC_VER
michael@0 1608 const int ClientDownloadRequest_Digests::kSha256FieldNumber;
michael@0 1609 const int ClientDownloadRequest_Digests::kSha1FieldNumber;
michael@0 1610 const int ClientDownloadRequest_Digests::kMd5FieldNumber;
michael@0 1611 #endif // !_MSC_VER
michael@0 1612
michael@0 1613 ClientDownloadRequest_Digests::ClientDownloadRequest_Digests()
michael@0 1614 : ::google::protobuf::MessageLite() {
michael@0 1615 SharedCtor();
michael@0 1616 }
michael@0 1617
michael@0 1618 void ClientDownloadRequest_Digests::InitAsDefaultInstance() {
michael@0 1619 }
michael@0 1620
michael@0 1621 ClientDownloadRequest_Digests::ClientDownloadRequest_Digests(const ClientDownloadRequest_Digests& from)
michael@0 1622 : ::google::protobuf::MessageLite() {
michael@0 1623 SharedCtor();
michael@0 1624 MergeFrom(from);
michael@0 1625 }
michael@0 1626
michael@0 1627 void ClientDownloadRequest_Digests::SharedCtor() {
michael@0 1628 _cached_size_ = 0;
michael@0 1629 sha256_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1630 sha1_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1631 md5_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1632 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1633 }
michael@0 1634
michael@0 1635 ClientDownloadRequest_Digests::~ClientDownloadRequest_Digests() {
michael@0 1636 SharedDtor();
michael@0 1637 }
michael@0 1638
michael@0 1639 void ClientDownloadRequest_Digests::SharedDtor() {
michael@0 1640 if (sha256_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1641 delete sha256_;
michael@0 1642 }
michael@0 1643 if (sha1_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1644 delete sha1_;
michael@0 1645 }
michael@0 1646 if (md5_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1647 delete md5_;
michael@0 1648 }
michael@0 1649 if (this != default_instance_) {
michael@0 1650 }
michael@0 1651 }
michael@0 1652
michael@0 1653 void ClientDownloadRequest_Digests::SetCachedSize(int size) const {
michael@0 1654 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1655 _cached_size_ = size;
michael@0 1656 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1657 }
michael@0 1658 const ClientDownloadRequest_Digests& ClientDownloadRequest_Digests::default_instance() {
michael@0 1659 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 1660 }
michael@0 1661
michael@0 1662 ClientDownloadRequest_Digests* ClientDownloadRequest_Digests::default_instance_ = NULL;
michael@0 1663
michael@0 1664 ClientDownloadRequest_Digests* ClientDownloadRequest_Digests::New() const {
michael@0 1665 return new ClientDownloadRequest_Digests;
michael@0 1666 }
michael@0 1667
michael@0 1668 void ClientDownloadRequest_Digests::Clear() {
michael@0 1669 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1670 if (has_sha256()) {
michael@0 1671 if (sha256_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1672 sha256_->clear();
michael@0 1673 }
michael@0 1674 }
michael@0 1675 if (has_sha1()) {
michael@0 1676 if (sha1_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1677 sha1_->clear();
michael@0 1678 }
michael@0 1679 }
michael@0 1680 if (has_md5()) {
michael@0 1681 if (md5_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1682 md5_->clear();
michael@0 1683 }
michael@0 1684 }
michael@0 1685 }
michael@0 1686 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1687 }
michael@0 1688
michael@0 1689 bool ClientDownloadRequest_Digests::MergePartialFromCodedStream(
michael@0 1690 ::google::protobuf::io::CodedInputStream* input) {
michael@0 1691 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 1692 ::google::protobuf::uint32 tag;
michael@0 1693 while ((tag = input->ReadTag()) != 0) {
michael@0 1694 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 1695 // optional bytes sha256 = 1;
michael@0 1696 case 1: {
michael@0 1697 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1698 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1699 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 1700 input, this->mutable_sha256()));
michael@0 1701 } else {
michael@0 1702 goto handle_uninterpreted;
michael@0 1703 }
michael@0 1704 if (input->ExpectTag(18)) goto parse_sha1;
michael@0 1705 break;
michael@0 1706 }
michael@0 1707
michael@0 1708 // optional bytes sha1 = 2;
michael@0 1709 case 2: {
michael@0 1710 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1711 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1712 parse_sha1:
michael@0 1713 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 1714 input, this->mutable_sha1()));
michael@0 1715 } else {
michael@0 1716 goto handle_uninterpreted;
michael@0 1717 }
michael@0 1718 if (input->ExpectTag(26)) goto parse_md5;
michael@0 1719 break;
michael@0 1720 }
michael@0 1721
michael@0 1722 // optional bytes md5 = 3;
michael@0 1723 case 3: {
michael@0 1724 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1725 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1726 parse_md5:
michael@0 1727 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 1728 input, this->mutable_md5()));
michael@0 1729 } else {
michael@0 1730 goto handle_uninterpreted;
michael@0 1731 }
michael@0 1732 if (input->ExpectAtEnd()) return true;
michael@0 1733 break;
michael@0 1734 }
michael@0 1735
michael@0 1736 default: {
michael@0 1737 handle_uninterpreted:
michael@0 1738 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1739 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 1740 return true;
michael@0 1741 }
michael@0 1742 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 1743 break;
michael@0 1744 }
michael@0 1745 }
michael@0 1746 }
michael@0 1747 return true;
michael@0 1748 #undef DO_
michael@0 1749 }
michael@0 1750
michael@0 1751 void ClientDownloadRequest_Digests::SerializeWithCachedSizes(
michael@0 1752 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 1753 // optional bytes sha256 = 1;
michael@0 1754 if (has_sha256()) {
michael@0 1755 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 1756 1, this->sha256(), output);
michael@0 1757 }
michael@0 1758
michael@0 1759 // optional bytes sha1 = 2;
michael@0 1760 if (has_sha1()) {
michael@0 1761 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 1762 2, this->sha1(), output);
michael@0 1763 }
michael@0 1764
michael@0 1765 // optional bytes md5 = 3;
michael@0 1766 if (has_md5()) {
michael@0 1767 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 1768 3, this->md5(), output);
michael@0 1769 }
michael@0 1770
michael@0 1771 }
michael@0 1772
michael@0 1773 int ClientDownloadRequest_Digests::ByteSize() const {
michael@0 1774 int total_size = 0;
michael@0 1775
michael@0 1776 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1777 // optional bytes sha256 = 1;
michael@0 1778 if (has_sha256()) {
michael@0 1779 total_size += 1 +
michael@0 1780 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 1781 this->sha256());
michael@0 1782 }
michael@0 1783
michael@0 1784 // optional bytes sha1 = 2;
michael@0 1785 if (has_sha1()) {
michael@0 1786 total_size += 1 +
michael@0 1787 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 1788 this->sha1());
michael@0 1789 }
michael@0 1790
michael@0 1791 // optional bytes md5 = 3;
michael@0 1792 if (has_md5()) {
michael@0 1793 total_size += 1 +
michael@0 1794 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 1795 this->md5());
michael@0 1796 }
michael@0 1797
michael@0 1798 }
michael@0 1799 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1800 _cached_size_ = total_size;
michael@0 1801 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1802 return total_size;
michael@0 1803 }
michael@0 1804
michael@0 1805 void ClientDownloadRequest_Digests::CheckTypeAndMergeFrom(
michael@0 1806 const ::google::protobuf::MessageLite& from) {
michael@0 1807 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_Digests*>(&from));
michael@0 1808 }
michael@0 1809
michael@0 1810 void ClientDownloadRequest_Digests::MergeFrom(const ClientDownloadRequest_Digests& from) {
michael@0 1811 GOOGLE_CHECK_NE(&from, this);
michael@0 1812 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1813 if (from.has_sha256()) {
michael@0 1814 set_sha256(from.sha256());
michael@0 1815 }
michael@0 1816 if (from.has_sha1()) {
michael@0 1817 set_sha1(from.sha1());
michael@0 1818 }
michael@0 1819 if (from.has_md5()) {
michael@0 1820 set_md5(from.md5());
michael@0 1821 }
michael@0 1822 }
michael@0 1823 }
michael@0 1824
michael@0 1825 void ClientDownloadRequest_Digests::CopyFrom(const ClientDownloadRequest_Digests& from) {
michael@0 1826 if (&from == this) return;
michael@0 1827 Clear();
michael@0 1828 MergeFrom(from);
michael@0 1829 }
michael@0 1830
michael@0 1831 bool ClientDownloadRequest_Digests::IsInitialized() const {
michael@0 1832
michael@0 1833 return true;
michael@0 1834 }
michael@0 1835
michael@0 1836 void ClientDownloadRequest_Digests::Swap(ClientDownloadRequest_Digests* other) {
michael@0 1837 if (other != this) {
michael@0 1838 std::swap(sha256_, other->sha256_);
michael@0 1839 std::swap(sha1_, other->sha1_);
michael@0 1840 std::swap(md5_, other->md5_);
michael@0 1841 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 1842 std::swap(_cached_size_, other->_cached_size_);
michael@0 1843 }
michael@0 1844 }
michael@0 1845
michael@0 1846 ::std::string ClientDownloadRequest_Digests::GetTypeName() const {
michael@0 1847 return "safe_browsing.ClientDownloadRequest.Digests";
michael@0 1848 }
michael@0 1849
michael@0 1850
michael@0 1851 // -------------------------------------------------------------------
michael@0 1852
michael@0 1853 #ifndef _MSC_VER
michael@0 1854 const int ClientDownloadRequest_Resource::kUrlFieldNumber;
michael@0 1855 const int ClientDownloadRequest_Resource::kTypeFieldNumber;
michael@0 1856 const int ClientDownloadRequest_Resource::kRemoteIpFieldNumber;
michael@0 1857 const int ClientDownloadRequest_Resource::kReferrerFieldNumber;
michael@0 1858 #endif // !_MSC_VER
michael@0 1859
michael@0 1860 ClientDownloadRequest_Resource::ClientDownloadRequest_Resource()
michael@0 1861 : ::google::protobuf::MessageLite() {
michael@0 1862 SharedCtor();
michael@0 1863 }
michael@0 1864
michael@0 1865 void ClientDownloadRequest_Resource::InitAsDefaultInstance() {
michael@0 1866 }
michael@0 1867
michael@0 1868 ClientDownloadRequest_Resource::ClientDownloadRequest_Resource(const ClientDownloadRequest_Resource& from)
michael@0 1869 : ::google::protobuf::MessageLite() {
michael@0 1870 SharedCtor();
michael@0 1871 MergeFrom(from);
michael@0 1872 }
michael@0 1873
michael@0 1874 void ClientDownloadRequest_Resource::SharedCtor() {
michael@0 1875 _cached_size_ = 0;
michael@0 1876 url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1877 type_ = 0;
michael@0 1878 remote_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1879 referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 1880 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1881 }
michael@0 1882
michael@0 1883 ClientDownloadRequest_Resource::~ClientDownloadRequest_Resource() {
michael@0 1884 SharedDtor();
michael@0 1885 }
michael@0 1886
michael@0 1887 void ClientDownloadRequest_Resource::SharedDtor() {
michael@0 1888 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1889 delete url_;
michael@0 1890 }
michael@0 1891 if (remote_ip_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1892 delete remote_ip_;
michael@0 1893 }
michael@0 1894 if (referrer_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1895 delete referrer_;
michael@0 1896 }
michael@0 1897 if (this != default_instance_) {
michael@0 1898 }
michael@0 1899 }
michael@0 1900
michael@0 1901 void ClientDownloadRequest_Resource::SetCachedSize(int size) const {
michael@0 1902 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 1903 _cached_size_ = size;
michael@0 1904 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 1905 }
michael@0 1906 const ClientDownloadRequest_Resource& ClientDownloadRequest_Resource::default_instance() {
michael@0 1907 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 1908 }
michael@0 1909
michael@0 1910 ClientDownloadRequest_Resource* ClientDownloadRequest_Resource::default_instance_ = NULL;
michael@0 1911
michael@0 1912 ClientDownloadRequest_Resource* ClientDownloadRequest_Resource::New() const {
michael@0 1913 return new ClientDownloadRequest_Resource;
michael@0 1914 }
michael@0 1915
michael@0 1916 void ClientDownloadRequest_Resource::Clear() {
michael@0 1917 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 1918 if (has_url()) {
michael@0 1919 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1920 url_->clear();
michael@0 1921 }
michael@0 1922 }
michael@0 1923 type_ = 0;
michael@0 1924 if (has_remote_ip()) {
michael@0 1925 if (remote_ip_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1926 remote_ip_->clear();
michael@0 1927 }
michael@0 1928 }
michael@0 1929 if (has_referrer()) {
michael@0 1930 if (referrer_ != &::google::protobuf::internal::kEmptyString) {
michael@0 1931 referrer_->clear();
michael@0 1932 }
michael@0 1933 }
michael@0 1934 }
michael@0 1935 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 1936 }
michael@0 1937
michael@0 1938 bool ClientDownloadRequest_Resource::MergePartialFromCodedStream(
michael@0 1939 ::google::protobuf::io::CodedInputStream* input) {
michael@0 1940 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 1941 ::google::protobuf::uint32 tag;
michael@0 1942 while ((tag = input->ReadTag()) != 0) {
michael@0 1943 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 1944 // required string url = 1;
michael@0 1945 case 1: {
michael@0 1946 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1947 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1948 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 1949 input, this->mutable_url()));
michael@0 1950 } else {
michael@0 1951 goto handle_uninterpreted;
michael@0 1952 }
michael@0 1953 if (input->ExpectTag(16)) goto parse_type;
michael@0 1954 break;
michael@0 1955 }
michael@0 1956
michael@0 1957 // required .safe_browsing.ClientDownloadRequest.ResourceType type = 2;
michael@0 1958 case 2: {
michael@0 1959 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1960 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 1961 parse_type:
michael@0 1962 int value;
michael@0 1963 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 1964 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
michael@0 1965 input, &value)));
michael@0 1966 if (::safe_browsing::ClientDownloadRequest_ResourceType_IsValid(value)) {
michael@0 1967 set_type(static_cast< ::safe_browsing::ClientDownloadRequest_ResourceType >(value));
michael@0 1968 }
michael@0 1969 } else {
michael@0 1970 goto handle_uninterpreted;
michael@0 1971 }
michael@0 1972 if (input->ExpectTag(26)) goto parse_remote_ip;
michael@0 1973 break;
michael@0 1974 }
michael@0 1975
michael@0 1976 // optional bytes remote_ip = 3;
michael@0 1977 case 3: {
michael@0 1978 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1979 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1980 parse_remote_ip:
michael@0 1981 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 1982 input, this->mutable_remote_ip()));
michael@0 1983 } else {
michael@0 1984 goto handle_uninterpreted;
michael@0 1985 }
michael@0 1986 if (input->ExpectTag(34)) goto parse_referrer;
michael@0 1987 break;
michael@0 1988 }
michael@0 1989
michael@0 1990 // optional string referrer = 4;
michael@0 1991 case 4: {
michael@0 1992 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 1993 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 1994 parse_referrer:
michael@0 1995 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 1996 input, this->mutable_referrer()));
michael@0 1997 } else {
michael@0 1998 goto handle_uninterpreted;
michael@0 1999 }
michael@0 2000 if (input->ExpectAtEnd()) return true;
michael@0 2001 break;
michael@0 2002 }
michael@0 2003
michael@0 2004 default: {
michael@0 2005 handle_uninterpreted:
michael@0 2006 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2007 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 2008 return true;
michael@0 2009 }
michael@0 2010 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 2011 break;
michael@0 2012 }
michael@0 2013 }
michael@0 2014 }
michael@0 2015 return true;
michael@0 2016 #undef DO_
michael@0 2017 }
michael@0 2018
michael@0 2019 void ClientDownloadRequest_Resource::SerializeWithCachedSizes(
michael@0 2020 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 2021 // required string url = 1;
michael@0 2022 if (has_url()) {
michael@0 2023 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 2024 1, this->url(), output);
michael@0 2025 }
michael@0 2026
michael@0 2027 // required .safe_browsing.ClientDownloadRequest.ResourceType type = 2;
michael@0 2028 if (has_type()) {
michael@0 2029 ::google::protobuf::internal::WireFormatLite::WriteEnum(
michael@0 2030 2, this->type(), output);
michael@0 2031 }
michael@0 2032
michael@0 2033 // optional bytes remote_ip = 3;
michael@0 2034 if (has_remote_ip()) {
michael@0 2035 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 2036 3, this->remote_ip(), output);
michael@0 2037 }
michael@0 2038
michael@0 2039 // optional string referrer = 4;
michael@0 2040 if (has_referrer()) {
michael@0 2041 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 2042 4, this->referrer(), output);
michael@0 2043 }
michael@0 2044
michael@0 2045 }
michael@0 2046
michael@0 2047 int ClientDownloadRequest_Resource::ByteSize() const {
michael@0 2048 int total_size = 0;
michael@0 2049
michael@0 2050 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2051 // required string url = 1;
michael@0 2052 if (has_url()) {
michael@0 2053 total_size += 1 +
michael@0 2054 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 2055 this->url());
michael@0 2056 }
michael@0 2057
michael@0 2058 // required .safe_browsing.ClientDownloadRequest.ResourceType type = 2;
michael@0 2059 if (has_type()) {
michael@0 2060 total_size += 1 +
michael@0 2061 ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
michael@0 2062 }
michael@0 2063
michael@0 2064 // optional bytes remote_ip = 3;
michael@0 2065 if (has_remote_ip()) {
michael@0 2066 total_size += 1 +
michael@0 2067 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 2068 this->remote_ip());
michael@0 2069 }
michael@0 2070
michael@0 2071 // optional string referrer = 4;
michael@0 2072 if (has_referrer()) {
michael@0 2073 total_size += 1 +
michael@0 2074 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 2075 this->referrer());
michael@0 2076 }
michael@0 2077
michael@0 2078 }
michael@0 2079 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2080 _cached_size_ = total_size;
michael@0 2081 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2082 return total_size;
michael@0 2083 }
michael@0 2084
michael@0 2085 void ClientDownloadRequest_Resource::CheckTypeAndMergeFrom(
michael@0 2086 const ::google::protobuf::MessageLite& from) {
michael@0 2087 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_Resource*>(&from));
michael@0 2088 }
michael@0 2089
michael@0 2090 void ClientDownloadRequest_Resource::MergeFrom(const ClientDownloadRequest_Resource& from) {
michael@0 2091 GOOGLE_CHECK_NE(&from, this);
michael@0 2092 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2093 if (from.has_url()) {
michael@0 2094 set_url(from.url());
michael@0 2095 }
michael@0 2096 if (from.has_type()) {
michael@0 2097 set_type(from.type());
michael@0 2098 }
michael@0 2099 if (from.has_remote_ip()) {
michael@0 2100 set_remote_ip(from.remote_ip());
michael@0 2101 }
michael@0 2102 if (from.has_referrer()) {
michael@0 2103 set_referrer(from.referrer());
michael@0 2104 }
michael@0 2105 }
michael@0 2106 }
michael@0 2107
michael@0 2108 void ClientDownloadRequest_Resource::CopyFrom(const ClientDownloadRequest_Resource& from) {
michael@0 2109 if (&from == this) return;
michael@0 2110 Clear();
michael@0 2111 MergeFrom(from);
michael@0 2112 }
michael@0 2113
michael@0 2114 bool ClientDownloadRequest_Resource::IsInitialized() const {
michael@0 2115 if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
michael@0 2116
michael@0 2117 return true;
michael@0 2118 }
michael@0 2119
michael@0 2120 void ClientDownloadRequest_Resource::Swap(ClientDownloadRequest_Resource* other) {
michael@0 2121 if (other != this) {
michael@0 2122 std::swap(url_, other->url_);
michael@0 2123 std::swap(type_, other->type_);
michael@0 2124 std::swap(remote_ip_, other->remote_ip_);
michael@0 2125 std::swap(referrer_, other->referrer_);
michael@0 2126 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 2127 std::swap(_cached_size_, other->_cached_size_);
michael@0 2128 }
michael@0 2129 }
michael@0 2130
michael@0 2131 ::std::string ClientDownloadRequest_Resource::GetTypeName() const {
michael@0 2132 return "safe_browsing.ClientDownloadRequest.Resource";
michael@0 2133 }
michael@0 2134
michael@0 2135
michael@0 2136 // -------------------------------------------------------------------
michael@0 2137
michael@0 2138 #ifndef _MSC_VER
michael@0 2139 const int ClientDownloadRequest_CertificateChain_Element::kCertificateFieldNumber;
michael@0 2140 #endif // !_MSC_VER
michael@0 2141
michael@0 2142 ClientDownloadRequest_CertificateChain_Element::ClientDownloadRequest_CertificateChain_Element()
michael@0 2143 : ::google::protobuf::MessageLite() {
michael@0 2144 SharedCtor();
michael@0 2145 }
michael@0 2146
michael@0 2147 void ClientDownloadRequest_CertificateChain_Element::InitAsDefaultInstance() {
michael@0 2148 }
michael@0 2149
michael@0 2150 ClientDownloadRequest_CertificateChain_Element::ClientDownloadRequest_CertificateChain_Element(const ClientDownloadRequest_CertificateChain_Element& from)
michael@0 2151 : ::google::protobuf::MessageLite() {
michael@0 2152 SharedCtor();
michael@0 2153 MergeFrom(from);
michael@0 2154 }
michael@0 2155
michael@0 2156 void ClientDownloadRequest_CertificateChain_Element::SharedCtor() {
michael@0 2157 _cached_size_ = 0;
michael@0 2158 certificate_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 2159 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2160 }
michael@0 2161
michael@0 2162 ClientDownloadRequest_CertificateChain_Element::~ClientDownloadRequest_CertificateChain_Element() {
michael@0 2163 SharedDtor();
michael@0 2164 }
michael@0 2165
michael@0 2166 void ClientDownloadRequest_CertificateChain_Element::SharedDtor() {
michael@0 2167 if (certificate_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2168 delete certificate_;
michael@0 2169 }
michael@0 2170 if (this != default_instance_) {
michael@0 2171 }
michael@0 2172 }
michael@0 2173
michael@0 2174 void ClientDownloadRequest_CertificateChain_Element::SetCachedSize(int size) const {
michael@0 2175 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2176 _cached_size_ = size;
michael@0 2177 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2178 }
michael@0 2179 const ClientDownloadRequest_CertificateChain_Element& ClientDownloadRequest_CertificateChain_Element::default_instance() {
michael@0 2180 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 2181 }
michael@0 2182
michael@0 2183 ClientDownloadRequest_CertificateChain_Element* ClientDownloadRequest_CertificateChain_Element::default_instance_ = NULL;
michael@0 2184
michael@0 2185 ClientDownloadRequest_CertificateChain_Element* ClientDownloadRequest_CertificateChain_Element::New() const {
michael@0 2186 return new ClientDownloadRequest_CertificateChain_Element;
michael@0 2187 }
michael@0 2188
michael@0 2189 void ClientDownloadRequest_CertificateChain_Element::Clear() {
michael@0 2190 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2191 if (has_certificate()) {
michael@0 2192 if (certificate_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2193 certificate_->clear();
michael@0 2194 }
michael@0 2195 }
michael@0 2196 }
michael@0 2197 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2198 }
michael@0 2199
michael@0 2200 bool ClientDownloadRequest_CertificateChain_Element::MergePartialFromCodedStream(
michael@0 2201 ::google::protobuf::io::CodedInputStream* input) {
michael@0 2202 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 2203 ::google::protobuf::uint32 tag;
michael@0 2204 while ((tag = input->ReadTag()) != 0) {
michael@0 2205 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 2206 // optional bytes certificate = 1;
michael@0 2207 case 1: {
michael@0 2208 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2209 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2210 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 2211 input, this->mutable_certificate()));
michael@0 2212 } else {
michael@0 2213 goto handle_uninterpreted;
michael@0 2214 }
michael@0 2215 if (input->ExpectAtEnd()) return true;
michael@0 2216 break;
michael@0 2217 }
michael@0 2218
michael@0 2219 default: {
michael@0 2220 handle_uninterpreted:
michael@0 2221 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2222 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 2223 return true;
michael@0 2224 }
michael@0 2225 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 2226 break;
michael@0 2227 }
michael@0 2228 }
michael@0 2229 }
michael@0 2230 return true;
michael@0 2231 #undef DO_
michael@0 2232 }
michael@0 2233
michael@0 2234 void ClientDownloadRequest_CertificateChain_Element::SerializeWithCachedSizes(
michael@0 2235 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 2236 // optional bytes certificate = 1;
michael@0 2237 if (has_certificate()) {
michael@0 2238 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 2239 1, this->certificate(), output);
michael@0 2240 }
michael@0 2241
michael@0 2242 }
michael@0 2243
michael@0 2244 int ClientDownloadRequest_CertificateChain_Element::ByteSize() const {
michael@0 2245 int total_size = 0;
michael@0 2246
michael@0 2247 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2248 // optional bytes certificate = 1;
michael@0 2249 if (has_certificate()) {
michael@0 2250 total_size += 1 +
michael@0 2251 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 2252 this->certificate());
michael@0 2253 }
michael@0 2254
michael@0 2255 }
michael@0 2256 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2257 _cached_size_ = total_size;
michael@0 2258 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2259 return total_size;
michael@0 2260 }
michael@0 2261
michael@0 2262 void ClientDownloadRequest_CertificateChain_Element::CheckTypeAndMergeFrom(
michael@0 2263 const ::google::protobuf::MessageLite& from) {
michael@0 2264 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_CertificateChain_Element*>(&from));
michael@0 2265 }
michael@0 2266
michael@0 2267 void ClientDownloadRequest_CertificateChain_Element::MergeFrom(const ClientDownloadRequest_CertificateChain_Element& from) {
michael@0 2268 GOOGLE_CHECK_NE(&from, this);
michael@0 2269 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2270 if (from.has_certificate()) {
michael@0 2271 set_certificate(from.certificate());
michael@0 2272 }
michael@0 2273 }
michael@0 2274 }
michael@0 2275
michael@0 2276 void ClientDownloadRequest_CertificateChain_Element::CopyFrom(const ClientDownloadRequest_CertificateChain_Element& from) {
michael@0 2277 if (&from == this) return;
michael@0 2278 Clear();
michael@0 2279 MergeFrom(from);
michael@0 2280 }
michael@0 2281
michael@0 2282 bool ClientDownloadRequest_CertificateChain_Element::IsInitialized() const {
michael@0 2283
michael@0 2284 return true;
michael@0 2285 }
michael@0 2286
michael@0 2287 void ClientDownloadRequest_CertificateChain_Element::Swap(ClientDownloadRequest_CertificateChain_Element* other) {
michael@0 2288 if (other != this) {
michael@0 2289 std::swap(certificate_, other->certificate_);
michael@0 2290 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 2291 std::swap(_cached_size_, other->_cached_size_);
michael@0 2292 }
michael@0 2293 }
michael@0 2294
michael@0 2295 ::std::string ClientDownloadRequest_CertificateChain_Element::GetTypeName() const {
michael@0 2296 return "safe_browsing.ClientDownloadRequest.CertificateChain.Element";
michael@0 2297 }
michael@0 2298
michael@0 2299
michael@0 2300 // -------------------------------------------------------------------
michael@0 2301
michael@0 2302 #ifndef _MSC_VER
michael@0 2303 const int ClientDownloadRequest_CertificateChain::kElementFieldNumber;
michael@0 2304 #endif // !_MSC_VER
michael@0 2305
michael@0 2306 ClientDownloadRequest_CertificateChain::ClientDownloadRequest_CertificateChain()
michael@0 2307 : ::google::protobuf::MessageLite() {
michael@0 2308 SharedCtor();
michael@0 2309 }
michael@0 2310
michael@0 2311 void ClientDownloadRequest_CertificateChain::InitAsDefaultInstance() {
michael@0 2312 }
michael@0 2313
michael@0 2314 ClientDownloadRequest_CertificateChain::ClientDownloadRequest_CertificateChain(const ClientDownloadRequest_CertificateChain& from)
michael@0 2315 : ::google::protobuf::MessageLite() {
michael@0 2316 SharedCtor();
michael@0 2317 MergeFrom(from);
michael@0 2318 }
michael@0 2319
michael@0 2320 void ClientDownloadRequest_CertificateChain::SharedCtor() {
michael@0 2321 _cached_size_ = 0;
michael@0 2322 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2323 }
michael@0 2324
michael@0 2325 ClientDownloadRequest_CertificateChain::~ClientDownloadRequest_CertificateChain() {
michael@0 2326 SharedDtor();
michael@0 2327 }
michael@0 2328
michael@0 2329 void ClientDownloadRequest_CertificateChain::SharedDtor() {
michael@0 2330 if (this != default_instance_) {
michael@0 2331 }
michael@0 2332 }
michael@0 2333
michael@0 2334 void ClientDownloadRequest_CertificateChain::SetCachedSize(int size) const {
michael@0 2335 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2336 _cached_size_ = size;
michael@0 2337 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2338 }
michael@0 2339 const ClientDownloadRequest_CertificateChain& ClientDownloadRequest_CertificateChain::default_instance() {
michael@0 2340 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 2341 }
michael@0 2342
michael@0 2343 ClientDownloadRequest_CertificateChain* ClientDownloadRequest_CertificateChain::default_instance_ = NULL;
michael@0 2344
michael@0 2345 ClientDownloadRequest_CertificateChain* ClientDownloadRequest_CertificateChain::New() const {
michael@0 2346 return new ClientDownloadRequest_CertificateChain;
michael@0 2347 }
michael@0 2348
michael@0 2349 void ClientDownloadRequest_CertificateChain::Clear() {
michael@0 2350 element_.Clear();
michael@0 2351 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2352 }
michael@0 2353
michael@0 2354 bool ClientDownloadRequest_CertificateChain::MergePartialFromCodedStream(
michael@0 2355 ::google::protobuf::io::CodedInputStream* input) {
michael@0 2356 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 2357 ::google::protobuf::uint32 tag;
michael@0 2358 while ((tag = input->ReadTag()) != 0) {
michael@0 2359 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 2360 // repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1;
michael@0 2361 case 1: {
michael@0 2362 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2363 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2364 parse_element:
michael@0 2365 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 2366 input, add_element()));
michael@0 2367 } else {
michael@0 2368 goto handle_uninterpreted;
michael@0 2369 }
michael@0 2370 if (input->ExpectTag(10)) goto parse_element;
michael@0 2371 if (input->ExpectAtEnd()) return true;
michael@0 2372 break;
michael@0 2373 }
michael@0 2374
michael@0 2375 default: {
michael@0 2376 handle_uninterpreted:
michael@0 2377 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2378 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 2379 return true;
michael@0 2380 }
michael@0 2381 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 2382 break;
michael@0 2383 }
michael@0 2384 }
michael@0 2385 }
michael@0 2386 return true;
michael@0 2387 #undef DO_
michael@0 2388 }
michael@0 2389
michael@0 2390 void ClientDownloadRequest_CertificateChain::SerializeWithCachedSizes(
michael@0 2391 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 2392 // repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1;
michael@0 2393 for (int i = 0; i < this->element_size(); i++) {
michael@0 2394 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 2395 1, this->element(i), output);
michael@0 2396 }
michael@0 2397
michael@0 2398 }
michael@0 2399
michael@0 2400 int ClientDownloadRequest_CertificateChain::ByteSize() const {
michael@0 2401 int total_size = 0;
michael@0 2402
michael@0 2403 // repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1;
michael@0 2404 total_size += 1 * this->element_size();
michael@0 2405 for (int i = 0; i < this->element_size(); i++) {
michael@0 2406 total_size +=
michael@0 2407 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 2408 this->element(i));
michael@0 2409 }
michael@0 2410
michael@0 2411 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2412 _cached_size_ = total_size;
michael@0 2413 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2414 return total_size;
michael@0 2415 }
michael@0 2416
michael@0 2417 void ClientDownloadRequest_CertificateChain::CheckTypeAndMergeFrom(
michael@0 2418 const ::google::protobuf::MessageLite& from) {
michael@0 2419 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_CertificateChain*>(&from));
michael@0 2420 }
michael@0 2421
michael@0 2422 void ClientDownloadRequest_CertificateChain::MergeFrom(const ClientDownloadRequest_CertificateChain& from) {
michael@0 2423 GOOGLE_CHECK_NE(&from, this);
michael@0 2424 element_.MergeFrom(from.element_);
michael@0 2425 }
michael@0 2426
michael@0 2427 void ClientDownloadRequest_CertificateChain::CopyFrom(const ClientDownloadRequest_CertificateChain& from) {
michael@0 2428 if (&from == this) return;
michael@0 2429 Clear();
michael@0 2430 MergeFrom(from);
michael@0 2431 }
michael@0 2432
michael@0 2433 bool ClientDownloadRequest_CertificateChain::IsInitialized() const {
michael@0 2434
michael@0 2435 return true;
michael@0 2436 }
michael@0 2437
michael@0 2438 void ClientDownloadRequest_CertificateChain::Swap(ClientDownloadRequest_CertificateChain* other) {
michael@0 2439 if (other != this) {
michael@0 2440 element_.Swap(&other->element_);
michael@0 2441 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 2442 std::swap(_cached_size_, other->_cached_size_);
michael@0 2443 }
michael@0 2444 }
michael@0 2445
michael@0 2446 ::std::string ClientDownloadRequest_CertificateChain::GetTypeName() const {
michael@0 2447 return "safe_browsing.ClientDownloadRequest.CertificateChain";
michael@0 2448 }
michael@0 2449
michael@0 2450
michael@0 2451 // -------------------------------------------------------------------
michael@0 2452
michael@0 2453 #ifndef _MSC_VER
michael@0 2454 const int ClientDownloadRequest_SignatureInfo::kCertificateChainFieldNumber;
michael@0 2455 const int ClientDownloadRequest_SignatureInfo::kTrustedFieldNumber;
michael@0 2456 #endif // !_MSC_VER
michael@0 2457
michael@0 2458 ClientDownloadRequest_SignatureInfo::ClientDownloadRequest_SignatureInfo()
michael@0 2459 : ::google::protobuf::MessageLite() {
michael@0 2460 SharedCtor();
michael@0 2461 }
michael@0 2462
michael@0 2463 void ClientDownloadRequest_SignatureInfo::InitAsDefaultInstance() {
michael@0 2464 }
michael@0 2465
michael@0 2466 ClientDownloadRequest_SignatureInfo::ClientDownloadRequest_SignatureInfo(const ClientDownloadRequest_SignatureInfo& from)
michael@0 2467 : ::google::protobuf::MessageLite() {
michael@0 2468 SharedCtor();
michael@0 2469 MergeFrom(from);
michael@0 2470 }
michael@0 2471
michael@0 2472 void ClientDownloadRequest_SignatureInfo::SharedCtor() {
michael@0 2473 _cached_size_ = 0;
michael@0 2474 trusted_ = false;
michael@0 2475 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2476 }
michael@0 2477
michael@0 2478 ClientDownloadRequest_SignatureInfo::~ClientDownloadRequest_SignatureInfo() {
michael@0 2479 SharedDtor();
michael@0 2480 }
michael@0 2481
michael@0 2482 void ClientDownloadRequest_SignatureInfo::SharedDtor() {
michael@0 2483 if (this != default_instance_) {
michael@0 2484 }
michael@0 2485 }
michael@0 2486
michael@0 2487 void ClientDownloadRequest_SignatureInfo::SetCachedSize(int size) const {
michael@0 2488 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2489 _cached_size_ = size;
michael@0 2490 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2491 }
michael@0 2492 const ClientDownloadRequest_SignatureInfo& ClientDownloadRequest_SignatureInfo::default_instance() {
michael@0 2493 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 2494 }
michael@0 2495
michael@0 2496 ClientDownloadRequest_SignatureInfo* ClientDownloadRequest_SignatureInfo::default_instance_ = NULL;
michael@0 2497
michael@0 2498 ClientDownloadRequest_SignatureInfo* ClientDownloadRequest_SignatureInfo::New() const {
michael@0 2499 return new ClientDownloadRequest_SignatureInfo;
michael@0 2500 }
michael@0 2501
michael@0 2502 void ClientDownloadRequest_SignatureInfo::Clear() {
michael@0 2503 if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
michael@0 2504 trusted_ = false;
michael@0 2505 }
michael@0 2506 certificate_chain_.Clear();
michael@0 2507 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2508 }
michael@0 2509
michael@0 2510 bool ClientDownloadRequest_SignatureInfo::MergePartialFromCodedStream(
michael@0 2511 ::google::protobuf::io::CodedInputStream* input) {
michael@0 2512 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 2513 ::google::protobuf::uint32 tag;
michael@0 2514 while ((tag = input->ReadTag()) != 0) {
michael@0 2515 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 2516 // repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1;
michael@0 2517 case 1: {
michael@0 2518 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2519 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2520 parse_certificate_chain:
michael@0 2521 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 2522 input, add_certificate_chain()));
michael@0 2523 } else {
michael@0 2524 goto handle_uninterpreted;
michael@0 2525 }
michael@0 2526 if (input->ExpectTag(10)) goto parse_certificate_chain;
michael@0 2527 if (input->ExpectTag(16)) goto parse_trusted;
michael@0 2528 break;
michael@0 2529 }
michael@0 2530
michael@0 2531 // optional bool trusted = 2;
michael@0 2532 case 2: {
michael@0 2533 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2534 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 2535 parse_trusted:
michael@0 2536 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 2537 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
michael@0 2538 input, &trusted_)));
michael@0 2539 set_has_trusted();
michael@0 2540 } else {
michael@0 2541 goto handle_uninterpreted;
michael@0 2542 }
michael@0 2543 if (input->ExpectAtEnd()) return true;
michael@0 2544 break;
michael@0 2545 }
michael@0 2546
michael@0 2547 default: {
michael@0 2548 handle_uninterpreted:
michael@0 2549 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2550 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 2551 return true;
michael@0 2552 }
michael@0 2553 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 2554 break;
michael@0 2555 }
michael@0 2556 }
michael@0 2557 }
michael@0 2558 return true;
michael@0 2559 #undef DO_
michael@0 2560 }
michael@0 2561
michael@0 2562 void ClientDownloadRequest_SignatureInfo::SerializeWithCachedSizes(
michael@0 2563 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 2564 // repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1;
michael@0 2565 for (int i = 0; i < this->certificate_chain_size(); i++) {
michael@0 2566 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 2567 1, this->certificate_chain(i), output);
michael@0 2568 }
michael@0 2569
michael@0 2570 // optional bool trusted = 2;
michael@0 2571 if (has_trusted()) {
michael@0 2572 ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->trusted(), output);
michael@0 2573 }
michael@0 2574
michael@0 2575 }
michael@0 2576
michael@0 2577 int ClientDownloadRequest_SignatureInfo::ByteSize() const {
michael@0 2578 int total_size = 0;
michael@0 2579
michael@0 2580 if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
michael@0 2581 // optional bool trusted = 2;
michael@0 2582 if (has_trusted()) {
michael@0 2583 total_size += 1 + 1;
michael@0 2584 }
michael@0 2585
michael@0 2586 }
michael@0 2587 // repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1;
michael@0 2588 total_size += 1 * this->certificate_chain_size();
michael@0 2589 for (int i = 0; i < this->certificate_chain_size(); i++) {
michael@0 2590 total_size +=
michael@0 2591 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 2592 this->certificate_chain(i));
michael@0 2593 }
michael@0 2594
michael@0 2595 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2596 _cached_size_ = total_size;
michael@0 2597 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2598 return total_size;
michael@0 2599 }
michael@0 2600
michael@0 2601 void ClientDownloadRequest_SignatureInfo::CheckTypeAndMergeFrom(
michael@0 2602 const ::google::protobuf::MessageLite& from) {
michael@0 2603 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_SignatureInfo*>(&from));
michael@0 2604 }
michael@0 2605
michael@0 2606 void ClientDownloadRequest_SignatureInfo::MergeFrom(const ClientDownloadRequest_SignatureInfo& from) {
michael@0 2607 GOOGLE_CHECK_NE(&from, this);
michael@0 2608 certificate_chain_.MergeFrom(from.certificate_chain_);
michael@0 2609 if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
michael@0 2610 if (from.has_trusted()) {
michael@0 2611 set_trusted(from.trusted());
michael@0 2612 }
michael@0 2613 }
michael@0 2614 }
michael@0 2615
michael@0 2616 void ClientDownloadRequest_SignatureInfo::CopyFrom(const ClientDownloadRequest_SignatureInfo& from) {
michael@0 2617 if (&from == this) return;
michael@0 2618 Clear();
michael@0 2619 MergeFrom(from);
michael@0 2620 }
michael@0 2621
michael@0 2622 bool ClientDownloadRequest_SignatureInfo::IsInitialized() const {
michael@0 2623
michael@0 2624 return true;
michael@0 2625 }
michael@0 2626
michael@0 2627 void ClientDownloadRequest_SignatureInfo::Swap(ClientDownloadRequest_SignatureInfo* other) {
michael@0 2628 if (other != this) {
michael@0 2629 certificate_chain_.Swap(&other->certificate_chain_);
michael@0 2630 std::swap(trusted_, other->trusted_);
michael@0 2631 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 2632 std::swap(_cached_size_, other->_cached_size_);
michael@0 2633 }
michael@0 2634 }
michael@0 2635
michael@0 2636 ::std::string ClientDownloadRequest_SignatureInfo::GetTypeName() const {
michael@0 2637 return "safe_browsing.ClientDownloadRequest.SignatureInfo";
michael@0 2638 }
michael@0 2639
michael@0 2640
michael@0 2641 // -------------------------------------------------------------------
michael@0 2642
michael@0 2643 #ifndef _MSC_VER
michael@0 2644 const int ClientDownloadRequest::kUrlFieldNumber;
michael@0 2645 const int ClientDownloadRequest::kDigestsFieldNumber;
michael@0 2646 const int ClientDownloadRequest::kLengthFieldNumber;
michael@0 2647 const int ClientDownloadRequest::kResourcesFieldNumber;
michael@0 2648 const int ClientDownloadRequest::kSignatureFieldNumber;
michael@0 2649 const int ClientDownloadRequest::kUserInitiatedFieldNumber;
michael@0 2650 const int ClientDownloadRequest::kFileBasenameFieldNumber;
michael@0 2651 const int ClientDownloadRequest::kDownloadTypeFieldNumber;
michael@0 2652 const int ClientDownloadRequest::kLocaleFieldNumber;
michael@0 2653 #endif // !_MSC_VER
michael@0 2654
michael@0 2655 ClientDownloadRequest::ClientDownloadRequest()
michael@0 2656 : ::google::protobuf::MessageLite() {
michael@0 2657 SharedCtor();
michael@0 2658 }
michael@0 2659
michael@0 2660 void ClientDownloadRequest::InitAsDefaultInstance() {
michael@0 2661 digests_ = const_cast< ::safe_browsing::ClientDownloadRequest_Digests*>(&::safe_browsing::ClientDownloadRequest_Digests::default_instance());
michael@0 2662 signature_ = const_cast< ::safe_browsing::ClientDownloadRequest_SignatureInfo*>(&::safe_browsing::ClientDownloadRequest_SignatureInfo::default_instance());
michael@0 2663 }
michael@0 2664
michael@0 2665 ClientDownloadRequest::ClientDownloadRequest(const ClientDownloadRequest& from)
michael@0 2666 : ::google::protobuf::MessageLite() {
michael@0 2667 SharedCtor();
michael@0 2668 MergeFrom(from);
michael@0 2669 }
michael@0 2670
michael@0 2671 void ClientDownloadRequest::SharedCtor() {
michael@0 2672 _cached_size_ = 0;
michael@0 2673 url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 2674 digests_ = NULL;
michael@0 2675 length_ = GOOGLE_LONGLONG(0);
michael@0 2676 signature_ = NULL;
michael@0 2677 user_initiated_ = false;
michael@0 2678 file_basename_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 2679 download_type_ = 0;
michael@0 2680 locale_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 2681 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2682 }
michael@0 2683
michael@0 2684 ClientDownloadRequest::~ClientDownloadRequest() {
michael@0 2685 SharedDtor();
michael@0 2686 }
michael@0 2687
michael@0 2688 void ClientDownloadRequest::SharedDtor() {
michael@0 2689 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2690 delete url_;
michael@0 2691 }
michael@0 2692 if (file_basename_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2693 delete file_basename_;
michael@0 2694 }
michael@0 2695 if (locale_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2696 delete locale_;
michael@0 2697 }
michael@0 2698 if (this != default_instance_) {
michael@0 2699 delete digests_;
michael@0 2700 delete signature_;
michael@0 2701 }
michael@0 2702 }
michael@0 2703
michael@0 2704 void ClientDownloadRequest::SetCachedSize(int size) const {
michael@0 2705 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 2706 _cached_size_ = size;
michael@0 2707 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 2708 }
michael@0 2709 const ClientDownloadRequest& ClientDownloadRequest::default_instance() {
michael@0 2710 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 2711 }
michael@0 2712
michael@0 2713 ClientDownloadRequest* ClientDownloadRequest::default_instance_ = NULL;
michael@0 2714
michael@0 2715 ClientDownloadRequest* ClientDownloadRequest::New() const {
michael@0 2716 return new ClientDownloadRequest;
michael@0 2717 }
michael@0 2718
michael@0 2719 void ClientDownloadRequest::Clear() {
michael@0 2720 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2721 if (has_url()) {
michael@0 2722 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2723 url_->clear();
michael@0 2724 }
michael@0 2725 }
michael@0 2726 if (has_digests()) {
michael@0 2727 if (digests_ != NULL) digests_->::safe_browsing::ClientDownloadRequest_Digests::Clear();
michael@0 2728 }
michael@0 2729 length_ = GOOGLE_LONGLONG(0);
michael@0 2730 if (has_signature()) {
michael@0 2731 if (signature_ != NULL) signature_->::safe_browsing::ClientDownloadRequest_SignatureInfo::Clear();
michael@0 2732 }
michael@0 2733 user_initiated_ = false;
michael@0 2734 if (has_file_basename()) {
michael@0 2735 if (file_basename_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2736 file_basename_->clear();
michael@0 2737 }
michael@0 2738 }
michael@0 2739 download_type_ = 0;
michael@0 2740 }
michael@0 2741 if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
michael@0 2742 if (has_locale()) {
michael@0 2743 if (locale_ != &::google::protobuf::internal::kEmptyString) {
michael@0 2744 locale_->clear();
michael@0 2745 }
michael@0 2746 }
michael@0 2747 }
michael@0 2748 resources_.Clear();
michael@0 2749 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 2750 }
michael@0 2751
michael@0 2752 bool ClientDownloadRequest::MergePartialFromCodedStream(
michael@0 2753 ::google::protobuf::io::CodedInputStream* input) {
michael@0 2754 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 2755 ::google::protobuf::uint32 tag;
michael@0 2756 while ((tag = input->ReadTag()) != 0) {
michael@0 2757 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 2758 // required string url = 1;
michael@0 2759 case 1: {
michael@0 2760 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2761 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2762 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 2763 input, this->mutable_url()));
michael@0 2764 } else {
michael@0 2765 goto handle_uninterpreted;
michael@0 2766 }
michael@0 2767 if (input->ExpectTag(18)) goto parse_digests;
michael@0 2768 break;
michael@0 2769 }
michael@0 2770
michael@0 2771 // required .safe_browsing.ClientDownloadRequest.Digests digests = 2;
michael@0 2772 case 2: {
michael@0 2773 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2774 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2775 parse_digests:
michael@0 2776 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 2777 input, mutable_digests()));
michael@0 2778 } else {
michael@0 2779 goto handle_uninterpreted;
michael@0 2780 }
michael@0 2781 if (input->ExpectTag(24)) goto parse_length;
michael@0 2782 break;
michael@0 2783 }
michael@0 2784
michael@0 2785 // required int64 length = 3;
michael@0 2786 case 3: {
michael@0 2787 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2788 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 2789 parse_length:
michael@0 2790 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 2791 ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
michael@0 2792 input, &length_)));
michael@0 2793 set_has_length();
michael@0 2794 } else {
michael@0 2795 goto handle_uninterpreted;
michael@0 2796 }
michael@0 2797 if (input->ExpectTag(34)) goto parse_resources;
michael@0 2798 break;
michael@0 2799 }
michael@0 2800
michael@0 2801 // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4;
michael@0 2802 case 4: {
michael@0 2803 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2804 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2805 parse_resources:
michael@0 2806 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 2807 input, add_resources()));
michael@0 2808 } else {
michael@0 2809 goto handle_uninterpreted;
michael@0 2810 }
michael@0 2811 if (input->ExpectTag(34)) goto parse_resources;
michael@0 2812 if (input->ExpectTag(42)) goto parse_signature;
michael@0 2813 break;
michael@0 2814 }
michael@0 2815
michael@0 2816 // optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5;
michael@0 2817 case 5: {
michael@0 2818 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2819 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2820 parse_signature:
michael@0 2821 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 2822 input, mutable_signature()));
michael@0 2823 } else {
michael@0 2824 goto handle_uninterpreted;
michael@0 2825 }
michael@0 2826 if (input->ExpectTag(48)) goto parse_user_initiated;
michael@0 2827 break;
michael@0 2828 }
michael@0 2829
michael@0 2830 // optional bool user_initiated = 6;
michael@0 2831 case 6: {
michael@0 2832 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2833 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 2834 parse_user_initiated:
michael@0 2835 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 2836 bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
michael@0 2837 input, &user_initiated_)));
michael@0 2838 set_has_user_initiated();
michael@0 2839 } else {
michael@0 2840 goto handle_uninterpreted;
michael@0 2841 }
michael@0 2842 if (input->ExpectTag(74)) goto parse_file_basename;
michael@0 2843 break;
michael@0 2844 }
michael@0 2845
michael@0 2846 // optional string file_basename = 9;
michael@0 2847 case 9: {
michael@0 2848 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2849 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2850 parse_file_basename:
michael@0 2851 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 2852 input, this->mutable_file_basename()));
michael@0 2853 } else {
michael@0 2854 goto handle_uninterpreted;
michael@0 2855 }
michael@0 2856 if (input->ExpectTag(80)) goto parse_download_type;
michael@0 2857 break;
michael@0 2858 }
michael@0 2859
michael@0 2860 // optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE];
michael@0 2861 case 10: {
michael@0 2862 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2863 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 2864 parse_download_type:
michael@0 2865 int value;
michael@0 2866 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 2867 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
michael@0 2868 input, &value)));
michael@0 2869 if (::safe_browsing::ClientDownloadRequest_DownloadType_IsValid(value)) {
michael@0 2870 set_download_type(static_cast< ::safe_browsing::ClientDownloadRequest_DownloadType >(value));
michael@0 2871 }
michael@0 2872 } else {
michael@0 2873 goto handle_uninterpreted;
michael@0 2874 }
michael@0 2875 if (input->ExpectTag(90)) goto parse_locale;
michael@0 2876 break;
michael@0 2877 }
michael@0 2878
michael@0 2879 // optional string locale = 11;
michael@0 2880 case 11: {
michael@0 2881 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2882 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 2883 parse_locale:
michael@0 2884 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 2885 input, this->mutable_locale()));
michael@0 2886 } else {
michael@0 2887 goto handle_uninterpreted;
michael@0 2888 }
michael@0 2889 if (input->ExpectAtEnd()) return true;
michael@0 2890 break;
michael@0 2891 }
michael@0 2892
michael@0 2893 default: {
michael@0 2894 handle_uninterpreted:
michael@0 2895 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 2896 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 2897 return true;
michael@0 2898 }
michael@0 2899 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 2900 break;
michael@0 2901 }
michael@0 2902 }
michael@0 2903 }
michael@0 2904 return true;
michael@0 2905 #undef DO_
michael@0 2906 }
michael@0 2907
michael@0 2908 void ClientDownloadRequest::SerializeWithCachedSizes(
michael@0 2909 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 2910 // required string url = 1;
michael@0 2911 if (has_url()) {
michael@0 2912 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 2913 1, this->url(), output);
michael@0 2914 }
michael@0 2915
michael@0 2916 // required .safe_browsing.ClientDownloadRequest.Digests digests = 2;
michael@0 2917 if (has_digests()) {
michael@0 2918 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 2919 2, this->digests(), output);
michael@0 2920 }
michael@0 2921
michael@0 2922 // required int64 length = 3;
michael@0 2923 if (has_length()) {
michael@0 2924 ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->length(), output);
michael@0 2925 }
michael@0 2926
michael@0 2927 // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4;
michael@0 2928 for (int i = 0; i < this->resources_size(); i++) {
michael@0 2929 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 2930 4, this->resources(i), output);
michael@0 2931 }
michael@0 2932
michael@0 2933 // optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5;
michael@0 2934 if (has_signature()) {
michael@0 2935 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 2936 5, this->signature(), output);
michael@0 2937 }
michael@0 2938
michael@0 2939 // optional bool user_initiated = 6;
michael@0 2940 if (has_user_initiated()) {
michael@0 2941 ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->user_initiated(), output);
michael@0 2942 }
michael@0 2943
michael@0 2944 // optional string file_basename = 9;
michael@0 2945 if (has_file_basename()) {
michael@0 2946 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 2947 9, this->file_basename(), output);
michael@0 2948 }
michael@0 2949
michael@0 2950 // optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE];
michael@0 2951 if (has_download_type()) {
michael@0 2952 ::google::protobuf::internal::WireFormatLite::WriteEnum(
michael@0 2953 10, this->download_type(), output);
michael@0 2954 }
michael@0 2955
michael@0 2956 // optional string locale = 11;
michael@0 2957 if (has_locale()) {
michael@0 2958 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 2959 11, this->locale(), output);
michael@0 2960 }
michael@0 2961
michael@0 2962 }
michael@0 2963
michael@0 2964 int ClientDownloadRequest::ByteSize() const {
michael@0 2965 int total_size = 0;
michael@0 2966
michael@0 2967 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 2968 // required string url = 1;
michael@0 2969 if (has_url()) {
michael@0 2970 total_size += 1 +
michael@0 2971 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 2972 this->url());
michael@0 2973 }
michael@0 2974
michael@0 2975 // required .safe_browsing.ClientDownloadRequest.Digests digests = 2;
michael@0 2976 if (has_digests()) {
michael@0 2977 total_size += 1 +
michael@0 2978 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 2979 this->digests());
michael@0 2980 }
michael@0 2981
michael@0 2982 // required int64 length = 3;
michael@0 2983 if (has_length()) {
michael@0 2984 total_size += 1 +
michael@0 2985 ::google::protobuf::internal::WireFormatLite::Int64Size(
michael@0 2986 this->length());
michael@0 2987 }
michael@0 2988
michael@0 2989 // optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5;
michael@0 2990 if (has_signature()) {
michael@0 2991 total_size += 1 +
michael@0 2992 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 2993 this->signature());
michael@0 2994 }
michael@0 2995
michael@0 2996 // optional bool user_initiated = 6;
michael@0 2997 if (has_user_initiated()) {
michael@0 2998 total_size += 1 + 1;
michael@0 2999 }
michael@0 3000
michael@0 3001 // optional string file_basename = 9;
michael@0 3002 if (has_file_basename()) {
michael@0 3003 total_size += 1 +
michael@0 3004 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 3005 this->file_basename());
michael@0 3006 }
michael@0 3007
michael@0 3008 // optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE];
michael@0 3009 if (has_download_type()) {
michael@0 3010 total_size += 1 +
michael@0 3011 ::google::protobuf::internal::WireFormatLite::EnumSize(this->download_type());
michael@0 3012 }
michael@0 3013
michael@0 3014 }
michael@0 3015 if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
michael@0 3016 // optional string locale = 11;
michael@0 3017 if (has_locale()) {
michael@0 3018 total_size += 1 +
michael@0 3019 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 3020 this->locale());
michael@0 3021 }
michael@0 3022
michael@0 3023 }
michael@0 3024 // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4;
michael@0 3025 total_size += 1 * this->resources_size();
michael@0 3026 for (int i = 0; i < this->resources_size(); i++) {
michael@0 3027 total_size +=
michael@0 3028 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 3029 this->resources(i));
michael@0 3030 }
michael@0 3031
michael@0 3032 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3033 _cached_size_ = total_size;
michael@0 3034 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3035 return total_size;
michael@0 3036 }
michael@0 3037
michael@0 3038 void ClientDownloadRequest::CheckTypeAndMergeFrom(
michael@0 3039 const ::google::protobuf::MessageLite& from) {
michael@0 3040 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest*>(&from));
michael@0 3041 }
michael@0 3042
michael@0 3043 void ClientDownloadRequest::MergeFrom(const ClientDownloadRequest& from) {
michael@0 3044 GOOGLE_CHECK_NE(&from, this);
michael@0 3045 resources_.MergeFrom(from.resources_);
michael@0 3046 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3047 if (from.has_url()) {
michael@0 3048 set_url(from.url());
michael@0 3049 }
michael@0 3050 if (from.has_digests()) {
michael@0 3051 mutable_digests()->::safe_browsing::ClientDownloadRequest_Digests::MergeFrom(from.digests());
michael@0 3052 }
michael@0 3053 if (from.has_length()) {
michael@0 3054 set_length(from.length());
michael@0 3055 }
michael@0 3056 if (from.has_signature()) {
michael@0 3057 mutable_signature()->::safe_browsing::ClientDownloadRequest_SignatureInfo::MergeFrom(from.signature());
michael@0 3058 }
michael@0 3059 if (from.has_user_initiated()) {
michael@0 3060 set_user_initiated(from.user_initiated());
michael@0 3061 }
michael@0 3062 if (from.has_file_basename()) {
michael@0 3063 set_file_basename(from.file_basename());
michael@0 3064 }
michael@0 3065 if (from.has_download_type()) {
michael@0 3066 set_download_type(from.download_type());
michael@0 3067 }
michael@0 3068 }
michael@0 3069 if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
michael@0 3070 if (from.has_locale()) {
michael@0 3071 set_locale(from.locale());
michael@0 3072 }
michael@0 3073 }
michael@0 3074 }
michael@0 3075
michael@0 3076 void ClientDownloadRequest::CopyFrom(const ClientDownloadRequest& from) {
michael@0 3077 if (&from == this) return;
michael@0 3078 Clear();
michael@0 3079 MergeFrom(from);
michael@0 3080 }
michael@0 3081
michael@0 3082 bool ClientDownloadRequest::IsInitialized() const {
michael@0 3083 if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
michael@0 3084
michael@0 3085 for (int i = 0; i < resources_size(); i++) {
michael@0 3086 if (!this->resources(i).IsInitialized()) return false;
michael@0 3087 }
michael@0 3088 return true;
michael@0 3089 }
michael@0 3090
michael@0 3091 void ClientDownloadRequest::Swap(ClientDownloadRequest* other) {
michael@0 3092 if (other != this) {
michael@0 3093 std::swap(url_, other->url_);
michael@0 3094 std::swap(digests_, other->digests_);
michael@0 3095 std::swap(length_, other->length_);
michael@0 3096 resources_.Swap(&other->resources_);
michael@0 3097 std::swap(signature_, other->signature_);
michael@0 3098 std::swap(user_initiated_, other->user_initiated_);
michael@0 3099 std::swap(file_basename_, other->file_basename_);
michael@0 3100 std::swap(download_type_, other->download_type_);
michael@0 3101 std::swap(locale_, other->locale_);
michael@0 3102 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 3103 std::swap(_cached_size_, other->_cached_size_);
michael@0 3104 }
michael@0 3105 }
michael@0 3106
michael@0 3107 ::std::string ClientDownloadRequest::GetTypeName() const {
michael@0 3108 return "safe_browsing.ClientDownloadRequest";
michael@0 3109 }
michael@0 3110
michael@0 3111
michael@0 3112 // ===================================================================
michael@0 3113
michael@0 3114 bool ClientDownloadResponse_Verdict_IsValid(int value) {
michael@0 3115 switch(value) {
michael@0 3116 case 0:
michael@0 3117 case 1:
michael@0 3118 case 2:
michael@0 3119 case 3:
michael@0 3120 case 4:
michael@0 3121 return true;
michael@0 3122 default:
michael@0 3123 return false;
michael@0 3124 }
michael@0 3125 }
michael@0 3126
michael@0 3127 #ifndef _MSC_VER
michael@0 3128 const ClientDownloadResponse_Verdict ClientDownloadResponse::SAFE;
michael@0 3129 const ClientDownloadResponse_Verdict ClientDownloadResponse::DANGEROUS;
michael@0 3130 const ClientDownloadResponse_Verdict ClientDownloadResponse::UNCOMMON;
michael@0 3131 const ClientDownloadResponse_Verdict ClientDownloadResponse::POTENTIALLY_UNWANTED;
michael@0 3132 const ClientDownloadResponse_Verdict ClientDownloadResponse::DANGEROUS_HOST;
michael@0 3133 const ClientDownloadResponse_Verdict ClientDownloadResponse::Verdict_MIN;
michael@0 3134 const ClientDownloadResponse_Verdict ClientDownloadResponse::Verdict_MAX;
michael@0 3135 const int ClientDownloadResponse::Verdict_ARRAYSIZE;
michael@0 3136 #endif // _MSC_VER
michael@0 3137 #ifndef _MSC_VER
michael@0 3138 const int ClientDownloadResponse_MoreInfo::kDescriptionFieldNumber;
michael@0 3139 const int ClientDownloadResponse_MoreInfo::kUrlFieldNumber;
michael@0 3140 #endif // !_MSC_VER
michael@0 3141
michael@0 3142 ClientDownloadResponse_MoreInfo::ClientDownloadResponse_MoreInfo()
michael@0 3143 : ::google::protobuf::MessageLite() {
michael@0 3144 SharedCtor();
michael@0 3145 }
michael@0 3146
michael@0 3147 void ClientDownloadResponse_MoreInfo::InitAsDefaultInstance() {
michael@0 3148 }
michael@0 3149
michael@0 3150 ClientDownloadResponse_MoreInfo::ClientDownloadResponse_MoreInfo(const ClientDownloadResponse_MoreInfo& from)
michael@0 3151 : ::google::protobuf::MessageLite() {
michael@0 3152 SharedCtor();
michael@0 3153 MergeFrom(from);
michael@0 3154 }
michael@0 3155
michael@0 3156 void ClientDownloadResponse_MoreInfo::SharedCtor() {
michael@0 3157 _cached_size_ = 0;
michael@0 3158 description_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 3159 url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 3160 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3161 }
michael@0 3162
michael@0 3163 ClientDownloadResponse_MoreInfo::~ClientDownloadResponse_MoreInfo() {
michael@0 3164 SharedDtor();
michael@0 3165 }
michael@0 3166
michael@0 3167 void ClientDownloadResponse_MoreInfo::SharedDtor() {
michael@0 3168 if (description_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3169 delete description_;
michael@0 3170 }
michael@0 3171 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3172 delete url_;
michael@0 3173 }
michael@0 3174 if (this != default_instance_) {
michael@0 3175 }
michael@0 3176 }
michael@0 3177
michael@0 3178 void ClientDownloadResponse_MoreInfo::SetCachedSize(int size) const {
michael@0 3179 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3180 _cached_size_ = size;
michael@0 3181 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3182 }
michael@0 3183 const ClientDownloadResponse_MoreInfo& ClientDownloadResponse_MoreInfo::default_instance() {
michael@0 3184 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 3185 }
michael@0 3186
michael@0 3187 ClientDownloadResponse_MoreInfo* ClientDownloadResponse_MoreInfo::default_instance_ = NULL;
michael@0 3188
michael@0 3189 ClientDownloadResponse_MoreInfo* ClientDownloadResponse_MoreInfo::New() const {
michael@0 3190 return new ClientDownloadResponse_MoreInfo;
michael@0 3191 }
michael@0 3192
michael@0 3193 void ClientDownloadResponse_MoreInfo::Clear() {
michael@0 3194 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3195 if (has_description()) {
michael@0 3196 if (description_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3197 description_->clear();
michael@0 3198 }
michael@0 3199 }
michael@0 3200 if (has_url()) {
michael@0 3201 if (url_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3202 url_->clear();
michael@0 3203 }
michael@0 3204 }
michael@0 3205 }
michael@0 3206 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3207 }
michael@0 3208
michael@0 3209 bool ClientDownloadResponse_MoreInfo::MergePartialFromCodedStream(
michael@0 3210 ::google::protobuf::io::CodedInputStream* input) {
michael@0 3211 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 3212 ::google::protobuf::uint32 tag;
michael@0 3213 while ((tag = input->ReadTag()) != 0) {
michael@0 3214 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 3215 // optional string description = 1;
michael@0 3216 case 1: {
michael@0 3217 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3218 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3219 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 3220 input, this->mutable_description()));
michael@0 3221 } else {
michael@0 3222 goto handle_uninterpreted;
michael@0 3223 }
michael@0 3224 if (input->ExpectTag(18)) goto parse_url;
michael@0 3225 break;
michael@0 3226 }
michael@0 3227
michael@0 3228 // optional string url = 2;
michael@0 3229 case 2: {
michael@0 3230 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3231 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3232 parse_url:
michael@0 3233 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 3234 input, this->mutable_url()));
michael@0 3235 } else {
michael@0 3236 goto handle_uninterpreted;
michael@0 3237 }
michael@0 3238 if (input->ExpectAtEnd()) return true;
michael@0 3239 break;
michael@0 3240 }
michael@0 3241
michael@0 3242 default: {
michael@0 3243 handle_uninterpreted:
michael@0 3244 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3245 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 3246 return true;
michael@0 3247 }
michael@0 3248 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 3249 break;
michael@0 3250 }
michael@0 3251 }
michael@0 3252 }
michael@0 3253 return true;
michael@0 3254 #undef DO_
michael@0 3255 }
michael@0 3256
michael@0 3257 void ClientDownloadResponse_MoreInfo::SerializeWithCachedSizes(
michael@0 3258 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 3259 // optional string description = 1;
michael@0 3260 if (has_description()) {
michael@0 3261 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 3262 1, this->description(), output);
michael@0 3263 }
michael@0 3264
michael@0 3265 // optional string url = 2;
michael@0 3266 if (has_url()) {
michael@0 3267 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 3268 2, this->url(), output);
michael@0 3269 }
michael@0 3270
michael@0 3271 }
michael@0 3272
michael@0 3273 int ClientDownloadResponse_MoreInfo::ByteSize() const {
michael@0 3274 int total_size = 0;
michael@0 3275
michael@0 3276 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3277 // optional string description = 1;
michael@0 3278 if (has_description()) {
michael@0 3279 total_size += 1 +
michael@0 3280 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 3281 this->description());
michael@0 3282 }
michael@0 3283
michael@0 3284 // optional string url = 2;
michael@0 3285 if (has_url()) {
michael@0 3286 total_size += 1 +
michael@0 3287 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 3288 this->url());
michael@0 3289 }
michael@0 3290
michael@0 3291 }
michael@0 3292 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3293 _cached_size_ = total_size;
michael@0 3294 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3295 return total_size;
michael@0 3296 }
michael@0 3297
michael@0 3298 void ClientDownloadResponse_MoreInfo::CheckTypeAndMergeFrom(
michael@0 3299 const ::google::protobuf::MessageLite& from) {
michael@0 3300 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadResponse_MoreInfo*>(&from));
michael@0 3301 }
michael@0 3302
michael@0 3303 void ClientDownloadResponse_MoreInfo::MergeFrom(const ClientDownloadResponse_MoreInfo& from) {
michael@0 3304 GOOGLE_CHECK_NE(&from, this);
michael@0 3305 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3306 if (from.has_description()) {
michael@0 3307 set_description(from.description());
michael@0 3308 }
michael@0 3309 if (from.has_url()) {
michael@0 3310 set_url(from.url());
michael@0 3311 }
michael@0 3312 }
michael@0 3313 }
michael@0 3314
michael@0 3315 void ClientDownloadResponse_MoreInfo::CopyFrom(const ClientDownloadResponse_MoreInfo& from) {
michael@0 3316 if (&from == this) return;
michael@0 3317 Clear();
michael@0 3318 MergeFrom(from);
michael@0 3319 }
michael@0 3320
michael@0 3321 bool ClientDownloadResponse_MoreInfo::IsInitialized() const {
michael@0 3322
michael@0 3323 return true;
michael@0 3324 }
michael@0 3325
michael@0 3326 void ClientDownloadResponse_MoreInfo::Swap(ClientDownloadResponse_MoreInfo* other) {
michael@0 3327 if (other != this) {
michael@0 3328 std::swap(description_, other->description_);
michael@0 3329 std::swap(url_, other->url_);
michael@0 3330 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 3331 std::swap(_cached_size_, other->_cached_size_);
michael@0 3332 }
michael@0 3333 }
michael@0 3334
michael@0 3335 ::std::string ClientDownloadResponse_MoreInfo::GetTypeName() const {
michael@0 3336 return "safe_browsing.ClientDownloadResponse.MoreInfo";
michael@0 3337 }
michael@0 3338
michael@0 3339
michael@0 3340 // -------------------------------------------------------------------
michael@0 3341
michael@0 3342 #ifndef _MSC_VER
michael@0 3343 const int ClientDownloadResponse::kVerdictFieldNumber;
michael@0 3344 const int ClientDownloadResponse::kMoreInfoFieldNumber;
michael@0 3345 const int ClientDownloadResponse::kTokenFieldNumber;
michael@0 3346 #endif // !_MSC_VER
michael@0 3347
michael@0 3348 ClientDownloadResponse::ClientDownloadResponse()
michael@0 3349 : ::google::protobuf::MessageLite() {
michael@0 3350 SharedCtor();
michael@0 3351 }
michael@0 3352
michael@0 3353 void ClientDownloadResponse::InitAsDefaultInstance() {
michael@0 3354 more_info_ = const_cast< ::safe_browsing::ClientDownloadResponse_MoreInfo*>(&::safe_browsing::ClientDownloadResponse_MoreInfo::default_instance());
michael@0 3355 }
michael@0 3356
michael@0 3357 ClientDownloadResponse::ClientDownloadResponse(const ClientDownloadResponse& from)
michael@0 3358 : ::google::protobuf::MessageLite() {
michael@0 3359 SharedCtor();
michael@0 3360 MergeFrom(from);
michael@0 3361 }
michael@0 3362
michael@0 3363 void ClientDownloadResponse::SharedCtor() {
michael@0 3364 _cached_size_ = 0;
michael@0 3365 verdict_ = 0;
michael@0 3366 more_info_ = NULL;
michael@0 3367 token_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 3368 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3369 }
michael@0 3370
michael@0 3371 ClientDownloadResponse::~ClientDownloadResponse() {
michael@0 3372 SharedDtor();
michael@0 3373 }
michael@0 3374
michael@0 3375 void ClientDownloadResponse::SharedDtor() {
michael@0 3376 if (token_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3377 delete token_;
michael@0 3378 }
michael@0 3379 if (this != default_instance_) {
michael@0 3380 delete more_info_;
michael@0 3381 }
michael@0 3382 }
michael@0 3383
michael@0 3384 void ClientDownloadResponse::SetCachedSize(int size) const {
michael@0 3385 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3386 _cached_size_ = size;
michael@0 3387 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3388 }
michael@0 3389 const ClientDownloadResponse& ClientDownloadResponse::default_instance() {
michael@0 3390 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 3391 }
michael@0 3392
michael@0 3393 ClientDownloadResponse* ClientDownloadResponse::default_instance_ = NULL;
michael@0 3394
michael@0 3395 ClientDownloadResponse* ClientDownloadResponse::New() const {
michael@0 3396 return new ClientDownloadResponse;
michael@0 3397 }
michael@0 3398
michael@0 3399 void ClientDownloadResponse::Clear() {
michael@0 3400 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3401 verdict_ = 0;
michael@0 3402 if (has_more_info()) {
michael@0 3403 if (more_info_ != NULL) more_info_->::safe_browsing::ClientDownloadResponse_MoreInfo::Clear();
michael@0 3404 }
michael@0 3405 if (has_token()) {
michael@0 3406 if (token_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3407 token_->clear();
michael@0 3408 }
michael@0 3409 }
michael@0 3410 }
michael@0 3411 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3412 }
michael@0 3413
michael@0 3414 bool ClientDownloadResponse::MergePartialFromCodedStream(
michael@0 3415 ::google::protobuf::io::CodedInputStream* input) {
michael@0 3416 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 3417 ::google::protobuf::uint32 tag;
michael@0 3418 while ((tag = input->ReadTag()) != 0) {
michael@0 3419 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 3420 // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
michael@0 3421 case 1: {
michael@0 3422 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3423 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 3424 int value;
michael@0 3425 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 3426 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
michael@0 3427 input, &value)));
michael@0 3428 if (::safe_browsing::ClientDownloadResponse_Verdict_IsValid(value)) {
michael@0 3429 set_verdict(static_cast< ::safe_browsing::ClientDownloadResponse_Verdict >(value));
michael@0 3430 }
michael@0 3431 } else {
michael@0 3432 goto handle_uninterpreted;
michael@0 3433 }
michael@0 3434 if (input->ExpectTag(18)) goto parse_more_info;
michael@0 3435 break;
michael@0 3436 }
michael@0 3437
michael@0 3438 // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
michael@0 3439 case 2: {
michael@0 3440 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3441 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3442 parse_more_info:
michael@0 3443 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 3444 input, mutable_more_info()));
michael@0 3445 } else {
michael@0 3446 goto handle_uninterpreted;
michael@0 3447 }
michael@0 3448 if (input->ExpectTag(26)) goto parse_token;
michael@0 3449 break;
michael@0 3450 }
michael@0 3451
michael@0 3452 // optional bytes token = 3;
michael@0 3453 case 3: {
michael@0 3454 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3455 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3456 parse_token:
michael@0 3457 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 3458 input, this->mutable_token()));
michael@0 3459 } else {
michael@0 3460 goto handle_uninterpreted;
michael@0 3461 }
michael@0 3462 if (input->ExpectAtEnd()) return true;
michael@0 3463 break;
michael@0 3464 }
michael@0 3465
michael@0 3466 default: {
michael@0 3467 handle_uninterpreted:
michael@0 3468 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3469 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 3470 return true;
michael@0 3471 }
michael@0 3472 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 3473 break;
michael@0 3474 }
michael@0 3475 }
michael@0 3476 }
michael@0 3477 return true;
michael@0 3478 #undef DO_
michael@0 3479 }
michael@0 3480
michael@0 3481 void ClientDownloadResponse::SerializeWithCachedSizes(
michael@0 3482 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 3483 // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
michael@0 3484 if (has_verdict()) {
michael@0 3485 ::google::protobuf::internal::WireFormatLite::WriteEnum(
michael@0 3486 1, this->verdict(), output);
michael@0 3487 }
michael@0 3488
michael@0 3489 // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
michael@0 3490 if (has_more_info()) {
michael@0 3491 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 3492 2, this->more_info(), output);
michael@0 3493 }
michael@0 3494
michael@0 3495 // optional bytes token = 3;
michael@0 3496 if (has_token()) {
michael@0 3497 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 3498 3, this->token(), output);
michael@0 3499 }
michael@0 3500
michael@0 3501 }
michael@0 3502
michael@0 3503 int ClientDownloadResponse::ByteSize() const {
michael@0 3504 int total_size = 0;
michael@0 3505
michael@0 3506 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3507 // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
michael@0 3508 if (has_verdict()) {
michael@0 3509 total_size += 1 +
michael@0 3510 ::google::protobuf::internal::WireFormatLite::EnumSize(this->verdict());
michael@0 3511 }
michael@0 3512
michael@0 3513 // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
michael@0 3514 if (has_more_info()) {
michael@0 3515 total_size += 1 +
michael@0 3516 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 3517 this->more_info());
michael@0 3518 }
michael@0 3519
michael@0 3520 // optional bytes token = 3;
michael@0 3521 if (has_token()) {
michael@0 3522 total_size += 1 +
michael@0 3523 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 3524 this->token());
michael@0 3525 }
michael@0 3526
michael@0 3527 }
michael@0 3528 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3529 _cached_size_ = total_size;
michael@0 3530 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3531 return total_size;
michael@0 3532 }
michael@0 3533
michael@0 3534 void ClientDownloadResponse::CheckTypeAndMergeFrom(
michael@0 3535 const ::google::protobuf::MessageLite& from) {
michael@0 3536 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadResponse*>(&from));
michael@0 3537 }
michael@0 3538
michael@0 3539 void ClientDownloadResponse::MergeFrom(const ClientDownloadResponse& from) {
michael@0 3540 GOOGLE_CHECK_NE(&from, this);
michael@0 3541 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3542 if (from.has_verdict()) {
michael@0 3543 set_verdict(from.verdict());
michael@0 3544 }
michael@0 3545 if (from.has_more_info()) {
michael@0 3546 mutable_more_info()->::safe_browsing::ClientDownloadResponse_MoreInfo::MergeFrom(from.more_info());
michael@0 3547 }
michael@0 3548 if (from.has_token()) {
michael@0 3549 set_token(from.token());
michael@0 3550 }
michael@0 3551 }
michael@0 3552 }
michael@0 3553
michael@0 3554 void ClientDownloadResponse::CopyFrom(const ClientDownloadResponse& from) {
michael@0 3555 if (&from == this) return;
michael@0 3556 Clear();
michael@0 3557 MergeFrom(from);
michael@0 3558 }
michael@0 3559
michael@0 3560 bool ClientDownloadResponse::IsInitialized() const {
michael@0 3561 if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
michael@0 3562
michael@0 3563 return true;
michael@0 3564 }
michael@0 3565
michael@0 3566 void ClientDownloadResponse::Swap(ClientDownloadResponse* other) {
michael@0 3567 if (other != this) {
michael@0 3568 std::swap(verdict_, other->verdict_);
michael@0 3569 std::swap(more_info_, other->more_info_);
michael@0 3570 std::swap(token_, other->token_);
michael@0 3571 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 3572 std::swap(_cached_size_, other->_cached_size_);
michael@0 3573 }
michael@0 3574 }
michael@0 3575
michael@0 3576 ::std::string ClientDownloadResponse::GetTypeName() const {
michael@0 3577 return "safe_browsing.ClientDownloadResponse";
michael@0 3578 }
michael@0 3579
michael@0 3580
michael@0 3581 // ===================================================================
michael@0 3582
michael@0 3583 bool ClientDownloadReport_Reason_IsValid(int value) {
michael@0 3584 switch(value) {
michael@0 3585 case 0:
michael@0 3586 case 1:
michael@0 3587 case 2:
michael@0 3588 return true;
michael@0 3589 default:
michael@0 3590 return false;
michael@0 3591 }
michael@0 3592 }
michael@0 3593
michael@0 3594 #ifndef _MSC_VER
michael@0 3595 const ClientDownloadReport_Reason ClientDownloadReport::SHARE;
michael@0 3596 const ClientDownloadReport_Reason ClientDownloadReport::FALSE_POSITIVE;
michael@0 3597 const ClientDownloadReport_Reason ClientDownloadReport::APPEAL;
michael@0 3598 const ClientDownloadReport_Reason ClientDownloadReport::Reason_MIN;
michael@0 3599 const ClientDownloadReport_Reason ClientDownloadReport::Reason_MAX;
michael@0 3600 const int ClientDownloadReport::Reason_ARRAYSIZE;
michael@0 3601 #endif // _MSC_VER
michael@0 3602 #ifndef _MSC_VER
michael@0 3603 const int ClientDownloadReport_UserInformation::kEmailFieldNumber;
michael@0 3604 #endif // !_MSC_VER
michael@0 3605
michael@0 3606 ClientDownloadReport_UserInformation::ClientDownloadReport_UserInformation()
michael@0 3607 : ::google::protobuf::MessageLite() {
michael@0 3608 SharedCtor();
michael@0 3609 }
michael@0 3610
michael@0 3611 void ClientDownloadReport_UserInformation::InitAsDefaultInstance() {
michael@0 3612 }
michael@0 3613
michael@0 3614 ClientDownloadReport_UserInformation::ClientDownloadReport_UserInformation(const ClientDownloadReport_UserInformation& from)
michael@0 3615 : ::google::protobuf::MessageLite() {
michael@0 3616 SharedCtor();
michael@0 3617 MergeFrom(from);
michael@0 3618 }
michael@0 3619
michael@0 3620 void ClientDownloadReport_UserInformation::SharedCtor() {
michael@0 3621 _cached_size_ = 0;
michael@0 3622 email_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 3623 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3624 }
michael@0 3625
michael@0 3626 ClientDownloadReport_UserInformation::~ClientDownloadReport_UserInformation() {
michael@0 3627 SharedDtor();
michael@0 3628 }
michael@0 3629
michael@0 3630 void ClientDownloadReport_UserInformation::SharedDtor() {
michael@0 3631 if (email_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3632 delete email_;
michael@0 3633 }
michael@0 3634 if (this != default_instance_) {
michael@0 3635 }
michael@0 3636 }
michael@0 3637
michael@0 3638 void ClientDownloadReport_UserInformation::SetCachedSize(int size) const {
michael@0 3639 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3640 _cached_size_ = size;
michael@0 3641 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3642 }
michael@0 3643 const ClientDownloadReport_UserInformation& ClientDownloadReport_UserInformation::default_instance() {
michael@0 3644 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 3645 }
michael@0 3646
michael@0 3647 ClientDownloadReport_UserInformation* ClientDownloadReport_UserInformation::default_instance_ = NULL;
michael@0 3648
michael@0 3649 ClientDownloadReport_UserInformation* ClientDownloadReport_UserInformation::New() const {
michael@0 3650 return new ClientDownloadReport_UserInformation;
michael@0 3651 }
michael@0 3652
michael@0 3653 void ClientDownloadReport_UserInformation::Clear() {
michael@0 3654 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3655 if (has_email()) {
michael@0 3656 if (email_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3657 email_->clear();
michael@0 3658 }
michael@0 3659 }
michael@0 3660 }
michael@0 3661 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3662 }
michael@0 3663
michael@0 3664 bool ClientDownloadReport_UserInformation::MergePartialFromCodedStream(
michael@0 3665 ::google::protobuf::io::CodedInputStream* input) {
michael@0 3666 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 3667 ::google::protobuf::uint32 tag;
michael@0 3668 while ((tag = input->ReadTag()) != 0) {
michael@0 3669 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 3670 // optional string email = 1;
michael@0 3671 case 1: {
michael@0 3672 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3673 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3674 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 3675 input, this->mutable_email()));
michael@0 3676 } else {
michael@0 3677 goto handle_uninterpreted;
michael@0 3678 }
michael@0 3679 if (input->ExpectAtEnd()) return true;
michael@0 3680 break;
michael@0 3681 }
michael@0 3682
michael@0 3683 default: {
michael@0 3684 handle_uninterpreted:
michael@0 3685 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3686 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 3687 return true;
michael@0 3688 }
michael@0 3689 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 3690 break;
michael@0 3691 }
michael@0 3692 }
michael@0 3693 }
michael@0 3694 return true;
michael@0 3695 #undef DO_
michael@0 3696 }
michael@0 3697
michael@0 3698 void ClientDownloadReport_UserInformation::SerializeWithCachedSizes(
michael@0 3699 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 3700 // optional string email = 1;
michael@0 3701 if (has_email()) {
michael@0 3702 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 3703 1, this->email(), output);
michael@0 3704 }
michael@0 3705
michael@0 3706 }
michael@0 3707
michael@0 3708 int ClientDownloadReport_UserInformation::ByteSize() const {
michael@0 3709 int total_size = 0;
michael@0 3710
michael@0 3711 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3712 // optional string email = 1;
michael@0 3713 if (has_email()) {
michael@0 3714 total_size += 1 +
michael@0 3715 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 3716 this->email());
michael@0 3717 }
michael@0 3718
michael@0 3719 }
michael@0 3720 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3721 _cached_size_ = total_size;
michael@0 3722 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3723 return total_size;
michael@0 3724 }
michael@0 3725
michael@0 3726 void ClientDownloadReport_UserInformation::CheckTypeAndMergeFrom(
michael@0 3727 const ::google::protobuf::MessageLite& from) {
michael@0 3728 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadReport_UserInformation*>(&from));
michael@0 3729 }
michael@0 3730
michael@0 3731 void ClientDownloadReport_UserInformation::MergeFrom(const ClientDownloadReport_UserInformation& from) {
michael@0 3732 GOOGLE_CHECK_NE(&from, this);
michael@0 3733 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3734 if (from.has_email()) {
michael@0 3735 set_email(from.email());
michael@0 3736 }
michael@0 3737 }
michael@0 3738 }
michael@0 3739
michael@0 3740 void ClientDownloadReport_UserInformation::CopyFrom(const ClientDownloadReport_UserInformation& from) {
michael@0 3741 if (&from == this) return;
michael@0 3742 Clear();
michael@0 3743 MergeFrom(from);
michael@0 3744 }
michael@0 3745
michael@0 3746 bool ClientDownloadReport_UserInformation::IsInitialized() const {
michael@0 3747
michael@0 3748 return true;
michael@0 3749 }
michael@0 3750
michael@0 3751 void ClientDownloadReport_UserInformation::Swap(ClientDownloadReport_UserInformation* other) {
michael@0 3752 if (other != this) {
michael@0 3753 std::swap(email_, other->email_);
michael@0 3754 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 3755 std::swap(_cached_size_, other->_cached_size_);
michael@0 3756 }
michael@0 3757 }
michael@0 3758
michael@0 3759 ::std::string ClientDownloadReport_UserInformation::GetTypeName() const {
michael@0 3760 return "safe_browsing.ClientDownloadReport.UserInformation";
michael@0 3761 }
michael@0 3762
michael@0 3763
michael@0 3764 // -------------------------------------------------------------------
michael@0 3765
michael@0 3766 #ifndef _MSC_VER
michael@0 3767 const int ClientDownloadReport::kReasonFieldNumber;
michael@0 3768 const int ClientDownloadReport::kDownloadRequestFieldNumber;
michael@0 3769 const int ClientDownloadReport::kUserInformationFieldNumber;
michael@0 3770 const int ClientDownloadReport::kCommentFieldNumber;
michael@0 3771 const int ClientDownloadReport::kDownloadResponseFieldNumber;
michael@0 3772 #endif // !_MSC_VER
michael@0 3773
michael@0 3774 ClientDownloadReport::ClientDownloadReport()
michael@0 3775 : ::google::protobuf::MessageLite() {
michael@0 3776 SharedCtor();
michael@0 3777 }
michael@0 3778
michael@0 3779 void ClientDownloadReport::InitAsDefaultInstance() {
michael@0 3780 download_request_ = const_cast< ::safe_browsing::ClientDownloadRequest*>(&::safe_browsing::ClientDownloadRequest::default_instance());
michael@0 3781 user_information_ = const_cast< ::safe_browsing::ClientDownloadReport_UserInformation*>(&::safe_browsing::ClientDownloadReport_UserInformation::default_instance());
michael@0 3782 download_response_ = const_cast< ::safe_browsing::ClientDownloadResponse*>(&::safe_browsing::ClientDownloadResponse::default_instance());
michael@0 3783 }
michael@0 3784
michael@0 3785 ClientDownloadReport::ClientDownloadReport(const ClientDownloadReport& from)
michael@0 3786 : ::google::protobuf::MessageLite() {
michael@0 3787 SharedCtor();
michael@0 3788 MergeFrom(from);
michael@0 3789 }
michael@0 3790
michael@0 3791 void ClientDownloadReport::SharedCtor() {
michael@0 3792 _cached_size_ = 0;
michael@0 3793 reason_ = 0;
michael@0 3794 download_request_ = NULL;
michael@0 3795 user_information_ = NULL;
michael@0 3796 comment_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 3797 download_response_ = NULL;
michael@0 3798 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3799 }
michael@0 3800
michael@0 3801 ClientDownloadReport::~ClientDownloadReport() {
michael@0 3802 SharedDtor();
michael@0 3803 }
michael@0 3804
michael@0 3805 void ClientDownloadReport::SharedDtor() {
michael@0 3806 if (comment_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3807 delete comment_;
michael@0 3808 }
michael@0 3809 if (this != default_instance_) {
michael@0 3810 delete download_request_;
michael@0 3811 delete user_information_;
michael@0 3812 delete download_response_;
michael@0 3813 }
michael@0 3814 }
michael@0 3815
michael@0 3816 void ClientDownloadReport::SetCachedSize(int size) const {
michael@0 3817 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 3818 _cached_size_ = size;
michael@0 3819 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 3820 }
michael@0 3821 const ClientDownloadReport& ClientDownloadReport::default_instance() {
michael@0 3822 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 3823 }
michael@0 3824
michael@0 3825 ClientDownloadReport* ClientDownloadReport::default_instance_ = NULL;
michael@0 3826
michael@0 3827 ClientDownloadReport* ClientDownloadReport::New() const {
michael@0 3828 return new ClientDownloadReport;
michael@0 3829 }
michael@0 3830
michael@0 3831 void ClientDownloadReport::Clear() {
michael@0 3832 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3833 reason_ = 0;
michael@0 3834 if (has_download_request()) {
michael@0 3835 if (download_request_ != NULL) download_request_->::safe_browsing::ClientDownloadRequest::Clear();
michael@0 3836 }
michael@0 3837 if (has_user_information()) {
michael@0 3838 if (user_information_ != NULL) user_information_->::safe_browsing::ClientDownloadReport_UserInformation::Clear();
michael@0 3839 }
michael@0 3840 if (has_comment()) {
michael@0 3841 if (comment_ != &::google::protobuf::internal::kEmptyString) {
michael@0 3842 comment_->clear();
michael@0 3843 }
michael@0 3844 }
michael@0 3845 if (has_download_response()) {
michael@0 3846 if (download_response_ != NULL) download_response_->::safe_browsing::ClientDownloadResponse::Clear();
michael@0 3847 }
michael@0 3848 }
michael@0 3849 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 3850 }
michael@0 3851
michael@0 3852 bool ClientDownloadReport::MergePartialFromCodedStream(
michael@0 3853 ::google::protobuf::io::CodedInputStream* input) {
michael@0 3854 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 3855 ::google::protobuf::uint32 tag;
michael@0 3856 while ((tag = input->ReadTag()) != 0) {
michael@0 3857 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 3858 // optional .safe_browsing.ClientDownloadReport.Reason reason = 1;
michael@0 3859 case 1: {
michael@0 3860 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3861 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 3862 int value;
michael@0 3863 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 3864 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
michael@0 3865 input, &value)));
michael@0 3866 if (::safe_browsing::ClientDownloadReport_Reason_IsValid(value)) {
michael@0 3867 set_reason(static_cast< ::safe_browsing::ClientDownloadReport_Reason >(value));
michael@0 3868 }
michael@0 3869 } else {
michael@0 3870 goto handle_uninterpreted;
michael@0 3871 }
michael@0 3872 if (input->ExpectTag(18)) goto parse_download_request;
michael@0 3873 break;
michael@0 3874 }
michael@0 3875
michael@0 3876 // optional .safe_browsing.ClientDownloadRequest download_request = 2;
michael@0 3877 case 2: {
michael@0 3878 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3879 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3880 parse_download_request:
michael@0 3881 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 3882 input, mutable_download_request()));
michael@0 3883 } else {
michael@0 3884 goto handle_uninterpreted;
michael@0 3885 }
michael@0 3886 if (input->ExpectTag(26)) goto parse_user_information;
michael@0 3887 break;
michael@0 3888 }
michael@0 3889
michael@0 3890 // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3;
michael@0 3891 case 3: {
michael@0 3892 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3893 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3894 parse_user_information:
michael@0 3895 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 3896 input, mutable_user_information()));
michael@0 3897 } else {
michael@0 3898 goto handle_uninterpreted;
michael@0 3899 }
michael@0 3900 if (input->ExpectTag(34)) goto parse_comment;
michael@0 3901 break;
michael@0 3902 }
michael@0 3903
michael@0 3904 // optional bytes comment = 4;
michael@0 3905 case 4: {
michael@0 3906 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3907 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3908 parse_comment:
michael@0 3909 DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
michael@0 3910 input, this->mutable_comment()));
michael@0 3911 } else {
michael@0 3912 goto handle_uninterpreted;
michael@0 3913 }
michael@0 3914 if (input->ExpectTag(42)) goto parse_download_response;
michael@0 3915 break;
michael@0 3916 }
michael@0 3917
michael@0 3918 // optional .safe_browsing.ClientDownloadResponse download_response = 5;
michael@0 3919 case 5: {
michael@0 3920 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3921 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 3922 parse_download_response:
michael@0 3923 DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
michael@0 3924 input, mutable_download_response()));
michael@0 3925 } else {
michael@0 3926 goto handle_uninterpreted;
michael@0 3927 }
michael@0 3928 if (input->ExpectAtEnd()) return true;
michael@0 3929 break;
michael@0 3930 }
michael@0 3931
michael@0 3932 default: {
michael@0 3933 handle_uninterpreted:
michael@0 3934 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 3935 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 3936 return true;
michael@0 3937 }
michael@0 3938 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 3939 break;
michael@0 3940 }
michael@0 3941 }
michael@0 3942 }
michael@0 3943 return true;
michael@0 3944 #undef DO_
michael@0 3945 }
michael@0 3946
michael@0 3947 void ClientDownloadReport::SerializeWithCachedSizes(
michael@0 3948 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 3949 // optional .safe_browsing.ClientDownloadReport.Reason reason = 1;
michael@0 3950 if (has_reason()) {
michael@0 3951 ::google::protobuf::internal::WireFormatLite::WriteEnum(
michael@0 3952 1, this->reason(), output);
michael@0 3953 }
michael@0 3954
michael@0 3955 // optional .safe_browsing.ClientDownloadRequest download_request = 2;
michael@0 3956 if (has_download_request()) {
michael@0 3957 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 3958 2, this->download_request(), output);
michael@0 3959 }
michael@0 3960
michael@0 3961 // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3;
michael@0 3962 if (has_user_information()) {
michael@0 3963 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 3964 3, this->user_information(), output);
michael@0 3965 }
michael@0 3966
michael@0 3967 // optional bytes comment = 4;
michael@0 3968 if (has_comment()) {
michael@0 3969 ::google::protobuf::internal::WireFormatLite::WriteBytes(
michael@0 3970 4, this->comment(), output);
michael@0 3971 }
michael@0 3972
michael@0 3973 // optional .safe_browsing.ClientDownloadResponse download_response = 5;
michael@0 3974 if (has_download_response()) {
michael@0 3975 ::google::protobuf::internal::WireFormatLite::WriteMessage(
michael@0 3976 5, this->download_response(), output);
michael@0 3977 }
michael@0 3978
michael@0 3979 }
michael@0 3980
michael@0 3981 int ClientDownloadReport::ByteSize() const {
michael@0 3982 int total_size = 0;
michael@0 3983
michael@0 3984 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 3985 // optional .safe_browsing.ClientDownloadReport.Reason reason = 1;
michael@0 3986 if (has_reason()) {
michael@0 3987 total_size += 1 +
michael@0 3988 ::google::protobuf::internal::WireFormatLite::EnumSize(this->reason());
michael@0 3989 }
michael@0 3990
michael@0 3991 // optional .safe_browsing.ClientDownloadRequest download_request = 2;
michael@0 3992 if (has_download_request()) {
michael@0 3993 total_size += 1 +
michael@0 3994 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 3995 this->download_request());
michael@0 3996 }
michael@0 3997
michael@0 3998 // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3;
michael@0 3999 if (has_user_information()) {
michael@0 4000 total_size += 1 +
michael@0 4001 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 4002 this->user_information());
michael@0 4003 }
michael@0 4004
michael@0 4005 // optional bytes comment = 4;
michael@0 4006 if (has_comment()) {
michael@0 4007 total_size += 1 +
michael@0 4008 ::google::protobuf::internal::WireFormatLite::BytesSize(
michael@0 4009 this->comment());
michael@0 4010 }
michael@0 4011
michael@0 4012 // optional .safe_browsing.ClientDownloadResponse download_response = 5;
michael@0 4013 if (has_download_response()) {
michael@0 4014 total_size += 1 +
michael@0 4015 ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
michael@0 4016 this->download_response());
michael@0 4017 }
michael@0 4018
michael@0 4019 }
michael@0 4020 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 4021 _cached_size_ = total_size;
michael@0 4022 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 4023 return total_size;
michael@0 4024 }
michael@0 4025
michael@0 4026 void ClientDownloadReport::CheckTypeAndMergeFrom(
michael@0 4027 const ::google::protobuf::MessageLite& from) {
michael@0 4028 MergeFrom(*::google::protobuf::down_cast<const ClientDownloadReport*>(&from));
michael@0 4029 }
michael@0 4030
michael@0 4031 void ClientDownloadReport::MergeFrom(const ClientDownloadReport& from) {
michael@0 4032 GOOGLE_CHECK_NE(&from, this);
michael@0 4033 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 4034 if (from.has_reason()) {
michael@0 4035 set_reason(from.reason());
michael@0 4036 }
michael@0 4037 if (from.has_download_request()) {
michael@0 4038 mutable_download_request()->::safe_browsing::ClientDownloadRequest::MergeFrom(from.download_request());
michael@0 4039 }
michael@0 4040 if (from.has_user_information()) {
michael@0 4041 mutable_user_information()->::safe_browsing::ClientDownloadReport_UserInformation::MergeFrom(from.user_information());
michael@0 4042 }
michael@0 4043 if (from.has_comment()) {
michael@0 4044 set_comment(from.comment());
michael@0 4045 }
michael@0 4046 if (from.has_download_response()) {
michael@0 4047 mutable_download_response()->::safe_browsing::ClientDownloadResponse::MergeFrom(from.download_response());
michael@0 4048 }
michael@0 4049 }
michael@0 4050 }
michael@0 4051
michael@0 4052 void ClientDownloadReport::CopyFrom(const ClientDownloadReport& from) {
michael@0 4053 if (&from == this) return;
michael@0 4054 Clear();
michael@0 4055 MergeFrom(from);
michael@0 4056 }
michael@0 4057
michael@0 4058 bool ClientDownloadReport::IsInitialized() const {
michael@0 4059
michael@0 4060 if (has_download_request()) {
michael@0 4061 if (!this->download_request().IsInitialized()) return false;
michael@0 4062 }
michael@0 4063 if (has_download_response()) {
michael@0 4064 if (!this->download_response().IsInitialized()) return false;
michael@0 4065 }
michael@0 4066 return true;
michael@0 4067 }
michael@0 4068
michael@0 4069 void ClientDownloadReport::Swap(ClientDownloadReport* other) {
michael@0 4070 if (other != this) {
michael@0 4071 std::swap(reason_, other->reason_);
michael@0 4072 std::swap(download_request_, other->download_request_);
michael@0 4073 std::swap(user_information_, other->user_information_);
michael@0 4074 std::swap(comment_, other->comment_);
michael@0 4075 std::swap(download_response_, other->download_response_);
michael@0 4076 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 4077 std::swap(_cached_size_, other->_cached_size_);
michael@0 4078 }
michael@0 4079 }
michael@0 4080
michael@0 4081 ::std::string ClientDownloadReport::GetTypeName() const {
michael@0 4082 return "safe_browsing.ClientDownloadReport";
michael@0 4083 }
michael@0 4084
michael@0 4085
michael@0 4086 // ===================================================================
michael@0 4087
michael@0 4088 bool ClientUploadResponse_UploadStatus_IsValid(int value) {
michael@0 4089 switch(value) {
michael@0 4090 case 0:
michael@0 4091 case 1:
michael@0 4092 return true;
michael@0 4093 default:
michael@0 4094 return false;
michael@0 4095 }
michael@0 4096 }
michael@0 4097
michael@0 4098 #ifndef _MSC_VER
michael@0 4099 const ClientUploadResponse_UploadStatus ClientUploadResponse::SUCCESS;
michael@0 4100 const ClientUploadResponse_UploadStatus ClientUploadResponse::UPLOAD_FAILURE;
michael@0 4101 const ClientUploadResponse_UploadStatus ClientUploadResponse::UploadStatus_MIN;
michael@0 4102 const ClientUploadResponse_UploadStatus ClientUploadResponse::UploadStatus_MAX;
michael@0 4103 const int ClientUploadResponse::UploadStatus_ARRAYSIZE;
michael@0 4104 #endif // _MSC_VER
michael@0 4105 #ifndef _MSC_VER
michael@0 4106 const int ClientUploadResponse::kStatusFieldNumber;
michael@0 4107 const int ClientUploadResponse::kPermalinkFieldNumber;
michael@0 4108 #endif // !_MSC_VER
michael@0 4109
michael@0 4110 ClientUploadResponse::ClientUploadResponse()
michael@0 4111 : ::google::protobuf::MessageLite() {
michael@0 4112 SharedCtor();
michael@0 4113 }
michael@0 4114
michael@0 4115 void ClientUploadResponse::InitAsDefaultInstance() {
michael@0 4116 }
michael@0 4117
michael@0 4118 ClientUploadResponse::ClientUploadResponse(const ClientUploadResponse& from)
michael@0 4119 : ::google::protobuf::MessageLite() {
michael@0 4120 SharedCtor();
michael@0 4121 MergeFrom(from);
michael@0 4122 }
michael@0 4123
michael@0 4124 void ClientUploadResponse::SharedCtor() {
michael@0 4125 _cached_size_ = 0;
michael@0 4126 status_ = 0;
michael@0 4127 permalink_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
michael@0 4128 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 4129 }
michael@0 4130
michael@0 4131 ClientUploadResponse::~ClientUploadResponse() {
michael@0 4132 SharedDtor();
michael@0 4133 }
michael@0 4134
michael@0 4135 void ClientUploadResponse::SharedDtor() {
michael@0 4136 if (permalink_ != &::google::protobuf::internal::kEmptyString) {
michael@0 4137 delete permalink_;
michael@0 4138 }
michael@0 4139 if (this != default_instance_) {
michael@0 4140 }
michael@0 4141 }
michael@0 4142
michael@0 4143 void ClientUploadResponse::SetCachedSize(int size) const {
michael@0 4144 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 4145 _cached_size_ = size;
michael@0 4146 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 4147 }
michael@0 4148 const ClientUploadResponse& ClientUploadResponse::default_instance() {
michael@0 4149 if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
michael@0 4150 }
michael@0 4151
michael@0 4152 ClientUploadResponse* ClientUploadResponse::default_instance_ = NULL;
michael@0 4153
michael@0 4154 ClientUploadResponse* ClientUploadResponse::New() const {
michael@0 4155 return new ClientUploadResponse;
michael@0 4156 }
michael@0 4157
michael@0 4158 void ClientUploadResponse::Clear() {
michael@0 4159 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 4160 status_ = 0;
michael@0 4161 if (has_permalink()) {
michael@0 4162 if (permalink_ != &::google::protobuf::internal::kEmptyString) {
michael@0 4163 permalink_->clear();
michael@0 4164 }
michael@0 4165 }
michael@0 4166 }
michael@0 4167 ::memset(_has_bits_, 0, sizeof(_has_bits_));
michael@0 4168 }
michael@0 4169
michael@0 4170 bool ClientUploadResponse::MergePartialFromCodedStream(
michael@0 4171 ::google::protobuf::io::CodedInputStream* input) {
michael@0 4172 #define DO_(EXPRESSION) if (!(EXPRESSION)) return false
michael@0 4173 ::google::protobuf::uint32 tag;
michael@0 4174 while ((tag = input->ReadTag()) != 0) {
michael@0 4175 switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
michael@0 4176 // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1;
michael@0 4177 case 1: {
michael@0 4178 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 4179 ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
michael@0 4180 int value;
michael@0 4181 DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
michael@0 4182 int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
michael@0 4183 input, &value)));
michael@0 4184 if (::safe_browsing::ClientUploadResponse_UploadStatus_IsValid(value)) {
michael@0 4185 set_status(static_cast< ::safe_browsing::ClientUploadResponse_UploadStatus >(value));
michael@0 4186 }
michael@0 4187 } else {
michael@0 4188 goto handle_uninterpreted;
michael@0 4189 }
michael@0 4190 if (input->ExpectTag(18)) goto parse_permalink;
michael@0 4191 break;
michael@0 4192 }
michael@0 4193
michael@0 4194 // optional string permalink = 2;
michael@0 4195 case 2: {
michael@0 4196 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 4197 ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
michael@0 4198 parse_permalink:
michael@0 4199 DO_(::google::protobuf::internal::WireFormatLite::ReadString(
michael@0 4200 input, this->mutable_permalink()));
michael@0 4201 } else {
michael@0 4202 goto handle_uninterpreted;
michael@0 4203 }
michael@0 4204 if (input->ExpectAtEnd()) return true;
michael@0 4205 break;
michael@0 4206 }
michael@0 4207
michael@0 4208 default: {
michael@0 4209 handle_uninterpreted:
michael@0 4210 if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
michael@0 4211 ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
michael@0 4212 return true;
michael@0 4213 }
michael@0 4214 DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
michael@0 4215 break;
michael@0 4216 }
michael@0 4217 }
michael@0 4218 }
michael@0 4219 return true;
michael@0 4220 #undef DO_
michael@0 4221 }
michael@0 4222
michael@0 4223 void ClientUploadResponse::SerializeWithCachedSizes(
michael@0 4224 ::google::protobuf::io::CodedOutputStream* output) const {
michael@0 4225 // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1;
michael@0 4226 if (has_status()) {
michael@0 4227 ::google::protobuf::internal::WireFormatLite::WriteEnum(
michael@0 4228 1, this->status(), output);
michael@0 4229 }
michael@0 4230
michael@0 4231 // optional string permalink = 2;
michael@0 4232 if (has_permalink()) {
michael@0 4233 ::google::protobuf::internal::WireFormatLite::WriteString(
michael@0 4234 2, this->permalink(), output);
michael@0 4235 }
michael@0 4236
michael@0 4237 }
michael@0 4238
michael@0 4239 int ClientUploadResponse::ByteSize() const {
michael@0 4240 int total_size = 0;
michael@0 4241
michael@0 4242 if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 4243 // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1;
michael@0 4244 if (has_status()) {
michael@0 4245 total_size += 1 +
michael@0 4246 ::google::protobuf::internal::WireFormatLite::EnumSize(this->status());
michael@0 4247 }
michael@0 4248
michael@0 4249 // optional string permalink = 2;
michael@0 4250 if (has_permalink()) {
michael@0 4251 total_size += 1 +
michael@0 4252 ::google::protobuf::internal::WireFormatLite::StringSize(
michael@0 4253 this->permalink());
michael@0 4254 }
michael@0 4255
michael@0 4256 }
michael@0 4257 GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
michael@0 4258 _cached_size_ = total_size;
michael@0 4259 GOOGLE_SAFE_CONCURRENT_WRITES_END();
michael@0 4260 return total_size;
michael@0 4261 }
michael@0 4262
michael@0 4263 void ClientUploadResponse::CheckTypeAndMergeFrom(
michael@0 4264 const ::google::protobuf::MessageLite& from) {
michael@0 4265 MergeFrom(*::google::protobuf::down_cast<const ClientUploadResponse*>(&from));
michael@0 4266 }
michael@0 4267
michael@0 4268 void ClientUploadResponse::MergeFrom(const ClientUploadResponse& from) {
michael@0 4269 GOOGLE_CHECK_NE(&from, this);
michael@0 4270 if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
michael@0 4271 if (from.has_status()) {
michael@0 4272 set_status(from.status());
michael@0 4273 }
michael@0 4274 if (from.has_permalink()) {
michael@0 4275 set_permalink(from.permalink());
michael@0 4276 }
michael@0 4277 }
michael@0 4278 }
michael@0 4279
michael@0 4280 void ClientUploadResponse::CopyFrom(const ClientUploadResponse& from) {
michael@0 4281 if (&from == this) return;
michael@0 4282 Clear();
michael@0 4283 MergeFrom(from);
michael@0 4284 }
michael@0 4285
michael@0 4286 bool ClientUploadResponse::IsInitialized() const {
michael@0 4287
michael@0 4288 return true;
michael@0 4289 }
michael@0 4290
michael@0 4291 void ClientUploadResponse::Swap(ClientUploadResponse* other) {
michael@0 4292 if (other != this) {
michael@0 4293 std::swap(status_, other->status_);
michael@0 4294 std::swap(permalink_, other->permalink_);
michael@0 4295 std::swap(_has_bits_[0], other->_has_bits_[0]);
michael@0 4296 std::swap(_cached_size_, other->_cached_size_);
michael@0 4297 }
michael@0 4298 }
michael@0 4299
michael@0 4300 ::std::string ClientUploadResponse::GetTypeName() const {
michael@0 4301 return "safe_browsing.ClientUploadResponse";
michael@0 4302 }
michael@0 4303
michael@0 4304
michael@0 4305 // @@protoc_insertion_point(namespace_scope)
michael@0 4306
michael@0 4307 } // namespace safe_browsing
michael@0 4308
michael@0 4309 // @@protoc_insertion_point(global_scope)

mercurial