michael@0: // Generated by the protocol buffer compiler. DO NOT EDIT! michael@0: michael@0: #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION michael@0: #include "csd.pb.h" michael@0: michael@0: #include michael@0: michael@0: #include michael@0: #include michael@0: #include michael@0: // @@protoc_insertion_point(includes) michael@0: michael@0: namespace safe_browsing { michael@0: michael@0: void protobuf_ShutdownFile_csd_2eproto() { michael@0: delete ClientPhishingRequest::default_instance_; michael@0: delete ClientPhishingRequest_Feature::default_instance_; michael@0: delete ClientPhishingResponse::default_instance_; michael@0: delete ClientMalwareRequest::default_instance_; michael@0: delete ClientMalwareRequest_Feature::default_instance_; michael@0: delete ClientMalwareResponse::default_instance_; michael@0: delete ClientDownloadRequest::default_instance_; michael@0: delete ClientDownloadRequest_Digests::default_instance_; michael@0: delete ClientDownloadRequest_Resource::default_instance_; michael@0: delete ClientDownloadRequest_CertificateChain::default_instance_; michael@0: delete ClientDownloadRequest_CertificateChain_Element::default_instance_; michael@0: delete ClientDownloadRequest_SignatureInfo::default_instance_; michael@0: delete ClientDownloadResponse::default_instance_; michael@0: delete ClientDownloadResponse_MoreInfo::default_instance_; michael@0: delete ClientDownloadReport::default_instance_; michael@0: delete ClientDownloadReport_UserInformation::default_instance_; michael@0: delete ClientUploadResponse::default_instance_; michael@0: } michael@0: michael@0: void protobuf_AddDesc_csd_2eproto() { michael@0: static bool already_here = false; michael@0: if (already_here) return; michael@0: already_here = true; michael@0: GOOGLE_PROTOBUF_VERIFY_VERSION; michael@0: michael@0: ClientPhishingRequest::default_instance_ = new ClientPhishingRequest(); michael@0: ClientPhishingRequest_Feature::default_instance_ = new ClientPhishingRequest_Feature(); michael@0: ClientPhishingResponse::default_instance_ = new ClientPhishingResponse(); michael@0: ClientMalwareRequest::default_instance_ = new ClientMalwareRequest(); michael@0: ClientMalwareRequest_Feature::default_instance_ = new ClientMalwareRequest_Feature(); michael@0: ClientMalwareResponse::default_instance_ = new ClientMalwareResponse(); michael@0: ClientDownloadRequest::default_instance_ = new ClientDownloadRequest(); michael@0: ClientDownloadRequest_Digests::default_instance_ = new ClientDownloadRequest_Digests(); michael@0: ClientDownloadRequest_Resource::default_instance_ = new ClientDownloadRequest_Resource(); michael@0: ClientDownloadRequest_CertificateChain::default_instance_ = new ClientDownloadRequest_CertificateChain(); michael@0: ClientDownloadRequest_CertificateChain_Element::default_instance_ = new ClientDownloadRequest_CertificateChain_Element(); michael@0: ClientDownloadRequest_SignatureInfo::default_instance_ = new ClientDownloadRequest_SignatureInfo(); michael@0: ClientDownloadResponse::default_instance_ = new ClientDownloadResponse(); michael@0: ClientDownloadResponse_MoreInfo::default_instance_ = new ClientDownloadResponse_MoreInfo(); michael@0: ClientDownloadReport::default_instance_ = new ClientDownloadReport(); michael@0: ClientDownloadReport_UserInformation::default_instance_ = new ClientDownloadReport_UserInformation(); michael@0: ClientUploadResponse::default_instance_ = new ClientUploadResponse(); michael@0: ClientPhishingRequest::default_instance_->InitAsDefaultInstance(); michael@0: ClientPhishingRequest_Feature::default_instance_->InitAsDefaultInstance(); michael@0: ClientPhishingResponse::default_instance_->InitAsDefaultInstance(); michael@0: ClientMalwareRequest::default_instance_->InitAsDefaultInstance(); michael@0: ClientMalwareRequest_Feature::default_instance_->InitAsDefaultInstance(); michael@0: ClientMalwareResponse::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadRequest::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadRequest_Digests::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadRequest_Resource::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadRequest_CertificateChain::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadRequest_CertificateChain_Element::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadRequest_SignatureInfo::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadResponse::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadResponse_MoreInfo::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadReport::default_instance_->InitAsDefaultInstance(); michael@0: ClientDownloadReport_UserInformation::default_instance_->InitAsDefaultInstance(); michael@0: ClientUploadResponse::default_instance_->InitAsDefaultInstance(); michael@0: ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_csd_2eproto); michael@0: } michael@0: michael@0: // Force AddDescriptors() to be called at static initialization time. michael@0: struct StaticDescriptorInitializer_csd_2eproto { michael@0: StaticDescriptorInitializer_csd_2eproto() { michael@0: protobuf_AddDesc_csd_2eproto(); michael@0: } michael@0: } static_descriptor_initializer_csd_2eproto_; michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientPhishingRequest_Feature::kNameFieldNumber; michael@0: const int ClientPhishingRequest_Feature::kValueFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientPhishingRequest_Feature::ClientPhishingRequest_Feature() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientPhishingRequest_Feature::ClientPhishingRequest_Feature(const ClientPhishingRequest_Feature& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: value_ = 0; michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientPhishingRequest_Feature::~ClientPhishingRequest_Feature() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::SharedDtor() { michael@0: if (name_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete name_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientPhishingRequest_Feature& ClientPhishingRequest_Feature::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientPhishingRequest_Feature* ClientPhishingRequest_Feature::default_instance_ = NULL; michael@0: michael@0: ClientPhishingRequest_Feature* ClientPhishingRequest_Feature::New() const { michael@0: return new ClientPhishingRequest_Feature; michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_name()) { michael@0: if (name_ != &::google::protobuf::internal::kEmptyString) { michael@0: name_->clear(); michael@0: } michael@0: } michael@0: value_ = 0; michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientPhishingRequest_Feature::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required string name = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_name())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(17)) goto parse_value; michael@0: break; michael@0: } michael@0: michael@0: // required double value = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { michael@0: parse_value: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( michael@0: input, &value_))); michael@0: set_has_value(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required string name = 1; michael@0: if (has_name()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->name(), output); michael@0: } michael@0: michael@0: // required double value = 2; michael@0: if (has_value()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientPhishingRequest_Feature::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required string name = 1; michael@0: if (has_name()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->name()); michael@0: } michael@0: michael@0: // required double value = 2; michael@0: if (has_value()) { michael@0: total_size += 1 + 8; michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::MergeFrom(const ClientPhishingRequest_Feature& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_name()) { michael@0: set_name(from.name()); michael@0: } michael@0: if (from.has_value()) { michael@0: set_value(from.value()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::CopyFrom(const ClientPhishingRequest_Feature& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientPhishingRequest_Feature::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientPhishingRequest_Feature::Swap(ClientPhishingRequest_Feature* other) { michael@0: if (other != this) { michael@0: std::swap(name_, other->name_); michael@0: std::swap(value_, other->value_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientPhishingRequest_Feature::GetTypeName() const { michael@0: return "safe_browsing.ClientPhishingRequest.Feature"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientPhishingRequest::kUrlFieldNumber; michael@0: const int ClientPhishingRequest::kOBSOLETEHashPrefixFieldNumber; michael@0: const int ClientPhishingRequest::kClientScoreFieldNumber; michael@0: const int ClientPhishingRequest::kIsPhishingFieldNumber; michael@0: const int ClientPhishingRequest::kFeatureMapFieldNumber; michael@0: const int ClientPhishingRequest::kModelVersionFieldNumber; michael@0: const int ClientPhishingRequest::kNonModelFeatureMapFieldNumber; michael@0: const int ClientPhishingRequest::kOBSOLETEReferrerUrlFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientPhishingRequest::ClientPhishingRequest() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientPhishingRequest::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientPhishingRequest::ClientPhishingRequest(const ClientPhishingRequest& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientPhishingRequest::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: obsolete_hash_prefix_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: client_score_ = 0; michael@0: is_phishing_ = false; michael@0: model_version_ = 0; michael@0: obsolete_referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientPhishingRequest::~ClientPhishingRequest() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientPhishingRequest::SharedDtor() { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete url_; michael@0: } michael@0: if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete obsolete_hash_prefix_; michael@0: } michael@0: if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete obsolete_referrer_url_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientPhishingRequest::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientPhishingRequest& ClientPhishingRequest::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientPhishingRequest* ClientPhishingRequest::default_instance_ = NULL; michael@0: michael@0: ClientPhishingRequest* ClientPhishingRequest::New() const { michael@0: return new ClientPhishingRequest; michael@0: } michael@0: michael@0: void ClientPhishingRequest::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_url()) { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: url_->clear(); michael@0: } michael@0: } michael@0: if (has_obsolete_hash_prefix()) { michael@0: if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) { michael@0: obsolete_hash_prefix_->clear(); michael@0: } michael@0: } michael@0: client_score_ = 0; michael@0: is_phishing_ = false; michael@0: model_version_ = 0; michael@0: if (has_obsolete_referrer_url()) { michael@0: if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) { michael@0: obsolete_referrer_url_->clear(); michael@0: } michael@0: } michael@0: } michael@0: feature_map_.Clear(); michael@0: non_model_feature_map_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientPhishingRequest::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional string url = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(21)) goto parse_client_score; michael@0: break; michael@0: } michael@0: michael@0: // required float client_score = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { michael@0: parse_client_score: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( michael@0: input, &client_score_))); michael@0: set_has_client_score(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(32)) goto parse_is_phishing; michael@0: break; michael@0: } michael@0: michael@0: // optional bool is_phishing = 4; michael@0: case 4: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_is_phishing: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( michael@0: input, &is_phishing_))); michael@0: set_has_is_phishing(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(42)) goto parse_feature_map; michael@0: break; michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; michael@0: case 5: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_feature_map: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, add_feature_map())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(42)) goto parse_feature_map; michael@0: if (input->ExpectTag(48)) goto parse_model_version; michael@0: break; michael@0: } michael@0: michael@0: // optional int32 model_version = 6; michael@0: case 6: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_model_version: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( michael@0: input, &model_version_))); michael@0: set_has_model_version(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(66)) goto parse_non_model_feature_map; michael@0: break; michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; michael@0: case 8: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_non_model_feature_map: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, add_non_model_feature_map())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(66)) goto parse_non_model_feature_map; michael@0: if (input->ExpectTag(74)) goto parse_OBSOLETE_referrer_url; michael@0: break; michael@0: } michael@0: michael@0: // optional string OBSOLETE_referrer_url = 9; michael@0: case 9: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_OBSOLETE_referrer_url: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_obsolete_referrer_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(82)) goto parse_OBSOLETE_hash_prefix; michael@0: break; michael@0: } michael@0: michael@0: // optional bytes OBSOLETE_hash_prefix = 10; michael@0: case 10: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_OBSOLETE_hash_prefix: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_obsolete_hash_prefix())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientPhishingRequest::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional string url = 1; michael@0: if (has_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->url(), output); michael@0: } michael@0: michael@0: // required float client_score = 2; michael@0: if (has_client_score()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->client_score(), output); michael@0: } michael@0: michael@0: // optional bool is_phishing = 4; michael@0: if (has_is_phishing()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->is_phishing(), output); michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; michael@0: for (int i = 0; i < this->feature_map_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 5, this->feature_map(i), output); michael@0: } michael@0: michael@0: // optional int32 model_version = 6; michael@0: if (has_model_version()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->model_version(), output); michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; michael@0: for (int i = 0; i < this->non_model_feature_map_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 8, this->non_model_feature_map(i), output); michael@0: } michael@0: michael@0: // optional string OBSOLETE_referrer_url = 9; michael@0: if (has_obsolete_referrer_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 9, this->obsolete_referrer_url(), output); michael@0: } michael@0: michael@0: // optional bytes OBSOLETE_hash_prefix = 10; michael@0: if (has_obsolete_hash_prefix()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 10, this->obsolete_hash_prefix(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientPhishingRequest::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional string url = 1; michael@0: if (has_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->url()); michael@0: } michael@0: michael@0: // optional bytes OBSOLETE_hash_prefix = 10; michael@0: if (has_obsolete_hash_prefix()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->obsolete_hash_prefix()); michael@0: } michael@0: michael@0: // required float client_score = 2; michael@0: if (has_client_score()) { michael@0: total_size += 1 + 4; michael@0: } michael@0: michael@0: // optional bool is_phishing = 4; michael@0: if (has_is_phishing()) { michael@0: total_size += 1 + 1; michael@0: } michael@0: michael@0: // optional int32 model_version = 6; michael@0: if (has_model_version()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::Int32Size( michael@0: this->model_version()); michael@0: } michael@0: michael@0: // optional string OBSOLETE_referrer_url = 9; michael@0: if (has_obsolete_referrer_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->obsolete_referrer_url()); michael@0: } michael@0: michael@0: } michael@0: // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; michael@0: total_size += 1 * this->feature_map_size(); michael@0: for (int i = 0; i < this->feature_map_size(); i++) { michael@0: total_size += michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->feature_map(i)); michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; michael@0: total_size += 1 * this->non_model_feature_map_size(); michael@0: for (int i = 0; i < this->non_model_feature_map_size(); i++) { michael@0: total_size += michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->non_model_feature_map(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientPhishingRequest::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientPhishingRequest::MergeFrom(const ClientPhishingRequest& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: feature_map_.MergeFrom(from.feature_map_); michael@0: non_model_feature_map_.MergeFrom(from.non_model_feature_map_); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_url()) { michael@0: set_url(from.url()); michael@0: } michael@0: if (from.has_obsolete_hash_prefix()) { michael@0: set_obsolete_hash_prefix(from.obsolete_hash_prefix()); michael@0: } michael@0: if (from.has_client_score()) { michael@0: set_client_score(from.client_score()); michael@0: } michael@0: if (from.has_is_phishing()) { michael@0: set_is_phishing(from.is_phishing()); michael@0: } michael@0: if (from.has_model_version()) { michael@0: set_model_version(from.model_version()); michael@0: } michael@0: if (from.has_obsolete_referrer_url()) { michael@0: set_obsolete_referrer_url(from.obsolete_referrer_url()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientPhishingRequest::CopyFrom(const ClientPhishingRequest& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientPhishingRequest::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false; michael@0: michael@0: for (int i = 0; i < feature_map_size(); i++) { michael@0: if (!this->feature_map(i).IsInitialized()) return false; michael@0: } michael@0: for (int i = 0; i < non_model_feature_map_size(); i++) { michael@0: if (!this->non_model_feature_map(i).IsInitialized()) return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: void ClientPhishingRequest::Swap(ClientPhishingRequest* other) { michael@0: if (other != this) { michael@0: std::swap(url_, other->url_); michael@0: std::swap(obsolete_hash_prefix_, other->obsolete_hash_prefix_); michael@0: std::swap(client_score_, other->client_score_); michael@0: std::swap(is_phishing_, other->is_phishing_); michael@0: feature_map_.Swap(&other->feature_map_); michael@0: std::swap(model_version_, other->model_version_); michael@0: non_model_feature_map_.Swap(&other->non_model_feature_map_); michael@0: std::swap(obsolete_referrer_url_, other->obsolete_referrer_url_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientPhishingRequest::GetTypeName() const { michael@0: return "safe_browsing.ClientPhishingRequest"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientPhishingResponse::kPhishyFieldNumber; michael@0: const int ClientPhishingResponse::kOBSOLETEWhitelistExpressionFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientPhishingResponse::ClientPhishingResponse() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientPhishingResponse::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientPhishingResponse::ClientPhishingResponse(const ClientPhishingResponse& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientPhishingResponse::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: phishy_ = false; michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientPhishingResponse::~ClientPhishingResponse() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientPhishingResponse::SharedDtor() { michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientPhishingResponse::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientPhishingResponse& ClientPhishingResponse::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientPhishingResponse* ClientPhishingResponse::default_instance_ = NULL; michael@0: michael@0: ClientPhishingResponse* ClientPhishingResponse::New() const { michael@0: return new ClientPhishingResponse; michael@0: } michael@0: michael@0: void ClientPhishingResponse::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: phishy_ = false; michael@0: } michael@0: obsolete_whitelist_expression_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientPhishingResponse::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required bool phishy = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( michael@0: input, &phishy_))); michael@0: set_has_phishy(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_OBSOLETE_whitelist_expression; michael@0: break; michael@0: } michael@0: michael@0: // repeated string OBSOLETE_whitelist_expression = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_OBSOLETE_whitelist_expression: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->add_obsolete_whitelist_expression())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_OBSOLETE_whitelist_expression; michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientPhishingResponse::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required bool phishy = 1; michael@0: if (has_phishy()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->phishy(), output); michael@0: } michael@0: michael@0: // repeated string OBSOLETE_whitelist_expression = 2; michael@0: for (int i = 0; i < this->obsolete_whitelist_expression_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 2, this->obsolete_whitelist_expression(i), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientPhishingResponse::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required bool phishy = 1; michael@0: if (has_phishy()) { michael@0: total_size += 1 + 1; michael@0: } michael@0: michael@0: } michael@0: // repeated string OBSOLETE_whitelist_expression = 2; michael@0: total_size += 1 * this->obsolete_whitelist_expression_size(); michael@0: for (int i = 0; i < this->obsolete_whitelist_expression_size(); i++) { michael@0: total_size += ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->obsolete_whitelist_expression(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientPhishingResponse::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientPhishingResponse::MergeFrom(const ClientPhishingResponse& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: obsolete_whitelist_expression_.MergeFrom(from.obsolete_whitelist_expression_); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_phishy()) { michael@0: set_phishy(from.phishy()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientPhishingResponse::CopyFrom(const ClientPhishingResponse& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientPhishingResponse::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientPhishingResponse::Swap(ClientPhishingResponse* other) { michael@0: if (other != this) { michael@0: std::swap(phishy_, other->phishy_); michael@0: obsolete_whitelist_expression_.Swap(&other->obsolete_whitelist_expression_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientPhishingResponse::GetTypeName() const { michael@0: return "safe_browsing.ClientPhishingResponse"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientMalwareRequest_Feature::kNameFieldNumber; michael@0: const int ClientMalwareRequest_Feature::kValueFieldNumber; michael@0: const int ClientMalwareRequest_Feature::kMetainfoFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientMalwareRequest_Feature::ClientMalwareRequest_Feature() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientMalwareRequest_Feature::ClientMalwareRequest_Feature(const ClientMalwareRequest_Feature& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: value_ = 0; michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientMalwareRequest_Feature::~ClientMalwareRequest_Feature() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::SharedDtor() { michael@0: if (name_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete name_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientMalwareRequest_Feature& ClientMalwareRequest_Feature::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientMalwareRequest_Feature* ClientMalwareRequest_Feature::default_instance_ = NULL; michael@0: michael@0: ClientMalwareRequest_Feature* ClientMalwareRequest_Feature::New() const { michael@0: return new ClientMalwareRequest_Feature; michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_name()) { michael@0: if (name_ != &::google::protobuf::internal::kEmptyString) { michael@0: name_->clear(); michael@0: } michael@0: } michael@0: value_ = 0; michael@0: } michael@0: metainfo_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientMalwareRequest_Feature::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required string name = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_name())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(17)) goto parse_value; michael@0: break; michael@0: } michael@0: michael@0: // required double value = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { michael@0: parse_value: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( michael@0: input, &value_))); michael@0: set_has_value(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(26)) goto parse_metainfo; michael@0: break; michael@0: } michael@0: michael@0: // repeated string metainfo = 3; michael@0: case 3: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_metainfo: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->add_metainfo())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(26)) goto parse_metainfo; michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required string name = 1; michael@0: if (has_name()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->name(), output); michael@0: } michael@0: michael@0: // required double value = 2; michael@0: if (has_value()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output); michael@0: } michael@0: michael@0: // repeated string metainfo = 3; michael@0: for (int i = 0; i < this->metainfo_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 3, this->metainfo(i), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientMalwareRequest_Feature::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required string name = 1; michael@0: if (has_name()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->name()); michael@0: } michael@0: michael@0: // required double value = 2; michael@0: if (has_value()) { michael@0: total_size += 1 + 8; michael@0: } michael@0: michael@0: } michael@0: // repeated string metainfo = 3; michael@0: total_size += 1 * this->metainfo_size(); michael@0: for (int i = 0; i < this->metainfo_size(); i++) { michael@0: total_size += ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->metainfo(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::MergeFrom(const ClientMalwareRequest_Feature& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: metainfo_.MergeFrom(from.metainfo_); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_name()) { michael@0: set_name(from.name()); michael@0: } michael@0: if (from.has_value()) { michael@0: set_value(from.value()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::CopyFrom(const ClientMalwareRequest_Feature& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientMalwareRequest_Feature::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientMalwareRequest_Feature::Swap(ClientMalwareRequest_Feature* other) { michael@0: if (other != this) { michael@0: std::swap(name_, other->name_); michael@0: std::swap(value_, other->value_); michael@0: metainfo_.Swap(&other->metainfo_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientMalwareRequest_Feature::GetTypeName() const { michael@0: return "safe_browsing.ClientMalwareRequest.Feature"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientMalwareRequest::kUrlFieldNumber; michael@0: const int ClientMalwareRequest::kFeatureMapFieldNumber; michael@0: const int ClientMalwareRequest::kReferrerUrlFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientMalwareRequest::ClientMalwareRequest() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientMalwareRequest::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientMalwareRequest::ClientMalwareRequest(const ClientMalwareRequest& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientMalwareRequest::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientMalwareRequest::~ClientMalwareRequest() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientMalwareRequest::SharedDtor() { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete url_; michael@0: } michael@0: if (referrer_url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete referrer_url_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientMalwareRequest::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientMalwareRequest& ClientMalwareRequest::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientMalwareRequest* ClientMalwareRequest::default_instance_ = NULL; michael@0: michael@0: ClientMalwareRequest* ClientMalwareRequest::New() const { michael@0: return new ClientMalwareRequest; michael@0: } michael@0: michael@0: void ClientMalwareRequest::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_url()) { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: url_->clear(); michael@0: } michael@0: } michael@0: if (has_referrer_url()) { michael@0: if (referrer_url_ != &::google::protobuf::internal::kEmptyString) { michael@0: referrer_url_->clear(); michael@0: } michael@0: } michael@0: } michael@0: feature_map_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientMalwareRequest::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required string url = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_feature_map; michael@0: break; michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_feature_map: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, add_feature_map())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_feature_map; michael@0: if (input->ExpectTag(34)) goto parse_referrer_url; michael@0: break; michael@0: } michael@0: michael@0: // optional string referrer_url = 4; michael@0: case 4: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_referrer_url: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_referrer_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientMalwareRequest::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required string url = 1; michael@0: if (has_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->url(), output); michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; michael@0: for (int i = 0; i < this->feature_map_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 2, this->feature_map(i), output); michael@0: } michael@0: michael@0: // optional string referrer_url = 4; michael@0: if (has_referrer_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 4, this->referrer_url(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientMalwareRequest::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required string url = 1; michael@0: if (has_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->url()); michael@0: } michael@0: michael@0: // optional string referrer_url = 4; michael@0: if (has_referrer_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->referrer_url()); michael@0: } michael@0: michael@0: } michael@0: // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; michael@0: total_size += 1 * this->feature_map_size(); michael@0: for (int i = 0; i < this->feature_map_size(); i++) { michael@0: total_size += michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->feature_map(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientMalwareRequest::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientMalwareRequest::MergeFrom(const ClientMalwareRequest& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: feature_map_.MergeFrom(from.feature_map_); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_url()) { michael@0: set_url(from.url()); michael@0: } michael@0: if (from.has_referrer_url()) { michael@0: set_referrer_url(from.referrer_url()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientMalwareRequest::CopyFrom(const ClientMalwareRequest& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientMalwareRequest::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; michael@0: michael@0: for (int i = 0; i < feature_map_size(); i++) { michael@0: if (!this->feature_map(i).IsInitialized()) return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: void ClientMalwareRequest::Swap(ClientMalwareRequest* other) { michael@0: if (other != this) { michael@0: std::swap(url_, other->url_); michael@0: feature_map_.Swap(&other->feature_map_); michael@0: std::swap(referrer_url_, other->referrer_url_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientMalwareRequest::GetTypeName() const { michael@0: return "safe_browsing.ClientMalwareRequest"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientMalwareResponse::kBlacklistFieldNumber; michael@0: const int ClientMalwareResponse::kBadIpFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientMalwareResponse::ClientMalwareResponse() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientMalwareResponse::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientMalwareResponse::ClientMalwareResponse(const ClientMalwareResponse& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientMalwareResponse::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: blacklist_ = false; michael@0: bad_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientMalwareResponse::~ClientMalwareResponse() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientMalwareResponse::SharedDtor() { michael@0: if (bad_ip_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete bad_ip_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientMalwareResponse::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientMalwareResponse& ClientMalwareResponse::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientMalwareResponse* ClientMalwareResponse::default_instance_ = NULL; michael@0: michael@0: ClientMalwareResponse* ClientMalwareResponse::New() const { michael@0: return new ClientMalwareResponse; michael@0: } michael@0: michael@0: void ClientMalwareResponse::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: blacklist_ = false; michael@0: if (has_bad_ip()) { michael@0: if (bad_ip_ != &::google::protobuf::internal::kEmptyString) { michael@0: bad_ip_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientMalwareResponse::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required bool blacklist = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( michael@0: input, &blacklist_))); michael@0: set_has_blacklist(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_bad_ip; michael@0: break; michael@0: } michael@0: michael@0: // optional string bad_ip = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_bad_ip: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_bad_ip())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientMalwareResponse::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required bool blacklist = 1; michael@0: if (has_blacklist()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->blacklist(), output); michael@0: } michael@0: michael@0: // optional string bad_ip = 2; michael@0: if (has_bad_ip()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 2, this->bad_ip(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientMalwareResponse::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required bool blacklist = 1; michael@0: if (has_blacklist()) { michael@0: total_size += 1 + 1; michael@0: } michael@0: michael@0: // optional string bad_ip = 2; michael@0: if (has_bad_ip()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->bad_ip()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientMalwareResponse::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientMalwareResponse::MergeFrom(const ClientMalwareResponse& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_blacklist()) { michael@0: set_blacklist(from.blacklist()); michael@0: } michael@0: if (from.has_bad_ip()) { michael@0: set_bad_ip(from.bad_ip()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientMalwareResponse::CopyFrom(const ClientMalwareResponse& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientMalwareResponse::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientMalwareResponse::Swap(ClientMalwareResponse* other) { michael@0: if (other != this) { michael@0: std::swap(blacklist_, other->blacklist_); michael@0: std::swap(bad_ip_, other->bad_ip_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientMalwareResponse::GetTypeName() const { michael@0: return "safe_browsing.ClientMalwareResponse"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: bool ClientDownloadRequest_ResourceType_IsValid(int value) { michael@0: switch(value) { michael@0: case 0: michael@0: case 1: michael@0: case 2: michael@0: case 3: michael@0: return true; michael@0: default: michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: #ifndef _MSC_VER michael@0: const ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_URL; michael@0: const ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_REDIRECT; michael@0: const ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_URL; michael@0: const ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_REDIRECT; michael@0: const ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MIN; michael@0: const ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MAX; michael@0: const int ClientDownloadRequest::ResourceType_ARRAYSIZE; michael@0: #endif // _MSC_VER michael@0: bool ClientDownloadRequest_DownloadType_IsValid(int value) { michael@0: switch(value) { michael@0: case 0: michael@0: case 1: michael@0: case 2: michael@0: case 3: michael@0: return true; michael@0: default: michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: #ifndef _MSC_VER michael@0: const ClientDownloadRequest_DownloadType ClientDownloadRequest::WIN_EXECUTABLE; michael@0: const ClientDownloadRequest_DownloadType ClientDownloadRequest::CHROME_EXTENSION; michael@0: const ClientDownloadRequest_DownloadType ClientDownloadRequest::ANDROID_APK; michael@0: const ClientDownloadRequest_DownloadType ClientDownloadRequest::ZIPPED_EXECUTABLE; michael@0: const ClientDownloadRequest_DownloadType ClientDownloadRequest::DownloadType_MIN; michael@0: const ClientDownloadRequest_DownloadType ClientDownloadRequest::DownloadType_MAX; michael@0: const int ClientDownloadRequest::DownloadType_ARRAYSIZE; michael@0: #endif // _MSC_VER michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadRequest_Digests::kSha256FieldNumber; michael@0: const int ClientDownloadRequest_Digests::kSha1FieldNumber; michael@0: const int ClientDownloadRequest_Digests::kMd5FieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadRequest_Digests::ClientDownloadRequest_Digests() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadRequest_Digests::ClientDownloadRequest_Digests(const ClientDownloadRequest_Digests& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: sha256_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: sha1_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: md5_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadRequest_Digests::~ClientDownloadRequest_Digests() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::SharedDtor() { michael@0: if (sha256_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete sha256_; michael@0: } michael@0: if (sha1_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete sha1_; michael@0: } michael@0: if (md5_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete md5_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadRequest_Digests& ClientDownloadRequest_Digests::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadRequest_Digests* ClientDownloadRequest_Digests::default_instance_ = NULL; michael@0: michael@0: ClientDownloadRequest_Digests* ClientDownloadRequest_Digests::New() const { michael@0: return new ClientDownloadRequest_Digests; michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_sha256()) { michael@0: if (sha256_ != &::google::protobuf::internal::kEmptyString) { michael@0: sha256_->clear(); michael@0: } michael@0: } michael@0: if (has_sha1()) { michael@0: if (sha1_ != &::google::protobuf::internal::kEmptyString) { michael@0: sha1_->clear(); michael@0: } michael@0: } michael@0: if (has_md5()) { michael@0: if (md5_ != &::google::protobuf::internal::kEmptyString) { michael@0: md5_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_Digests::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional bytes sha256 = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_sha256())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_sha1; michael@0: break; michael@0: } michael@0: michael@0: // optional bytes sha1 = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_sha1: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_sha1())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(26)) goto parse_md5; michael@0: break; michael@0: } michael@0: michael@0: // optional bytes md5 = 3; michael@0: case 3: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_md5: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_md5())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional bytes sha256 = 1; michael@0: if (has_sha256()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 1, this->sha256(), output); michael@0: } michael@0: michael@0: // optional bytes sha1 = 2; michael@0: if (has_sha1()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 2, this->sha1(), output); michael@0: } michael@0: michael@0: // optional bytes md5 = 3; michael@0: if (has_md5()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 3, this->md5(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadRequest_Digests::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional bytes sha256 = 1; michael@0: if (has_sha256()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->sha256()); michael@0: } michael@0: michael@0: // optional bytes sha1 = 2; michael@0: if (has_sha1()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->sha1()); michael@0: } michael@0: michael@0: // optional bytes md5 = 3; michael@0: if (has_md5()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->md5()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::MergeFrom(const ClientDownloadRequest_Digests& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_sha256()) { michael@0: set_sha256(from.sha256()); michael@0: } michael@0: if (from.has_sha1()) { michael@0: set_sha1(from.sha1()); michael@0: } michael@0: if (from.has_md5()) { michael@0: set_md5(from.md5()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::CopyFrom(const ClientDownloadRequest_Digests& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_Digests::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadRequest_Digests::Swap(ClientDownloadRequest_Digests* other) { michael@0: if (other != this) { michael@0: std::swap(sha256_, other->sha256_); michael@0: std::swap(sha1_, other->sha1_); michael@0: std::swap(md5_, other->md5_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadRequest_Digests::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadRequest.Digests"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadRequest_Resource::kUrlFieldNumber; michael@0: const int ClientDownloadRequest_Resource::kTypeFieldNumber; michael@0: const int ClientDownloadRequest_Resource::kRemoteIpFieldNumber; michael@0: const int ClientDownloadRequest_Resource::kReferrerFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadRequest_Resource::ClientDownloadRequest_Resource() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadRequest_Resource::ClientDownloadRequest_Resource(const ClientDownloadRequest_Resource& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: type_ = 0; michael@0: remote_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadRequest_Resource::~ClientDownloadRequest_Resource() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::SharedDtor() { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete url_; michael@0: } michael@0: if (remote_ip_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete remote_ip_; michael@0: } michael@0: if (referrer_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete referrer_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadRequest_Resource& ClientDownloadRequest_Resource::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadRequest_Resource* ClientDownloadRequest_Resource::default_instance_ = NULL; michael@0: michael@0: ClientDownloadRequest_Resource* ClientDownloadRequest_Resource::New() const { michael@0: return new ClientDownloadRequest_Resource; michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_url()) { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: url_->clear(); michael@0: } michael@0: } michael@0: type_ = 0; michael@0: if (has_remote_ip()) { michael@0: if (remote_ip_ != &::google::protobuf::internal::kEmptyString) { michael@0: remote_ip_->clear(); michael@0: } michael@0: } michael@0: if (has_referrer()) { michael@0: if (referrer_ != &::google::protobuf::internal::kEmptyString) { michael@0: referrer_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_Resource::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required string url = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(16)) goto parse_type; michael@0: break; michael@0: } michael@0: michael@0: // required .safe_browsing.ClientDownloadRequest.ResourceType type = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_type: michael@0: int value; michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( michael@0: input, &value))); michael@0: if (::safe_browsing::ClientDownloadRequest_ResourceType_IsValid(value)) { michael@0: set_type(static_cast< ::safe_browsing::ClientDownloadRequest_ResourceType >(value)); michael@0: } michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(26)) goto parse_remote_ip; michael@0: break; michael@0: } michael@0: michael@0: // optional bytes remote_ip = 3; michael@0: case 3: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_remote_ip: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_remote_ip())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(34)) goto parse_referrer; michael@0: break; michael@0: } michael@0: michael@0: // optional string referrer = 4; michael@0: case 4: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_referrer: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_referrer())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required string url = 1; michael@0: if (has_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->url(), output); michael@0: } michael@0: michael@0: // required .safe_browsing.ClientDownloadRequest.ResourceType type = 2; michael@0: if (has_type()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteEnum( michael@0: 2, this->type(), output); michael@0: } michael@0: michael@0: // optional bytes remote_ip = 3; michael@0: if (has_remote_ip()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 3, this->remote_ip(), output); michael@0: } michael@0: michael@0: // optional string referrer = 4; michael@0: if (has_referrer()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 4, this->referrer(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadRequest_Resource::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required string url = 1; michael@0: if (has_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->url()); michael@0: } michael@0: michael@0: // required .safe_browsing.ClientDownloadRequest.ResourceType type = 2; michael@0: if (has_type()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); michael@0: } michael@0: michael@0: // optional bytes remote_ip = 3; michael@0: if (has_remote_ip()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->remote_ip()); michael@0: } michael@0: michael@0: // optional string referrer = 4; michael@0: if (has_referrer()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->referrer()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::MergeFrom(const ClientDownloadRequest_Resource& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_url()) { michael@0: set_url(from.url()); michael@0: } michael@0: if (from.has_type()) { michael@0: set_type(from.type()); michael@0: } michael@0: if (from.has_remote_ip()) { michael@0: set_remote_ip(from.remote_ip()); michael@0: } michael@0: if (from.has_referrer()) { michael@0: set_referrer(from.referrer()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::CopyFrom(const ClientDownloadRequest_Resource& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_Resource::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadRequest_Resource::Swap(ClientDownloadRequest_Resource* other) { michael@0: if (other != this) { michael@0: std::swap(url_, other->url_); michael@0: std::swap(type_, other->type_); michael@0: std::swap(remote_ip_, other->remote_ip_); michael@0: std::swap(referrer_, other->referrer_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadRequest_Resource::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadRequest.Resource"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadRequest_CertificateChain_Element::kCertificateFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadRequest_CertificateChain_Element::ClientDownloadRequest_CertificateChain_Element() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadRequest_CertificateChain_Element::ClientDownloadRequest_CertificateChain_Element(const ClientDownloadRequest_CertificateChain_Element& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: certificate_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadRequest_CertificateChain_Element::~ClientDownloadRequest_CertificateChain_Element() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::SharedDtor() { michael@0: if (certificate_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete certificate_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadRequest_CertificateChain_Element& ClientDownloadRequest_CertificateChain_Element::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadRequest_CertificateChain_Element* ClientDownloadRequest_CertificateChain_Element::default_instance_ = NULL; michael@0: michael@0: ClientDownloadRequest_CertificateChain_Element* ClientDownloadRequest_CertificateChain_Element::New() const { michael@0: return new ClientDownloadRequest_CertificateChain_Element; michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_certificate()) { michael@0: if (certificate_ != &::google::protobuf::internal::kEmptyString) { michael@0: certificate_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_CertificateChain_Element::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional bytes certificate = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_certificate())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional bytes certificate = 1; michael@0: if (has_certificate()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 1, this->certificate(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadRequest_CertificateChain_Element::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional bytes certificate = 1; michael@0: if (has_certificate()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->certificate()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::MergeFrom(const ClientDownloadRequest_CertificateChain_Element& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_certificate()) { michael@0: set_certificate(from.certificate()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::CopyFrom(const ClientDownloadRequest_CertificateChain_Element& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_CertificateChain_Element::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain_Element::Swap(ClientDownloadRequest_CertificateChain_Element* other) { michael@0: if (other != this) { michael@0: std::swap(certificate_, other->certificate_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadRequest_CertificateChain_Element::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadRequest.CertificateChain.Element"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadRequest_CertificateChain::kElementFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadRequest_CertificateChain::ClientDownloadRequest_CertificateChain() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadRequest_CertificateChain::ClientDownloadRequest_CertificateChain(const ClientDownloadRequest_CertificateChain& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadRequest_CertificateChain::~ClientDownloadRequest_CertificateChain() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::SharedDtor() { michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadRequest_CertificateChain& ClientDownloadRequest_CertificateChain::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadRequest_CertificateChain* ClientDownloadRequest_CertificateChain::default_instance_ = NULL; michael@0: michael@0: ClientDownloadRequest_CertificateChain* ClientDownloadRequest_CertificateChain::New() const { michael@0: return new ClientDownloadRequest_CertificateChain; michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::Clear() { michael@0: element_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_CertificateChain::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_element: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, add_element())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(10)) goto parse_element; michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1; michael@0: for (int i = 0; i < this->element_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 1, this->element(i), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadRequest_CertificateChain::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: // repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1; michael@0: total_size += 1 * this->element_size(); michael@0: for (int i = 0; i < this->element_size(); i++) { michael@0: total_size += michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->element(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::MergeFrom(const ClientDownloadRequest_CertificateChain& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: element_.MergeFrom(from.element_); michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::CopyFrom(const ClientDownloadRequest_CertificateChain& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_CertificateChain::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadRequest_CertificateChain::Swap(ClientDownloadRequest_CertificateChain* other) { michael@0: if (other != this) { michael@0: element_.Swap(&other->element_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadRequest_CertificateChain::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadRequest.CertificateChain"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadRequest_SignatureInfo::kCertificateChainFieldNumber; michael@0: const int ClientDownloadRequest_SignatureInfo::kTrustedFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadRequest_SignatureInfo::ClientDownloadRequest_SignatureInfo() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadRequest_SignatureInfo::ClientDownloadRequest_SignatureInfo(const ClientDownloadRequest_SignatureInfo& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: trusted_ = false; michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadRequest_SignatureInfo::~ClientDownloadRequest_SignatureInfo() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::SharedDtor() { michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadRequest_SignatureInfo& ClientDownloadRequest_SignatureInfo::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadRequest_SignatureInfo* ClientDownloadRequest_SignatureInfo::default_instance_ = NULL; michael@0: michael@0: ClientDownloadRequest_SignatureInfo* ClientDownloadRequest_SignatureInfo::New() const { michael@0: return new ClientDownloadRequest_SignatureInfo; michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::Clear() { michael@0: if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { michael@0: trusted_ = false; michael@0: } michael@0: certificate_chain_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_SignatureInfo::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_certificate_chain: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, add_certificate_chain())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(10)) goto parse_certificate_chain; michael@0: if (input->ExpectTag(16)) goto parse_trusted; michael@0: break; michael@0: } michael@0: michael@0: // optional bool trusted = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_trusted: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( michael@0: input, &trusted_))); michael@0: set_has_trusted(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1; michael@0: for (int i = 0; i < this->certificate_chain_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 1, this->certificate_chain(i), output); michael@0: } michael@0: michael@0: // optional bool trusted = 2; michael@0: if (has_trusted()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBool(2, this->trusted(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadRequest_SignatureInfo::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) { michael@0: // optional bool trusted = 2; michael@0: if (has_trusted()) { michael@0: total_size += 1 + 1; michael@0: } michael@0: michael@0: } michael@0: // repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1; michael@0: total_size += 1 * this->certificate_chain_size(); michael@0: for (int i = 0; i < this->certificate_chain_size(); i++) { michael@0: total_size += michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->certificate_chain(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::MergeFrom(const ClientDownloadRequest_SignatureInfo& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: certificate_chain_.MergeFrom(from.certificate_chain_); michael@0: if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) { michael@0: if (from.has_trusted()) { michael@0: set_trusted(from.trusted()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::CopyFrom(const ClientDownloadRequest_SignatureInfo& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadRequest_SignatureInfo::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadRequest_SignatureInfo::Swap(ClientDownloadRequest_SignatureInfo* other) { michael@0: if (other != this) { michael@0: certificate_chain_.Swap(&other->certificate_chain_); michael@0: std::swap(trusted_, other->trusted_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadRequest_SignatureInfo::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadRequest.SignatureInfo"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadRequest::kUrlFieldNumber; michael@0: const int ClientDownloadRequest::kDigestsFieldNumber; michael@0: const int ClientDownloadRequest::kLengthFieldNumber; michael@0: const int ClientDownloadRequest::kResourcesFieldNumber; michael@0: const int ClientDownloadRequest::kSignatureFieldNumber; michael@0: const int ClientDownloadRequest::kUserInitiatedFieldNumber; michael@0: const int ClientDownloadRequest::kFileBasenameFieldNumber; michael@0: const int ClientDownloadRequest::kDownloadTypeFieldNumber; michael@0: const int ClientDownloadRequest::kLocaleFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadRequest::ClientDownloadRequest() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest::InitAsDefaultInstance() { michael@0: digests_ = const_cast< ::safe_browsing::ClientDownloadRequest_Digests*>(&::safe_browsing::ClientDownloadRequest_Digests::default_instance()); michael@0: signature_ = const_cast< ::safe_browsing::ClientDownloadRequest_SignatureInfo*>(&::safe_browsing::ClientDownloadRequest_SignatureInfo::default_instance()); michael@0: } michael@0: michael@0: ClientDownloadRequest::ClientDownloadRequest(const ClientDownloadRequest& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadRequest::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: digests_ = NULL; michael@0: length_ = GOOGLE_LONGLONG(0); michael@0: signature_ = NULL; michael@0: user_initiated_ = false; michael@0: file_basename_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: download_type_ = 0; michael@0: locale_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadRequest::~ClientDownloadRequest() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadRequest::SharedDtor() { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete url_; michael@0: } michael@0: if (file_basename_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete file_basename_; michael@0: } michael@0: if (locale_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete locale_; michael@0: } michael@0: if (this != default_instance_) { michael@0: delete digests_; michael@0: delete signature_; michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadRequest& ClientDownloadRequest::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadRequest* ClientDownloadRequest::default_instance_ = NULL; michael@0: michael@0: ClientDownloadRequest* ClientDownloadRequest::New() const { michael@0: return new ClientDownloadRequest; michael@0: } michael@0: michael@0: void ClientDownloadRequest::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_url()) { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: url_->clear(); michael@0: } michael@0: } michael@0: if (has_digests()) { michael@0: if (digests_ != NULL) digests_->::safe_browsing::ClientDownloadRequest_Digests::Clear(); michael@0: } michael@0: length_ = GOOGLE_LONGLONG(0); michael@0: if (has_signature()) { michael@0: if (signature_ != NULL) signature_->::safe_browsing::ClientDownloadRequest_SignatureInfo::Clear(); michael@0: } michael@0: user_initiated_ = false; michael@0: if (has_file_basename()) { michael@0: if (file_basename_ != &::google::protobuf::internal::kEmptyString) { michael@0: file_basename_->clear(); michael@0: } michael@0: } michael@0: download_type_ = 0; michael@0: } michael@0: if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { michael@0: if (has_locale()) { michael@0: if (locale_ != &::google::protobuf::internal::kEmptyString) { michael@0: locale_->clear(); michael@0: } michael@0: } michael@0: } michael@0: resources_.Clear(); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadRequest::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required string url = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_digests; michael@0: break; michael@0: } michael@0: michael@0: // required .safe_browsing.ClientDownloadRequest.Digests digests = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_digests: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, mutable_digests())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(24)) goto parse_length; michael@0: break; michael@0: } michael@0: michael@0: // required int64 length = 3; michael@0: case 3: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_length: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( michael@0: input, &length_))); michael@0: set_has_length(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(34)) goto parse_resources; michael@0: break; michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4; michael@0: case 4: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_resources: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, add_resources())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(34)) goto parse_resources; michael@0: if (input->ExpectTag(42)) goto parse_signature; michael@0: break; michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5; michael@0: case 5: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_signature: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, mutable_signature())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(48)) goto parse_user_initiated; michael@0: break; michael@0: } michael@0: michael@0: // optional bool user_initiated = 6; michael@0: case 6: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_user_initiated: michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( michael@0: input, &user_initiated_))); michael@0: set_has_user_initiated(); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(74)) goto parse_file_basename; michael@0: break; michael@0: } michael@0: michael@0: // optional string file_basename = 9; michael@0: case 9: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_file_basename: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_file_basename())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(80)) goto parse_download_type; michael@0: break; michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE]; michael@0: case 10: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: parse_download_type: michael@0: int value; michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( michael@0: input, &value))); michael@0: if (::safe_browsing::ClientDownloadRequest_DownloadType_IsValid(value)) { michael@0: set_download_type(static_cast< ::safe_browsing::ClientDownloadRequest_DownloadType >(value)); michael@0: } michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(90)) goto parse_locale; michael@0: break; michael@0: } michael@0: michael@0: // optional string locale = 11; michael@0: case 11: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_locale: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_locale())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadRequest::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required string url = 1; michael@0: if (has_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->url(), output); michael@0: } michael@0: michael@0: // required .safe_browsing.ClientDownloadRequest.Digests digests = 2; michael@0: if (has_digests()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 2, this->digests(), output); michael@0: } michael@0: michael@0: // required int64 length = 3; michael@0: if (has_length()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->length(), output); michael@0: } michael@0: michael@0: // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4; michael@0: for (int i = 0; i < this->resources_size(); i++) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 4, this->resources(i), output); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5; michael@0: if (has_signature()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 5, this->signature(), output); michael@0: } michael@0: michael@0: // optional bool user_initiated = 6; michael@0: if (has_user_initiated()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->user_initiated(), output); michael@0: } michael@0: michael@0: // optional string file_basename = 9; michael@0: if (has_file_basename()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 9, this->file_basename(), output); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE]; michael@0: if (has_download_type()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteEnum( michael@0: 10, this->download_type(), output); michael@0: } michael@0: michael@0: // optional string locale = 11; michael@0: if (has_locale()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 11, this->locale(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadRequest::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required string url = 1; michael@0: if (has_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->url()); michael@0: } michael@0: michael@0: // required .safe_browsing.ClientDownloadRequest.Digests digests = 2; michael@0: if (has_digests()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->digests()); michael@0: } michael@0: michael@0: // required int64 length = 3; michael@0: if (has_length()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::Int64Size( michael@0: this->length()); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5; michael@0: if (has_signature()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->signature()); michael@0: } michael@0: michael@0: // optional bool user_initiated = 6; michael@0: if (has_user_initiated()) { michael@0: total_size += 1 + 1; michael@0: } michael@0: michael@0: // optional string file_basename = 9; michael@0: if (has_file_basename()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->file_basename()); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE]; michael@0: if (has_download_type()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::EnumSize(this->download_type()); michael@0: } michael@0: michael@0: } michael@0: if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { michael@0: // optional string locale = 11; michael@0: if (has_locale()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->locale()); michael@0: } michael@0: michael@0: } michael@0: // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4; michael@0: total_size += 1 * this->resources_size(); michael@0: for (int i = 0; i < this->resources_size(); i++) { michael@0: total_size += michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->resources(i)); michael@0: } michael@0: michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadRequest::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadRequest::MergeFrom(const ClientDownloadRequest& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: resources_.MergeFrom(from.resources_); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_url()) { michael@0: set_url(from.url()); michael@0: } michael@0: if (from.has_digests()) { michael@0: mutable_digests()->::safe_browsing::ClientDownloadRequest_Digests::MergeFrom(from.digests()); michael@0: } michael@0: if (from.has_length()) { michael@0: set_length(from.length()); michael@0: } michael@0: if (from.has_signature()) { michael@0: mutable_signature()->::safe_browsing::ClientDownloadRequest_SignatureInfo::MergeFrom(from.signature()); michael@0: } michael@0: if (from.has_user_initiated()) { michael@0: set_user_initiated(from.user_initiated()); michael@0: } michael@0: if (from.has_file_basename()) { michael@0: set_file_basename(from.file_basename()); michael@0: } michael@0: if (from.has_download_type()) { michael@0: set_download_type(from.download_type()); michael@0: } michael@0: } michael@0: if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { michael@0: if (from.has_locale()) { michael@0: set_locale(from.locale()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadRequest::CopyFrom(const ClientDownloadRequest& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadRequest::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false; michael@0: michael@0: for (int i = 0; i < resources_size(); i++) { michael@0: if (!this->resources(i).IsInitialized()) return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadRequest::Swap(ClientDownloadRequest* other) { michael@0: if (other != this) { michael@0: std::swap(url_, other->url_); michael@0: std::swap(digests_, other->digests_); michael@0: std::swap(length_, other->length_); michael@0: resources_.Swap(&other->resources_); michael@0: std::swap(signature_, other->signature_); michael@0: std::swap(user_initiated_, other->user_initiated_); michael@0: std::swap(file_basename_, other->file_basename_); michael@0: std::swap(download_type_, other->download_type_); michael@0: std::swap(locale_, other->locale_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadRequest::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadRequest"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: bool ClientDownloadResponse_Verdict_IsValid(int value) { michael@0: switch(value) { michael@0: case 0: michael@0: case 1: michael@0: case 2: michael@0: case 3: michael@0: case 4: michael@0: return true; michael@0: default: michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: #ifndef _MSC_VER michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::SAFE; michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::DANGEROUS; michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::UNCOMMON; michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::POTENTIALLY_UNWANTED; michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::DANGEROUS_HOST; michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::Verdict_MIN; michael@0: const ClientDownloadResponse_Verdict ClientDownloadResponse::Verdict_MAX; michael@0: const int ClientDownloadResponse::Verdict_ARRAYSIZE; michael@0: #endif // _MSC_VER michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadResponse_MoreInfo::kDescriptionFieldNumber; michael@0: const int ClientDownloadResponse_MoreInfo::kUrlFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadResponse_MoreInfo::ClientDownloadResponse_MoreInfo() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadResponse_MoreInfo::ClientDownloadResponse_MoreInfo(const ClientDownloadResponse_MoreInfo& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: description_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadResponse_MoreInfo::~ClientDownloadResponse_MoreInfo() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::SharedDtor() { michael@0: if (description_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete description_; michael@0: } michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete url_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadResponse_MoreInfo& ClientDownloadResponse_MoreInfo::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadResponse_MoreInfo* ClientDownloadResponse_MoreInfo::default_instance_ = NULL; michael@0: michael@0: ClientDownloadResponse_MoreInfo* ClientDownloadResponse_MoreInfo::New() const { michael@0: return new ClientDownloadResponse_MoreInfo; michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_description()) { michael@0: if (description_ != &::google::protobuf::internal::kEmptyString) { michael@0: description_->clear(); michael@0: } michael@0: } michael@0: if (has_url()) { michael@0: if (url_ != &::google::protobuf::internal::kEmptyString) { michael@0: url_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadResponse_MoreInfo::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional string description = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_description())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_url; michael@0: break; michael@0: } michael@0: michael@0: // optional string url = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_url: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_url())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional string description = 1; michael@0: if (has_description()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->description(), output); michael@0: } michael@0: michael@0: // optional string url = 2; michael@0: if (has_url()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 2, this->url(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadResponse_MoreInfo::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional string description = 1; michael@0: if (has_description()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->description()); michael@0: } michael@0: michael@0: // optional string url = 2; michael@0: if (has_url()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->url()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::MergeFrom(const ClientDownloadResponse_MoreInfo& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_description()) { michael@0: set_description(from.description()); michael@0: } michael@0: if (from.has_url()) { michael@0: set_url(from.url()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::CopyFrom(const ClientDownloadResponse_MoreInfo& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadResponse_MoreInfo::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadResponse_MoreInfo::Swap(ClientDownloadResponse_MoreInfo* other) { michael@0: if (other != this) { michael@0: std::swap(description_, other->description_); michael@0: std::swap(url_, other->url_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadResponse_MoreInfo::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadResponse.MoreInfo"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadResponse::kVerdictFieldNumber; michael@0: const int ClientDownloadResponse::kMoreInfoFieldNumber; michael@0: const int ClientDownloadResponse::kTokenFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadResponse::ClientDownloadResponse() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadResponse::InitAsDefaultInstance() { michael@0: more_info_ = const_cast< ::safe_browsing::ClientDownloadResponse_MoreInfo*>(&::safe_browsing::ClientDownloadResponse_MoreInfo::default_instance()); michael@0: } michael@0: michael@0: ClientDownloadResponse::ClientDownloadResponse(const ClientDownloadResponse& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadResponse::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: verdict_ = 0; michael@0: more_info_ = NULL; michael@0: token_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadResponse::~ClientDownloadResponse() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadResponse::SharedDtor() { michael@0: if (token_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete token_; michael@0: } michael@0: if (this != default_instance_) { michael@0: delete more_info_; michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadResponse::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadResponse& ClientDownloadResponse::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadResponse* ClientDownloadResponse::default_instance_ = NULL; michael@0: michael@0: ClientDownloadResponse* ClientDownloadResponse::New() const { michael@0: return new ClientDownloadResponse; michael@0: } michael@0: michael@0: void ClientDownloadResponse::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: verdict_ = 0; michael@0: if (has_more_info()) { michael@0: if (more_info_ != NULL) more_info_->::safe_browsing::ClientDownloadResponse_MoreInfo::Clear(); michael@0: } michael@0: if (has_token()) { michael@0: if (token_ != &::google::protobuf::internal::kEmptyString) { michael@0: token_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadResponse::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: int value; michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( michael@0: input, &value))); michael@0: if (::safe_browsing::ClientDownloadResponse_Verdict_IsValid(value)) { michael@0: set_verdict(static_cast< ::safe_browsing::ClientDownloadResponse_Verdict >(value)); michael@0: } michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_more_info; michael@0: break; michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_more_info: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, mutable_more_info())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(26)) goto parse_token; michael@0: break; michael@0: } michael@0: michael@0: // optional bytes token = 3; michael@0: case 3: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_token: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_token())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadResponse::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1; michael@0: if (has_verdict()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteEnum( michael@0: 1, this->verdict(), output); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2; michael@0: if (has_more_info()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 2, this->more_info(), output); michael@0: } michael@0: michael@0: // optional bytes token = 3; michael@0: if (has_token()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 3, this->token(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadResponse::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1; michael@0: if (has_verdict()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::EnumSize(this->verdict()); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2; michael@0: if (has_more_info()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->more_info()); michael@0: } michael@0: michael@0: // optional bytes token = 3; michael@0: if (has_token()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->token()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadResponse::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadResponse::MergeFrom(const ClientDownloadResponse& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_verdict()) { michael@0: set_verdict(from.verdict()); michael@0: } michael@0: if (from.has_more_info()) { michael@0: mutable_more_info()->::safe_browsing::ClientDownloadResponse_MoreInfo::MergeFrom(from.more_info()); michael@0: } michael@0: if (from.has_token()) { michael@0: set_token(from.token()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadResponse::CopyFrom(const ClientDownloadResponse& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadResponse::IsInitialized() const { michael@0: if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadResponse::Swap(ClientDownloadResponse* other) { michael@0: if (other != this) { michael@0: std::swap(verdict_, other->verdict_); michael@0: std::swap(more_info_, other->more_info_); michael@0: std::swap(token_, other->token_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadResponse::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadResponse"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: bool ClientDownloadReport_Reason_IsValid(int value) { michael@0: switch(value) { michael@0: case 0: michael@0: case 1: michael@0: case 2: michael@0: return true; michael@0: default: michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: #ifndef _MSC_VER michael@0: const ClientDownloadReport_Reason ClientDownloadReport::SHARE; michael@0: const ClientDownloadReport_Reason ClientDownloadReport::FALSE_POSITIVE; michael@0: const ClientDownloadReport_Reason ClientDownloadReport::APPEAL; michael@0: const ClientDownloadReport_Reason ClientDownloadReport::Reason_MIN; michael@0: const ClientDownloadReport_Reason ClientDownloadReport::Reason_MAX; michael@0: const int ClientDownloadReport::Reason_ARRAYSIZE; michael@0: #endif // _MSC_VER michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadReport_UserInformation::kEmailFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadReport_UserInformation::ClientDownloadReport_UserInformation() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientDownloadReport_UserInformation::ClientDownloadReport_UserInformation(const ClientDownloadReport_UserInformation& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: email_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadReport_UserInformation::~ClientDownloadReport_UserInformation() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::SharedDtor() { michael@0: if (email_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete email_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadReport_UserInformation& ClientDownloadReport_UserInformation::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadReport_UserInformation* ClientDownloadReport_UserInformation::default_instance_ = NULL; michael@0: michael@0: ClientDownloadReport_UserInformation* ClientDownloadReport_UserInformation::New() const { michael@0: return new ClientDownloadReport_UserInformation; michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (has_email()) { michael@0: if (email_ != &::google::protobuf::internal::kEmptyString) { michael@0: email_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadReport_UserInformation::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional string email = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_email())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional string email = 1; michael@0: if (has_email()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 1, this->email(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadReport_UserInformation::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional string email = 1; michael@0: if (has_email()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->email()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::MergeFrom(const ClientDownloadReport_UserInformation& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_email()) { michael@0: set_email(from.email()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::CopyFrom(const ClientDownloadReport_UserInformation& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadReport_UserInformation::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadReport_UserInformation::Swap(ClientDownloadReport_UserInformation* other) { michael@0: if (other != this) { michael@0: std::swap(email_, other->email_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadReport_UserInformation::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadReport.UserInformation"; michael@0: } michael@0: michael@0: michael@0: // ------------------------------------------------------------------- michael@0: michael@0: #ifndef _MSC_VER michael@0: const int ClientDownloadReport::kReasonFieldNumber; michael@0: const int ClientDownloadReport::kDownloadRequestFieldNumber; michael@0: const int ClientDownloadReport::kUserInformationFieldNumber; michael@0: const int ClientDownloadReport::kCommentFieldNumber; michael@0: const int ClientDownloadReport::kDownloadResponseFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientDownloadReport::ClientDownloadReport() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientDownloadReport::InitAsDefaultInstance() { michael@0: download_request_ = const_cast< ::safe_browsing::ClientDownloadRequest*>(&::safe_browsing::ClientDownloadRequest::default_instance()); michael@0: user_information_ = const_cast< ::safe_browsing::ClientDownloadReport_UserInformation*>(&::safe_browsing::ClientDownloadReport_UserInformation::default_instance()); michael@0: download_response_ = const_cast< ::safe_browsing::ClientDownloadResponse*>(&::safe_browsing::ClientDownloadResponse::default_instance()); michael@0: } michael@0: michael@0: ClientDownloadReport::ClientDownloadReport(const ClientDownloadReport& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientDownloadReport::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: reason_ = 0; michael@0: download_request_ = NULL; michael@0: user_information_ = NULL; michael@0: comment_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: download_response_ = NULL; michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientDownloadReport::~ClientDownloadReport() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientDownloadReport::SharedDtor() { michael@0: if (comment_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete comment_; michael@0: } michael@0: if (this != default_instance_) { michael@0: delete download_request_; michael@0: delete user_information_; michael@0: delete download_response_; michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadReport::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientDownloadReport& ClientDownloadReport::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientDownloadReport* ClientDownloadReport::default_instance_ = NULL; michael@0: michael@0: ClientDownloadReport* ClientDownloadReport::New() const { michael@0: return new ClientDownloadReport; michael@0: } michael@0: michael@0: void ClientDownloadReport::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: reason_ = 0; michael@0: if (has_download_request()) { michael@0: if (download_request_ != NULL) download_request_->::safe_browsing::ClientDownloadRequest::Clear(); michael@0: } michael@0: if (has_user_information()) { michael@0: if (user_information_ != NULL) user_information_->::safe_browsing::ClientDownloadReport_UserInformation::Clear(); michael@0: } michael@0: if (has_comment()) { michael@0: if (comment_ != &::google::protobuf::internal::kEmptyString) { michael@0: comment_->clear(); michael@0: } michael@0: } michael@0: if (has_download_response()) { michael@0: if (download_response_ != NULL) download_response_->::safe_browsing::ClientDownloadResponse::Clear(); michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientDownloadReport::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: int value; michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( michael@0: input, &value))); michael@0: if (::safe_browsing::ClientDownloadReport_Reason_IsValid(value)) { michael@0: set_reason(static_cast< ::safe_browsing::ClientDownloadReport_Reason >(value)); michael@0: } michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_download_request; michael@0: break; michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest download_request = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_download_request: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, mutable_download_request())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(26)) goto parse_user_information; michael@0: break; michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; michael@0: case 3: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_user_information: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, mutable_user_information())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(34)) goto parse_comment; michael@0: break; michael@0: } michael@0: michael@0: // optional bytes comment = 4; michael@0: case 4: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_comment: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( michael@0: input, this->mutable_comment())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(42)) goto parse_download_response; michael@0: break; michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadResponse download_response = 5; michael@0: case 5: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_download_response: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( michael@0: input, mutable_download_response())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientDownloadReport::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; michael@0: if (has_reason()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteEnum( michael@0: 1, this->reason(), output); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest download_request = 2; michael@0: if (has_download_request()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 2, this->download_request(), output); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; michael@0: if (has_user_information()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 3, this->user_information(), output); michael@0: } michael@0: michael@0: // optional bytes comment = 4; michael@0: if (has_comment()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteBytes( michael@0: 4, this->comment(), output); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadResponse download_response = 5; michael@0: if (has_download_response()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteMessage( michael@0: 5, this->download_response(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientDownloadReport::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; michael@0: if (has_reason()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::EnumSize(this->reason()); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadRequest download_request = 2; michael@0: if (has_download_request()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->download_request()); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; michael@0: if (has_user_information()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->user_information()); michael@0: } michael@0: michael@0: // optional bytes comment = 4; michael@0: if (has_comment()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::BytesSize( michael@0: this->comment()); michael@0: } michael@0: michael@0: // optional .safe_browsing.ClientDownloadResponse download_response = 5; michael@0: if (has_download_response()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( michael@0: this->download_response()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientDownloadReport::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientDownloadReport::MergeFrom(const ClientDownloadReport& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_reason()) { michael@0: set_reason(from.reason()); michael@0: } michael@0: if (from.has_download_request()) { michael@0: mutable_download_request()->::safe_browsing::ClientDownloadRequest::MergeFrom(from.download_request()); michael@0: } michael@0: if (from.has_user_information()) { michael@0: mutable_user_information()->::safe_browsing::ClientDownloadReport_UserInformation::MergeFrom(from.user_information()); michael@0: } michael@0: if (from.has_comment()) { michael@0: set_comment(from.comment()); michael@0: } michael@0: if (from.has_download_response()) { michael@0: mutable_download_response()->::safe_browsing::ClientDownloadResponse::MergeFrom(from.download_response()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientDownloadReport::CopyFrom(const ClientDownloadReport& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientDownloadReport::IsInitialized() const { michael@0: michael@0: if (has_download_request()) { michael@0: if (!this->download_request().IsInitialized()) return false; michael@0: } michael@0: if (has_download_response()) { michael@0: if (!this->download_response().IsInitialized()) return false; michael@0: } michael@0: return true; michael@0: } michael@0: michael@0: void ClientDownloadReport::Swap(ClientDownloadReport* other) { michael@0: if (other != this) { michael@0: std::swap(reason_, other->reason_); michael@0: std::swap(download_request_, other->download_request_); michael@0: std::swap(user_information_, other->user_information_); michael@0: std::swap(comment_, other->comment_); michael@0: std::swap(download_response_, other->download_response_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientDownloadReport::GetTypeName() const { michael@0: return "safe_browsing.ClientDownloadReport"; michael@0: } michael@0: michael@0: michael@0: // =================================================================== michael@0: michael@0: bool ClientUploadResponse_UploadStatus_IsValid(int value) { michael@0: switch(value) { michael@0: case 0: michael@0: case 1: michael@0: return true; michael@0: default: michael@0: return false; michael@0: } michael@0: } michael@0: michael@0: #ifndef _MSC_VER michael@0: const ClientUploadResponse_UploadStatus ClientUploadResponse::SUCCESS; michael@0: const ClientUploadResponse_UploadStatus ClientUploadResponse::UPLOAD_FAILURE; michael@0: const ClientUploadResponse_UploadStatus ClientUploadResponse::UploadStatus_MIN; michael@0: const ClientUploadResponse_UploadStatus ClientUploadResponse::UploadStatus_MAX; michael@0: const int ClientUploadResponse::UploadStatus_ARRAYSIZE; michael@0: #endif // _MSC_VER michael@0: #ifndef _MSC_VER michael@0: const int ClientUploadResponse::kStatusFieldNumber; michael@0: const int ClientUploadResponse::kPermalinkFieldNumber; michael@0: #endif // !_MSC_VER michael@0: michael@0: ClientUploadResponse::ClientUploadResponse() michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: } michael@0: michael@0: void ClientUploadResponse::InitAsDefaultInstance() { michael@0: } michael@0: michael@0: ClientUploadResponse::ClientUploadResponse(const ClientUploadResponse& from) michael@0: : ::google::protobuf::MessageLite() { michael@0: SharedCtor(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: void ClientUploadResponse::SharedCtor() { michael@0: _cached_size_ = 0; michael@0: status_ = 0; michael@0: permalink_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: ClientUploadResponse::~ClientUploadResponse() { michael@0: SharedDtor(); michael@0: } michael@0: michael@0: void ClientUploadResponse::SharedDtor() { michael@0: if (permalink_ != &::google::protobuf::internal::kEmptyString) { michael@0: delete permalink_; michael@0: } michael@0: if (this != default_instance_) { michael@0: } michael@0: } michael@0: michael@0: void ClientUploadResponse::SetCachedSize(int size) const { michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: } michael@0: const ClientUploadResponse& ClientUploadResponse::default_instance() { michael@0: if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; michael@0: } michael@0: michael@0: ClientUploadResponse* ClientUploadResponse::default_instance_ = NULL; michael@0: michael@0: ClientUploadResponse* ClientUploadResponse::New() const { michael@0: return new ClientUploadResponse; michael@0: } michael@0: michael@0: void ClientUploadResponse::Clear() { michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: status_ = 0; michael@0: if (has_permalink()) { michael@0: if (permalink_ != &::google::protobuf::internal::kEmptyString) { michael@0: permalink_->clear(); michael@0: } michael@0: } michael@0: } michael@0: ::memset(_has_bits_, 0, sizeof(_has_bits_)); michael@0: } michael@0: michael@0: bool ClientUploadResponse::MergePartialFromCodedStream( michael@0: ::google::protobuf::io::CodedInputStream* input) { michael@0: #define DO_(EXPRESSION) if (!(EXPRESSION)) return false michael@0: ::google::protobuf::uint32 tag; michael@0: while ((tag = input->ReadTag()) != 0) { michael@0: switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { michael@0: // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; michael@0: case 1: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { michael@0: int value; michael@0: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< michael@0: int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( michael@0: input, &value))); michael@0: if (::safe_browsing::ClientUploadResponse_UploadStatus_IsValid(value)) { michael@0: set_status(static_cast< ::safe_browsing::ClientUploadResponse_UploadStatus >(value)); michael@0: } michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectTag(18)) goto parse_permalink; michael@0: break; michael@0: } michael@0: michael@0: // optional string permalink = 2; michael@0: case 2: { michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { michael@0: parse_permalink: michael@0: DO_(::google::protobuf::internal::WireFormatLite::ReadString( michael@0: input, this->mutable_permalink())); michael@0: } else { michael@0: goto handle_uninterpreted; michael@0: } michael@0: if (input->ExpectAtEnd()) return true; michael@0: break; michael@0: } michael@0: michael@0: default: { michael@0: handle_uninterpreted: michael@0: if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == michael@0: ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { michael@0: return true; michael@0: } michael@0: DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); michael@0: break; michael@0: } michael@0: } michael@0: } michael@0: return true; michael@0: #undef DO_ michael@0: } michael@0: michael@0: void ClientUploadResponse::SerializeWithCachedSizes( michael@0: ::google::protobuf::io::CodedOutputStream* output) const { michael@0: // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; michael@0: if (has_status()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteEnum( michael@0: 1, this->status(), output); michael@0: } michael@0: michael@0: // optional string permalink = 2; michael@0: if (has_permalink()) { michael@0: ::google::protobuf::internal::WireFormatLite::WriteString( michael@0: 2, this->permalink(), output); michael@0: } michael@0: michael@0: } michael@0: michael@0: int ClientUploadResponse::ByteSize() const { michael@0: int total_size = 0; michael@0: michael@0: if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; michael@0: if (has_status()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); michael@0: } michael@0: michael@0: // optional string permalink = 2; michael@0: if (has_permalink()) { michael@0: total_size += 1 + michael@0: ::google::protobuf::internal::WireFormatLite::StringSize( michael@0: this->permalink()); michael@0: } michael@0: michael@0: } michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); michael@0: _cached_size_ = total_size; michael@0: GOOGLE_SAFE_CONCURRENT_WRITES_END(); michael@0: return total_size; michael@0: } michael@0: michael@0: void ClientUploadResponse::CheckTypeAndMergeFrom( michael@0: const ::google::protobuf::MessageLite& from) { michael@0: MergeFrom(*::google::protobuf::down_cast(&from)); michael@0: } michael@0: michael@0: void ClientUploadResponse::MergeFrom(const ClientUploadResponse& from) { michael@0: GOOGLE_CHECK_NE(&from, this); michael@0: if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { michael@0: if (from.has_status()) { michael@0: set_status(from.status()); michael@0: } michael@0: if (from.has_permalink()) { michael@0: set_permalink(from.permalink()); michael@0: } michael@0: } michael@0: } michael@0: michael@0: void ClientUploadResponse::CopyFrom(const ClientUploadResponse& from) { michael@0: if (&from == this) return; michael@0: Clear(); michael@0: MergeFrom(from); michael@0: } michael@0: michael@0: bool ClientUploadResponse::IsInitialized() const { michael@0: michael@0: return true; michael@0: } michael@0: michael@0: void ClientUploadResponse::Swap(ClientUploadResponse* other) { michael@0: if (other != this) { michael@0: std::swap(status_, other->status_); michael@0: std::swap(permalink_, other->permalink_); michael@0: std::swap(_has_bits_[0], other->_has_bits_[0]); michael@0: std::swap(_cached_size_, other->_cached_size_); michael@0: } michael@0: } michael@0: michael@0: ::std::string ClientUploadResponse::GetTypeName() const { michael@0: return "safe_browsing.ClientUploadResponse"; michael@0: } michael@0: michael@0: michael@0: // @@protoc_insertion_point(namespace_scope) michael@0: michael@0: } // namespace safe_browsing michael@0: michael@0: // @@protoc_insertion_point(global_scope)