diff --git a/toolkit/components/downloads/ApplicationReputation.cpp b/toolkit/components/downloads/ApplicationReputation.cpp index abc229ae398..dbbd21bead6 100644 --- a/toolkit/components/downloads/ApplicationReputation.cpp +++ b/toolkit/components/downloads/ApplicationReputation.cpp @@ -980,12 +980,17 @@ PendingLookup::OnStopRequestInternal(nsIRequest *aRequest, return NS_ERROR_CANNOT_CONVERT_DATA; } - // There are several more verdicts, but we only respect one for now and treat - // everything else as SAFE. + // There are several more verdicts, but we only respect DANGEROUS and + // DANGEROUS_HOST for now and treat everything else as SAFE. Accumulate(mozilla::Telemetry::APPLICATION_REPUTATION_SERVER, SERVER_RESPONSE_VALID); - if (response.verdict() == safe_browsing::ClientDownloadResponse::DANGEROUS) { - *aShouldBlock = true; + switch(response.verdict()) { + case safe_browsing::ClientDownloadResponse::DANGEROUS: + case safe_browsing::ClientDownloadResponse::DANGEROUS_HOST: + *aShouldBlock = true; + break; + default: + break; } return NS_OK; diff --git a/toolkit/components/downloads/csd.pb.cc b/toolkit/components/downloads/csd.pb.cc index b430183c047..99108deecfa 100644 --- a/toolkit/components/downloads/csd.pb.cc +++ b/toolkit/components/downloads/csd.pb.cc @@ -13,23 +13,17 @@ namespace safe_browsing { void protobuf_ShutdownFile_csd_2eproto() { - delete ClientPhishingRequest::default_instance_; - delete ClientPhishingRequest_Feature::default_instance_; - delete ClientPhishingResponse::default_instance_; - delete ClientMalwareRequest::default_instance_; - delete ClientMalwareRequest_Feature::default_instance_; - delete ClientMalwareResponse::default_instance_; delete ClientDownloadRequest::default_instance_; delete ClientDownloadRequest_Digests::default_instance_; delete ClientDownloadRequest_Resource::default_instance_; delete ClientDownloadRequest_CertificateChain::default_instance_; delete ClientDownloadRequest_CertificateChain_Element::default_instance_; delete ClientDownloadRequest_SignatureInfo::default_instance_; + delete ClientDownloadRequest_PEImageHeaders::default_instance_; + delete ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_; + delete ClientDownloadRequest_ImageHeaders::default_instance_; delete ClientDownloadResponse::default_instance_; delete ClientDownloadResponse_MoreInfo::default_instance_; - delete ClientDownloadReport::default_instance_; - delete ClientDownloadReport_UserInformation::default_instance_; - delete ClientUploadResponse::default_instance_; } void protobuf_AddDesc_csd_2eproto() { @@ -38,40 +32,28 @@ void protobuf_AddDesc_csd_2eproto() { already_here = true; GOOGLE_PROTOBUF_VERIFY_VERSION; - ClientPhishingRequest::default_instance_ = new ClientPhishingRequest(); - ClientPhishingRequest_Feature::default_instance_ = new ClientPhishingRequest_Feature(); - ClientPhishingResponse::default_instance_ = new ClientPhishingResponse(); - ClientMalwareRequest::default_instance_ = new ClientMalwareRequest(); - ClientMalwareRequest_Feature::default_instance_ = new ClientMalwareRequest_Feature(); - ClientMalwareResponse::default_instance_ = new ClientMalwareResponse(); ClientDownloadRequest::default_instance_ = new ClientDownloadRequest(); ClientDownloadRequest_Digests::default_instance_ = new ClientDownloadRequest_Digests(); ClientDownloadRequest_Resource::default_instance_ = new ClientDownloadRequest_Resource(); ClientDownloadRequest_CertificateChain::default_instance_ = new ClientDownloadRequest_CertificateChain(); ClientDownloadRequest_CertificateChain_Element::default_instance_ = new ClientDownloadRequest_CertificateChain_Element(); ClientDownloadRequest_SignatureInfo::default_instance_ = new ClientDownloadRequest_SignatureInfo(); + ClientDownloadRequest_PEImageHeaders::default_instance_ = new ClientDownloadRequest_PEImageHeaders(); + ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_ = new ClientDownloadRequest_PEImageHeaders_DebugData(); + ClientDownloadRequest_ImageHeaders::default_instance_ = new ClientDownloadRequest_ImageHeaders(); ClientDownloadResponse::default_instance_ = new ClientDownloadResponse(); ClientDownloadResponse_MoreInfo::default_instance_ = new ClientDownloadResponse_MoreInfo(); - ClientDownloadReport::default_instance_ = new ClientDownloadReport(); - ClientDownloadReport_UserInformation::default_instance_ = new ClientDownloadReport_UserInformation(); - ClientUploadResponse::default_instance_ = new ClientUploadResponse(); - ClientPhishingRequest::default_instance_->InitAsDefaultInstance(); - ClientPhishingRequest_Feature::default_instance_->InitAsDefaultInstance(); - ClientPhishingResponse::default_instance_->InitAsDefaultInstance(); - ClientMalwareRequest::default_instance_->InitAsDefaultInstance(); - ClientMalwareRequest_Feature::default_instance_->InitAsDefaultInstance(); - ClientMalwareResponse::default_instance_->InitAsDefaultInstance(); ClientDownloadRequest::default_instance_->InitAsDefaultInstance(); ClientDownloadRequest_Digests::default_instance_->InitAsDefaultInstance(); ClientDownloadRequest_Resource::default_instance_->InitAsDefaultInstance(); ClientDownloadRequest_CertificateChain::default_instance_->InitAsDefaultInstance(); ClientDownloadRequest_CertificateChain_Element::default_instance_->InitAsDefaultInstance(); ClientDownloadRequest_SignatureInfo::default_instance_->InitAsDefaultInstance(); + ClientDownloadRequest_PEImageHeaders::default_instance_->InitAsDefaultInstance(); + ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_->InitAsDefaultInstance(); + ClientDownloadRequest_ImageHeaders::default_instance_->InitAsDefaultInstance(); ClientDownloadResponse::default_instance_->InitAsDefaultInstance(); ClientDownloadResponse_MoreInfo::default_instance_->InitAsDefaultInstance(); - ClientDownloadReport::default_instance_->InitAsDefaultInstance(); - ClientDownloadReport_UserInformation::default_instance_->InitAsDefaultInstance(); - ClientUploadResponse::default_instance_->InitAsDefaultInstance(); ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_csd_2eproto); } @@ -83,1483 +65,6 @@ struct StaticDescriptorInitializer_csd_2eproto { } static_descriptor_initializer_csd_2eproto_; -// =================================================================== - -#ifndef _MSC_VER -const int ClientPhishingRequest_Feature::kNameFieldNumber; -const int ClientPhishingRequest_Feature::kValueFieldNumber; -#endif // !_MSC_VER - -ClientPhishingRequest_Feature::ClientPhishingRequest_Feature() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientPhishingRequest_Feature::InitAsDefaultInstance() { -} - -ClientPhishingRequest_Feature::ClientPhishingRequest_Feature(const ClientPhishingRequest_Feature& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientPhishingRequest_Feature::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - value_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientPhishingRequest_Feature::~ClientPhishingRequest_Feature() { - SharedDtor(); -} - -void ClientPhishingRequest_Feature::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - } -} - -void ClientPhishingRequest_Feature::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientPhishingRequest_Feature& ClientPhishingRequest_Feature::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientPhishingRequest_Feature* ClientPhishingRequest_Feature::default_instance_ = NULL; - -ClientPhishingRequest_Feature* ClientPhishingRequest_Feature::New() const { - return new ClientPhishingRequest_Feature; -} - -void ClientPhishingRequest_Feature::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - value_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientPhishingRequest_Feature::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(17)) goto parse_value; - break; - } - - // required double value = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_value: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( - input, &value_))); - set_has_value(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientPhishingRequest_Feature::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // required double value = 2; - if (has_value()) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output); - } - -} - -int ClientPhishingRequest_Feature::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // required double value = 2; - if (has_value()) { - total_size += 1 + 8; - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientPhishingRequest_Feature::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientPhishingRequest_Feature::MergeFrom(const ClientPhishingRequest_Feature& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_value()) { - set_value(from.value()); - } - } -} - -void ClientPhishingRequest_Feature::CopyFrom(const ClientPhishingRequest_Feature& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientPhishingRequest_Feature::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - - return true; -} - -void ClientPhishingRequest_Feature::Swap(ClientPhishingRequest_Feature* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(value_, other->value_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientPhishingRequest_Feature::GetTypeName() const { - return "safe_browsing.ClientPhishingRequest.Feature"; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int ClientPhishingRequest::kUrlFieldNumber; -const int ClientPhishingRequest::kOBSOLETEHashPrefixFieldNumber; -const int ClientPhishingRequest::kClientScoreFieldNumber; -const int ClientPhishingRequest::kIsPhishingFieldNumber; -const int ClientPhishingRequest::kFeatureMapFieldNumber; -const int ClientPhishingRequest::kModelVersionFieldNumber; -const int ClientPhishingRequest::kNonModelFeatureMapFieldNumber; -const int ClientPhishingRequest::kOBSOLETEReferrerUrlFieldNumber; -#endif // !_MSC_VER - -ClientPhishingRequest::ClientPhishingRequest() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientPhishingRequest::InitAsDefaultInstance() { -} - -ClientPhishingRequest::ClientPhishingRequest(const ClientPhishingRequest& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientPhishingRequest::SharedCtor() { - _cached_size_ = 0; - url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - obsolete_hash_prefix_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - client_score_ = 0; - is_phishing_ = false; - model_version_ = 0; - obsolete_referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientPhishingRequest::~ClientPhishingRequest() { - SharedDtor(); -} - -void ClientPhishingRequest::SharedDtor() { - if (url_ != &::google::protobuf::internal::kEmptyString) { - delete url_; - } - if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) { - delete obsolete_hash_prefix_; - } - if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) { - delete obsolete_referrer_url_; - } - if (this != default_instance_) { - } -} - -void ClientPhishingRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientPhishingRequest& ClientPhishingRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientPhishingRequest* ClientPhishingRequest::default_instance_ = NULL; - -ClientPhishingRequest* ClientPhishingRequest::New() const { - return new ClientPhishingRequest; -} - -void ClientPhishingRequest::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_url()) { - if (url_ != &::google::protobuf::internal::kEmptyString) { - url_->clear(); - } - } - if (has_obsolete_hash_prefix()) { - if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) { - obsolete_hash_prefix_->clear(); - } - } - client_score_ = 0; - is_phishing_ = false; - model_version_ = 0; - if (has_obsolete_referrer_url()) { - if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) { - obsolete_referrer_url_->clear(); - } - } - } - feature_map_.Clear(); - non_model_feature_map_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientPhishingRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string url = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_url())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(21)) goto parse_client_score; - break; - } - - // required float client_score = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_client_score: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( - input, &client_score_))); - set_has_client_score(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_is_phishing; - break; - } - - // optional bool is_phishing = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_is_phishing: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &is_phishing_))); - set_has_is_phishing(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_feature_map; - break; - } - - // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_feature_map: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_feature_map())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_feature_map; - if (input->ExpectTag(48)) goto parse_model_version; - break; - } - - // optional int32 model_version = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_model_version: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &model_version_))); - set_has_model_version(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(66)) goto parse_non_model_feature_map; - break; - } - - // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_non_model_feature_map: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_non_model_feature_map())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(66)) goto parse_non_model_feature_map; - if (input->ExpectTag(74)) goto parse_OBSOLETE_referrer_url; - break; - } - - // optional string OBSOLETE_referrer_url = 9; - case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_OBSOLETE_referrer_url: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_obsolete_referrer_url())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(82)) goto parse_OBSOLETE_hash_prefix; - break; - } - - // optional bytes OBSOLETE_hash_prefix = 10; - case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_OBSOLETE_hash_prefix: - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->mutable_obsolete_hash_prefix())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientPhishingRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string url = 1; - if (has_url()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->url(), output); - } - - // required float client_score = 2; - if (has_client_score()) { - ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->client_score(), output); - } - - // optional bool is_phishing = 4; - if (has_is_phishing()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->is_phishing(), output); - } - - // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; - for (int i = 0; i < this->feature_map_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 5, this->feature_map(i), output); - } - - // optional int32 model_version = 6; - if (has_model_version()) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->model_version(), output); - } - - // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; - for (int i = 0; i < this->non_model_feature_map_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 8, this->non_model_feature_map(i), output); - } - - // optional string OBSOLETE_referrer_url = 9; - if (has_obsolete_referrer_url()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 9, this->obsolete_referrer_url(), output); - } - - // optional bytes OBSOLETE_hash_prefix = 10; - if (has_obsolete_hash_prefix()) { - ::google::protobuf::internal::WireFormatLite::WriteBytes( - 10, this->obsolete_hash_prefix(), output); - } - -} - -int ClientPhishingRequest::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string url = 1; - if (has_url()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->url()); - } - - // optional bytes OBSOLETE_hash_prefix = 10; - if (has_obsolete_hash_prefix()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( - this->obsolete_hash_prefix()); - } - - // required float client_score = 2; - if (has_client_score()) { - total_size += 1 + 4; - } - - // optional bool is_phishing = 4; - if (has_is_phishing()) { - total_size += 1 + 1; - } - - // optional int32 model_version = 6; - if (has_model_version()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->model_version()); - } - - // optional string OBSOLETE_referrer_url = 9; - if (has_obsolete_referrer_url()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->obsolete_referrer_url()); - } - - } - // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; - total_size += 1 * this->feature_map_size(); - for (int i = 0; i < this->feature_map_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->feature_map(i)); - } - - // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; - total_size += 1 * this->non_model_feature_map_size(); - for (int i = 0; i < this->non_model_feature_map_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->non_model_feature_map(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientPhishingRequest::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientPhishingRequest::MergeFrom(const ClientPhishingRequest& from) { - GOOGLE_CHECK_NE(&from, this); - feature_map_.MergeFrom(from.feature_map_); - non_model_feature_map_.MergeFrom(from.non_model_feature_map_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_url()) { - set_url(from.url()); - } - if (from.has_obsolete_hash_prefix()) { - set_obsolete_hash_prefix(from.obsolete_hash_prefix()); - } - if (from.has_client_score()) { - set_client_score(from.client_score()); - } - if (from.has_is_phishing()) { - set_is_phishing(from.is_phishing()); - } - if (from.has_model_version()) { - set_model_version(from.model_version()); - } - if (from.has_obsolete_referrer_url()) { - set_obsolete_referrer_url(from.obsolete_referrer_url()); - } - } -} - -void ClientPhishingRequest::CopyFrom(const ClientPhishingRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientPhishingRequest::IsInitialized() const { - if ((_has_bits_[0] & 0x00000004) != 0x00000004) return false; - - for (int i = 0; i < feature_map_size(); i++) { - if (!this->feature_map(i).IsInitialized()) return false; - } - for (int i = 0; i < non_model_feature_map_size(); i++) { - if (!this->non_model_feature_map(i).IsInitialized()) return false; - } - return true; -} - -void ClientPhishingRequest::Swap(ClientPhishingRequest* other) { - if (other != this) { - std::swap(url_, other->url_); - std::swap(obsolete_hash_prefix_, other->obsolete_hash_prefix_); - std::swap(client_score_, other->client_score_); - std::swap(is_phishing_, other->is_phishing_); - feature_map_.Swap(&other->feature_map_); - std::swap(model_version_, other->model_version_); - non_model_feature_map_.Swap(&other->non_model_feature_map_); - std::swap(obsolete_referrer_url_, other->obsolete_referrer_url_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientPhishingRequest::GetTypeName() const { - return "safe_browsing.ClientPhishingRequest"; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int ClientPhishingResponse::kPhishyFieldNumber; -const int ClientPhishingResponse::kOBSOLETEWhitelistExpressionFieldNumber; -#endif // !_MSC_VER - -ClientPhishingResponse::ClientPhishingResponse() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientPhishingResponse::InitAsDefaultInstance() { -} - -ClientPhishingResponse::ClientPhishingResponse(const ClientPhishingResponse& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientPhishingResponse::SharedCtor() { - _cached_size_ = 0; - phishy_ = false; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientPhishingResponse::~ClientPhishingResponse() { - SharedDtor(); -} - -void ClientPhishingResponse::SharedDtor() { - if (this != default_instance_) { - } -} - -void ClientPhishingResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientPhishingResponse& ClientPhishingResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientPhishingResponse* ClientPhishingResponse::default_instance_ = NULL; - -ClientPhishingResponse* ClientPhishingResponse::New() const { - return new ClientPhishingResponse; -} - -void ClientPhishingResponse::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - phishy_ = false; - } - obsolete_whitelist_expression_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientPhishingResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required bool phishy = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &phishy_))); - set_has_phishy(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_OBSOLETE_whitelist_expression; - break; - } - - // repeated string OBSOLETE_whitelist_expression = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_OBSOLETE_whitelist_expression: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_obsolete_whitelist_expression())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_OBSOLETE_whitelist_expression; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientPhishingResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required bool phishy = 1; - if (has_phishy()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->phishy(), output); - } - - // repeated string OBSOLETE_whitelist_expression = 2; - for (int i = 0; i < this->obsolete_whitelist_expression_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->obsolete_whitelist_expression(i), output); - } - -} - -int ClientPhishingResponse::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool phishy = 1; - if (has_phishy()) { - total_size += 1 + 1; - } - - } - // repeated string OBSOLETE_whitelist_expression = 2; - total_size += 1 * this->obsolete_whitelist_expression_size(); - for (int i = 0; i < this->obsolete_whitelist_expression_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->obsolete_whitelist_expression(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientPhishingResponse::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientPhishingResponse::MergeFrom(const ClientPhishingResponse& from) { - GOOGLE_CHECK_NE(&from, this); - obsolete_whitelist_expression_.MergeFrom(from.obsolete_whitelist_expression_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_phishy()) { - set_phishy(from.phishy()); - } - } -} - -void ClientPhishingResponse::CopyFrom(const ClientPhishingResponse& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientPhishingResponse::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; - - return true; -} - -void ClientPhishingResponse::Swap(ClientPhishingResponse* other) { - if (other != this) { - std::swap(phishy_, other->phishy_); - obsolete_whitelist_expression_.Swap(&other->obsolete_whitelist_expression_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientPhishingResponse::GetTypeName() const { - return "safe_browsing.ClientPhishingResponse"; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int ClientMalwareRequest_Feature::kNameFieldNumber; -const int ClientMalwareRequest_Feature::kValueFieldNumber; -const int ClientMalwareRequest_Feature::kMetainfoFieldNumber; -#endif // !_MSC_VER - -ClientMalwareRequest_Feature::ClientMalwareRequest_Feature() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientMalwareRequest_Feature::InitAsDefaultInstance() { -} - -ClientMalwareRequest_Feature::ClientMalwareRequest_Feature(const ClientMalwareRequest_Feature& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientMalwareRequest_Feature::SharedCtor() { - _cached_size_ = 0; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - value_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientMalwareRequest_Feature::~ClientMalwareRequest_Feature() { - SharedDtor(); -} - -void ClientMalwareRequest_Feature::SharedDtor() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - delete name_; - } - if (this != default_instance_) { - } -} - -void ClientMalwareRequest_Feature::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientMalwareRequest_Feature& ClientMalwareRequest_Feature::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientMalwareRequest_Feature* ClientMalwareRequest_Feature::default_instance_ = NULL; - -ClientMalwareRequest_Feature* ClientMalwareRequest_Feature::New() const { - return new ClientMalwareRequest_Feature; -} - -void ClientMalwareRequest_Feature::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_name()) { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - } - value_ = 0; - } - metainfo_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientMalwareRequest_Feature::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string name = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(17)) goto parse_value; - break; - } - - // required double value = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED64) { - parse_value: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( - input, &value_))); - set_has_value(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_metainfo; - break; - } - - // repeated string metainfo = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_metainfo: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_metainfo())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_metainfo; - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientMalwareRequest_Feature::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required string name = 1; - if (has_name()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->name(), output); - } - - // required double value = 2; - if (has_value()) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(2, this->value(), output); - } - - // repeated string metainfo = 3; - for (int i = 0; i < this->metainfo_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 3, this->metainfo(i), output); - } - -} - -int ClientMalwareRequest_Feature::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string name = 1; - if (has_name()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); - } - - // required double value = 2; - if (has_value()) { - total_size += 1 + 8; - } - - } - // repeated string metainfo = 3; - total_size += 1 * this->metainfo_size(); - for (int i = 0; i < this->metainfo_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->metainfo(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientMalwareRequest_Feature::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientMalwareRequest_Feature::MergeFrom(const ClientMalwareRequest_Feature& from) { - GOOGLE_CHECK_NE(&from, this); - metainfo_.MergeFrom(from.metainfo_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_name()) { - set_name(from.name()); - } - if (from.has_value()) { - set_value(from.value()); - } - } -} - -void ClientMalwareRequest_Feature::CopyFrom(const ClientMalwareRequest_Feature& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientMalwareRequest_Feature::IsInitialized() const { - if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false; - - return true; -} - -void ClientMalwareRequest_Feature::Swap(ClientMalwareRequest_Feature* other) { - if (other != this) { - std::swap(name_, other->name_); - std::swap(value_, other->value_); - metainfo_.Swap(&other->metainfo_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientMalwareRequest_Feature::GetTypeName() const { - return "safe_browsing.ClientMalwareRequest.Feature"; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int ClientMalwareRequest::kUrlFieldNumber; -const int ClientMalwareRequest::kFeatureMapFieldNumber; -const int ClientMalwareRequest::kReferrerUrlFieldNumber; -#endif // !_MSC_VER - -ClientMalwareRequest::ClientMalwareRequest() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientMalwareRequest::InitAsDefaultInstance() { -} - -ClientMalwareRequest::ClientMalwareRequest(const ClientMalwareRequest& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientMalwareRequest::SharedCtor() { - _cached_size_ = 0; - url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientMalwareRequest::~ClientMalwareRequest() { - SharedDtor(); -} - -void ClientMalwareRequest::SharedDtor() { - if (url_ != &::google::protobuf::internal::kEmptyString) { - delete url_; - } - if (referrer_url_ != &::google::protobuf::internal::kEmptyString) { - delete referrer_url_; - } - if (this != default_instance_) { - } -} - -void ClientMalwareRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientMalwareRequest& ClientMalwareRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientMalwareRequest* ClientMalwareRequest::default_instance_ = NULL; - -ClientMalwareRequest* ClientMalwareRequest::New() const { - return new ClientMalwareRequest; -} - -void ClientMalwareRequest::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_url()) { - if (url_ != &::google::protobuf::internal::kEmptyString) { - url_->clear(); - } - } - if (has_referrer_url()) { - if (referrer_url_ != &::google::protobuf::internal::kEmptyString) { - referrer_url_->clear(); - } - } - } - feature_map_.Clear(); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientMalwareRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required string url = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_url())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_feature_map; - break; - } - - // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_feature_map: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, add_feature_map())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_feature_map; - if (input->ExpectTag(34)) goto parse_referrer_url; - break; - } - - // optional string referrer_url = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_referrer_url: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_referrer_url())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientMalwareRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required string url = 1; - if (has_url()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->url(), output); - } - - // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; - for (int i = 0; i < this->feature_map_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 2, this->feature_map(i), output); - } - - // optional string referrer_url = 4; - if (has_referrer_url()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 4, this->referrer_url(), output); - } - -} - -int ClientMalwareRequest::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required string url = 1; - if (has_url()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->url()); - } - - // optional string referrer_url = 4; - if (has_referrer_url()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->referrer_url()); - } - - } - // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; - total_size += 1 * this->feature_map_size(); - for (int i = 0; i < this->feature_map_size(); i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->feature_map(i)); - } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientMalwareRequest::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientMalwareRequest::MergeFrom(const ClientMalwareRequest& from) { - GOOGLE_CHECK_NE(&from, this); - feature_map_.MergeFrom(from.feature_map_); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_url()) { - set_url(from.url()); - } - if (from.has_referrer_url()) { - set_referrer_url(from.referrer_url()); - } - } -} - -void ClientMalwareRequest::CopyFrom(const ClientMalwareRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientMalwareRequest::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; - - for (int i = 0; i < feature_map_size(); i++) { - if (!this->feature_map(i).IsInitialized()) return false; - } - return true; -} - -void ClientMalwareRequest::Swap(ClientMalwareRequest* other) { - if (other != this) { - std::swap(url_, other->url_); - feature_map_.Swap(&other->feature_map_); - std::swap(referrer_url_, other->referrer_url_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientMalwareRequest::GetTypeName() const { - return "safe_browsing.ClientMalwareRequest"; -} - - -// =================================================================== - -#ifndef _MSC_VER -const int ClientMalwareResponse::kBlacklistFieldNumber; -const int ClientMalwareResponse::kBadIpFieldNumber; -#endif // !_MSC_VER - -ClientMalwareResponse::ClientMalwareResponse() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientMalwareResponse::InitAsDefaultInstance() { -} - -ClientMalwareResponse::ClientMalwareResponse(const ClientMalwareResponse& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientMalwareResponse::SharedCtor() { - _cached_size_ = 0; - blacklist_ = false; - bad_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientMalwareResponse::~ClientMalwareResponse() { - SharedDtor(); -} - -void ClientMalwareResponse::SharedDtor() { - if (bad_ip_ != &::google::protobuf::internal::kEmptyString) { - delete bad_ip_; - } - if (this != default_instance_) { - } -} - -void ClientMalwareResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientMalwareResponse& ClientMalwareResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientMalwareResponse* ClientMalwareResponse::default_instance_ = NULL; - -ClientMalwareResponse* ClientMalwareResponse::New() const { - return new ClientMalwareResponse; -} - -void ClientMalwareResponse::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - blacklist_ = false; - if (has_bad_ip()) { - if (bad_ip_ != &::google::protobuf::internal::kEmptyString) { - bad_ip_->clear(); - } - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientMalwareResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required bool blacklist = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &blacklist_))); - set_has_blacklist(); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_bad_ip; - break; - } - - // optional string bad_ip = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_bad_ip: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_bad_ip())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientMalwareResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required bool blacklist = 1; - if (has_blacklist()) { - ::google::protobuf::internal::WireFormatLite::WriteBool(1, this->blacklist(), output); - } - - // optional string bad_ip = 2; - if (has_bad_ip()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->bad_ip(), output); - } - -} - -int ClientMalwareResponse::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required bool blacklist = 1; - if (has_blacklist()) { - total_size += 1 + 1; - } - - // optional string bad_ip = 2; - if (has_bad_ip()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->bad_ip()); - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientMalwareResponse::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientMalwareResponse::MergeFrom(const ClientMalwareResponse& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_blacklist()) { - set_blacklist(from.blacklist()); - } - if (from.has_bad_ip()) { - set_bad_ip(from.bad_ip()); - } - } -} - -void ClientMalwareResponse::CopyFrom(const ClientMalwareResponse& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientMalwareResponse::IsInitialized() const { - if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false; - - return true; -} - -void ClientMalwareResponse::Swap(ClientMalwareResponse* other) { - if (other != this) { - std::swap(blacklist_, other->blacklist_); - std::swap(bad_ip_, other->bad_ip_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientMalwareResponse::GetTypeName() const { - return "safe_browsing.ClientMalwareResponse"; -} - - // =================================================================== bool ClientDownloadRequest_ResourceType_IsValid(int value) { @@ -2638,6 +1143,765 @@ void ClientDownloadRequest_SignatureInfo::Swap(ClientDownloadRequest_SignatureIn } +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int ClientDownloadRequest_PEImageHeaders_DebugData::kDirectoryEntryFieldNumber; +const int ClientDownloadRequest_PEImageHeaders_DebugData::kRawDataFieldNumber; +#endif // !_MSC_VER + +ClientDownloadRequest_PEImageHeaders_DebugData::ClientDownloadRequest_PEImageHeaders_DebugData() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::InitAsDefaultInstance() { +} + +ClientDownloadRequest_PEImageHeaders_DebugData::ClientDownloadRequest_PEImageHeaders_DebugData(const ClientDownloadRequest_PEImageHeaders_DebugData& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::SharedCtor() { + _cached_size_ = 0; + directory_entry_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + raw_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ClientDownloadRequest_PEImageHeaders_DebugData::~ClientDownloadRequest_PEImageHeaders_DebugData() { + SharedDtor(); +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::SharedDtor() { + if (directory_entry_ != &::google::protobuf::internal::kEmptyString) { + delete directory_entry_; + } + if (raw_data_ != &::google::protobuf::internal::kEmptyString) { + delete raw_data_; + } + if (this != default_instance_) { + } +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ClientDownloadRequest_PEImageHeaders_DebugData& ClientDownloadRequest_PEImageHeaders_DebugData::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; +} + +ClientDownloadRequest_PEImageHeaders_DebugData* ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_ = NULL; + +ClientDownloadRequest_PEImageHeaders_DebugData* ClientDownloadRequest_PEImageHeaders_DebugData::New() const { + return new ClientDownloadRequest_PEImageHeaders_DebugData; +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_directory_entry()) { + if (directory_entry_ != &::google::protobuf::internal::kEmptyString) { + directory_entry_->clear(); + } + } + if (has_raw_data()) { + if (raw_data_ != &::google::protobuf::internal::kEmptyString) { + raw_data_->clear(); + } + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool ClientDownloadRequest_PEImageHeaders_DebugData::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional bytes directory_entry = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_directory_entry())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_raw_data; + break; + } + + // optional bytes raw_data = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_raw_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_raw_data())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional bytes directory_entry = 1; + if (has_directory_entry()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 1, this->directory_entry(), output); + } + + // optional bytes raw_data = 2; + if (has_raw_data()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 2, this->raw_data(), output); + } + +} + +int ClientDownloadRequest_PEImageHeaders_DebugData::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional bytes directory_entry = 1; + if (has_directory_entry()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->directory_entry()); + } + + // optional bytes raw_data = 2; + if (has_raw_data()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->raw_data()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::MergeFrom(const ClientDownloadRequest_PEImageHeaders_DebugData& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_directory_entry()) { + set_directory_entry(from.directory_entry()); + } + if (from.has_raw_data()) { + set_raw_data(from.raw_data()); + } + } +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::CopyFrom(const ClientDownloadRequest_PEImageHeaders_DebugData& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientDownloadRequest_PEImageHeaders_DebugData::IsInitialized() const { + + return true; +} + +void ClientDownloadRequest_PEImageHeaders_DebugData::Swap(ClientDownloadRequest_PEImageHeaders_DebugData* other) { + if (other != this) { + std::swap(directory_entry_, other->directory_entry_); + std::swap(raw_data_, other->raw_data_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string ClientDownloadRequest_PEImageHeaders_DebugData::GetTypeName() const { + return "safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData"; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int ClientDownloadRequest_PEImageHeaders::kDosHeaderFieldNumber; +const int ClientDownloadRequest_PEImageHeaders::kFileHeaderFieldNumber; +const int ClientDownloadRequest_PEImageHeaders::kOptionalHeaders32FieldNumber; +const int ClientDownloadRequest_PEImageHeaders::kOptionalHeaders64FieldNumber; +const int ClientDownloadRequest_PEImageHeaders::kSectionHeaderFieldNumber; +const int ClientDownloadRequest_PEImageHeaders::kExportSectionDataFieldNumber; +const int ClientDownloadRequest_PEImageHeaders::kDebugDataFieldNumber; +#endif // !_MSC_VER + +ClientDownloadRequest_PEImageHeaders::ClientDownloadRequest_PEImageHeaders() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void ClientDownloadRequest_PEImageHeaders::InitAsDefaultInstance() { +} + +ClientDownloadRequest_PEImageHeaders::ClientDownloadRequest_PEImageHeaders(const ClientDownloadRequest_PEImageHeaders& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void ClientDownloadRequest_PEImageHeaders::SharedCtor() { + _cached_size_ = 0; + dos_header_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + file_header_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + optional_headers32_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + optional_headers64_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + export_section_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ClientDownloadRequest_PEImageHeaders::~ClientDownloadRequest_PEImageHeaders() { + SharedDtor(); +} + +void ClientDownloadRequest_PEImageHeaders::SharedDtor() { + if (dos_header_ != &::google::protobuf::internal::kEmptyString) { + delete dos_header_; + } + if (file_header_ != &::google::protobuf::internal::kEmptyString) { + delete file_header_; + } + if (optional_headers32_ != &::google::protobuf::internal::kEmptyString) { + delete optional_headers32_; + } + if (optional_headers64_ != &::google::protobuf::internal::kEmptyString) { + delete optional_headers64_; + } + if (export_section_data_ != &::google::protobuf::internal::kEmptyString) { + delete export_section_data_; + } + if (this != default_instance_) { + } +} + +void ClientDownloadRequest_PEImageHeaders::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ClientDownloadRequest_PEImageHeaders& ClientDownloadRequest_PEImageHeaders::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; +} + +ClientDownloadRequest_PEImageHeaders* ClientDownloadRequest_PEImageHeaders::default_instance_ = NULL; + +ClientDownloadRequest_PEImageHeaders* ClientDownloadRequest_PEImageHeaders::New() const { + return new ClientDownloadRequest_PEImageHeaders; +} + +void ClientDownloadRequest_PEImageHeaders::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_dos_header()) { + if (dos_header_ != &::google::protobuf::internal::kEmptyString) { + dos_header_->clear(); + } + } + if (has_file_header()) { + if (file_header_ != &::google::protobuf::internal::kEmptyString) { + file_header_->clear(); + } + } + if (has_optional_headers32()) { + if (optional_headers32_ != &::google::protobuf::internal::kEmptyString) { + optional_headers32_->clear(); + } + } + if (has_optional_headers64()) { + if (optional_headers64_ != &::google::protobuf::internal::kEmptyString) { + optional_headers64_->clear(); + } + } + if (has_export_section_data()) { + if (export_section_data_ != &::google::protobuf::internal::kEmptyString) { + export_section_data_->clear(); + } + } + } + section_header_.Clear(); + debug_data_.Clear(); + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool ClientDownloadRequest_PEImageHeaders::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional bytes dos_header = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_dos_header())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(18)) goto parse_file_header; + break; + } + + // optional bytes file_header = 2; + case 2: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_file_header: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_file_header())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(26)) goto parse_optional_headers32; + break; + } + + // optional bytes optional_headers32 = 3; + case 3: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_optional_headers32: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_optional_headers32())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(34)) goto parse_optional_headers64; + break; + } + + // optional bytes optional_headers64 = 4; + case 4: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_optional_headers64: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_optional_headers64())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_section_header; + break; + } + + // repeated bytes section_header = 5; + case 5: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_section_header: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->add_section_header())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(42)) goto parse_section_header; + if (input->ExpectTag(50)) goto parse_export_section_data; + break; + } + + // optional bytes export_section_data = 6; + case 6: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_export_section_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_export_section_data())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(58)) goto parse_debug_data; + break; + } + + // repeated .safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData debug_data = 7; + case 7: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_debug_data: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, add_debug_data())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(58)) goto parse_debug_data; + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void ClientDownloadRequest_PEImageHeaders::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional bytes dos_header = 1; + if (has_dos_header()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 1, this->dos_header(), output); + } + + // optional bytes file_header = 2; + if (has_file_header()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 2, this->file_header(), output); + } + + // optional bytes optional_headers32 = 3; + if (has_optional_headers32()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 3, this->optional_headers32(), output); + } + + // optional bytes optional_headers64 = 4; + if (has_optional_headers64()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 4, this->optional_headers64(), output); + } + + // repeated bytes section_header = 5; + for (int i = 0; i < this->section_header_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 5, this->section_header(i), output); + } + + // optional bytes export_section_data = 6; + if (has_export_section_data()) { + ::google::protobuf::internal::WireFormatLite::WriteBytes( + 6, this->export_section_data(), output); + } + + // repeated .safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData debug_data = 7; + for (int i = 0; i < this->debug_data_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 7, this->debug_data(i), output); + } + +} + +int ClientDownloadRequest_PEImageHeaders::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional bytes dos_header = 1; + if (has_dos_header()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->dos_header()); + } + + // optional bytes file_header = 2; + if (has_file_header()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->file_header()); + } + + // optional bytes optional_headers32 = 3; + if (has_optional_headers32()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->optional_headers32()); + } + + // optional bytes optional_headers64 = 4; + if (has_optional_headers64()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->optional_headers64()); + } + + // optional bytes export_section_data = 6; + if (has_export_section_data()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->export_section_data()); + } + + } + // repeated bytes section_header = 5; + total_size += 1 * this->section_header_size(); + for (int i = 0; i < this->section_header_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::BytesSize( + this->section_header(i)); + } + + // repeated .safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData debug_data = 7; + total_size += 1 * this->debug_data_size(); + for (int i = 0; i < this->debug_data_size(); i++) { + total_size += + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->debug_data(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ClientDownloadRequest_PEImageHeaders::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void ClientDownloadRequest_PEImageHeaders::MergeFrom(const ClientDownloadRequest_PEImageHeaders& from) { + GOOGLE_CHECK_NE(&from, this); + section_header_.MergeFrom(from.section_header_); + debug_data_.MergeFrom(from.debug_data_); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_dos_header()) { + set_dos_header(from.dos_header()); + } + if (from.has_file_header()) { + set_file_header(from.file_header()); + } + if (from.has_optional_headers32()) { + set_optional_headers32(from.optional_headers32()); + } + if (from.has_optional_headers64()) { + set_optional_headers64(from.optional_headers64()); + } + if (from.has_export_section_data()) { + set_export_section_data(from.export_section_data()); + } + } +} + +void ClientDownloadRequest_PEImageHeaders::CopyFrom(const ClientDownloadRequest_PEImageHeaders& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientDownloadRequest_PEImageHeaders::IsInitialized() const { + + return true; +} + +void ClientDownloadRequest_PEImageHeaders::Swap(ClientDownloadRequest_PEImageHeaders* other) { + if (other != this) { + std::swap(dos_header_, other->dos_header_); + std::swap(file_header_, other->file_header_); + std::swap(optional_headers32_, other->optional_headers32_); + std::swap(optional_headers64_, other->optional_headers64_); + section_header_.Swap(&other->section_header_); + std::swap(export_section_data_, other->export_section_data_); + debug_data_.Swap(&other->debug_data_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string ClientDownloadRequest_PEImageHeaders::GetTypeName() const { + return "safe_browsing.ClientDownloadRequest.PEImageHeaders"; +} + + +// ------------------------------------------------------------------- + +#ifndef _MSC_VER +const int ClientDownloadRequest_ImageHeaders::kPeHeadersFieldNumber; +#endif // !_MSC_VER + +ClientDownloadRequest_ImageHeaders::ClientDownloadRequest_ImageHeaders() + : ::google::protobuf::MessageLite() { + SharedCtor(); +} + +void ClientDownloadRequest_ImageHeaders::InitAsDefaultInstance() { + pe_headers_ = const_cast< ::safe_browsing::ClientDownloadRequest_PEImageHeaders*>(&::safe_browsing::ClientDownloadRequest_PEImageHeaders::default_instance()); +} + +ClientDownloadRequest_ImageHeaders::ClientDownloadRequest_ImageHeaders(const ClientDownloadRequest_ImageHeaders& from) + : ::google::protobuf::MessageLite() { + SharedCtor(); + MergeFrom(from); +} + +void ClientDownloadRequest_ImageHeaders::SharedCtor() { + _cached_size_ = 0; + pe_headers_ = NULL; + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +ClientDownloadRequest_ImageHeaders::~ClientDownloadRequest_ImageHeaders() { + SharedDtor(); +} + +void ClientDownloadRequest_ImageHeaders::SharedDtor() { + if (this != default_instance_) { + delete pe_headers_; + } +} + +void ClientDownloadRequest_ImageHeaders::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ClientDownloadRequest_ImageHeaders& ClientDownloadRequest_ImageHeaders::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; +} + +ClientDownloadRequest_ImageHeaders* ClientDownloadRequest_ImageHeaders::default_instance_ = NULL; + +ClientDownloadRequest_ImageHeaders* ClientDownloadRequest_ImageHeaders::New() const { + return new ClientDownloadRequest_ImageHeaders; +} + +void ClientDownloadRequest_ImageHeaders::Clear() { + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (has_pe_headers()) { + if (pe_headers_ != NULL) pe_headers_->::safe_browsing::ClientDownloadRequest_PEImageHeaders::Clear(); + } + } + ::memset(_has_bits_, 0, sizeof(_has_bits_)); +} + +bool ClientDownloadRequest_ImageHeaders::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) if (!(EXPRESSION)) return false + ::google::protobuf::uint32 tag; + while ((tag = input->ReadTag()) != 0) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional .safe_browsing.ClientDownloadRequest.PEImageHeaders pe_headers = 1; + case 1: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_pe_headers())); + } else { + goto handle_uninterpreted; + } + if (input->ExpectAtEnd()) return true; + break; + } + + default: { + handle_uninterpreted: + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + return true; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + break; + } + } + } + return true; +#undef DO_ +} + +void ClientDownloadRequest_ImageHeaders::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // optional .safe_browsing.ClientDownloadRequest.PEImageHeaders pe_headers = 1; + if (has_pe_headers()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 1, this->pe_headers(), output); + } + +} + +int ClientDownloadRequest_ImageHeaders::ByteSize() const { + int total_size = 0; + + if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { + // optional .safe_browsing.ClientDownloadRequest.PEImageHeaders pe_headers = 1; + if (has_pe_headers()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->pe_headers()); + } + + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ClientDownloadRequest_ImageHeaders::CheckTypeAndMergeFrom( + const ::google::protobuf::MessageLite& from) { + MergeFrom(*::google::protobuf::down_cast(&from)); +} + +void ClientDownloadRequest_ImageHeaders::MergeFrom(const ClientDownloadRequest_ImageHeaders& from) { + GOOGLE_CHECK_NE(&from, this); + if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { + if (from.has_pe_headers()) { + mutable_pe_headers()->::safe_browsing::ClientDownloadRequest_PEImageHeaders::MergeFrom(from.pe_headers()); + } + } +} + +void ClientDownloadRequest_ImageHeaders::CopyFrom(const ClientDownloadRequest_ImageHeaders& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ClientDownloadRequest_ImageHeaders::IsInitialized() const { + + return true; +} + +void ClientDownloadRequest_ImageHeaders::Swap(ClientDownloadRequest_ImageHeaders* other) { + if (other != this) { + std::swap(pe_headers_, other->pe_headers_); + std::swap(_has_bits_[0], other->_has_bits_[0]); + std::swap(_cached_size_, other->_cached_size_); + } +} + +::std::string ClientDownloadRequest_ImageHeaders::GetTypeName() const { + return "safe_browsing.ClientDownloadRequest.ImageHeaders"; +} + + // ------------------------------------------------------------------- #ifndef _MSC_VER @@ -2650,6 +1914,7 @@ const int ClientDownloadRequest::kUserInitiatedFieldNumber; const int ClientDownloadRequest::kFileBasenameFieldNumber; const int ClientDownloadRequest::kDownloadTypeFieldNumber; const int ClientDownloadRequest::kLocaleFieldNumber; +const int ClientDownloadRequest::kImageHeadersFieldNumber; #endif // !_MSC_VER ClientDownloadRequest::ClientDownloadRequest() @@ -2660,6 +1925,7 @@ ClientDownloadRequest::ClientDownloadRequest() void ClientDownloadRequest::InitAsDefaultInstance() { digests_ = const_cast< ::safe_browsing::ClientDownloadRequest_Digests*>(&::safe_browsing::ClientDownloadRequest_Digests::default_instance()); signature_ = const_cast< ::safe_browsing::ClientDownloadRequest_SignatureInfo*>(&::safe_browsing::ClientDownloadRequest_SignatureInfo::default_instance()); + image_headers_ = const_cast< ::safe_browsing::ClientDownloadRequest_ImageHeaders*>(&::safe_browsing::ClientDownloadRequest_ImageHeaders::default_instance()); } ClientDownloadRequest::ClientDownloadRequest(const ClientDownloadRequest& from) @@ -2678,6 +1944,7 @@ void ClientDownloadRequest::SharedCtor() { file_basename_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); download_type_ = 0; locale_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + image_headers_ = NULL; ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -2698,6 +1965,7 @@ void ClientDownloadRequest::SharedDtor() { if (this != default_instance_) { delete digests_; delete signature_; + delete image_headers_; } } @@ -2744,6 +2012,9 @@ void ClientDownloadRequest::Clear() { locale_->clear(); } } + if (has_image_headers()) { + if (image_headers_ != NULL) image_headers_->::safe_browsing::ClientDownloadRequest_ImageHeaders::Clear(); + } } resources_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); @@ -2886,6 +2157,20 @@ bool ClientDownloadRequest::MergePartialFromCodedStream( } else { goto handle_uninterpreted; } + if (input->ExpectTag(146)) goto parse_image_headers; + break; + } + + // optional .safe_browsing.ClientDownloadRequest.ImageHeaders image_headers = 18; + case 18: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { + parse_image_headers: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_image_headers())); + } else { + goto handle_uninterpreted; + } if (input->ExpectAtEnd()) return true; break; } @@ -2959,6 +2244,12 @@ void ClientDownloadRequest::SerializeWithCachedSizes( 11, this->locale(), output); } + // optional .safe_browsing.ClientDownloadRequest.ImageHeaders image_headers = 18; + if (has_image_headers()) { + ::google::protobuf::internal::WireFormatLite::WriteMessage( + 18, this->image_headers(), output); + } + } int ClientDownloadRequest::ByteSize() const { @@ -3020,6 +2311,13 @@ int ClientDownloadRequest::ByteSize() const { this->locale()); } + // optional .safe_browsing.ClientDownloadRequest.ImageHeaders image_headers = 18; + if (has_image_headers()) { + total_size += 2 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + this->image_headers()); + } + } // repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4; total_size += 1 * this->resources_size(); @@ -3070,6 +2368,9 @@ void ClientDownloadRequest::MergeFrom(const ClientDownloadRequest& from) { if (from.has_locale()) { set_locale(from.locale()); } + if (from.has_image_headers()) { + mutable_image_headers()->::safe_browsing::ClientDownloadRequest_ImageHeaders::MergeFrom(from.image_headers()); + } } } @@ -3099,6 +2400,7 @@ void ClientDownloadRequest::Swap(ClientDownloadRequest* other) { std::swap(file_basename_, other->file_basename_); std::swap(download_type_, other->download_type_); std::swap(locale_, other->locale_); + std::swap(image_headers_, other->image_headers_); std::swap(_has_bits_[0], other->_has_bits_[0]); std::swap(_cached_size_, other->_cached_size_); } @@ -3578,730 +2880,6 @@ void ClientDownloadResponse::Swap(ClientDownloadResponse* other) { } -// =================================================================== - -bool ClientDownloadReport_Reason_IsValid(int value) { - switch(value) { - case 0: - case 1: - case 2: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const ClientDownloadReport_Reason ClientDownloadReport::SHARE; -const ClientDownloadReport_Reason ClientDownloadReport::FALSE_POSITIVE; -const ClientDownloadReport_Reason ClientDownloadReport::APPEAL; -const ClientDownloadReport_Reason ClientDownloadReport::Reason_MIN; -const ClientDownloadReport_Reason ClientDownloadReport::Reason_MAX; -const int ClientDownloadReport::Reason_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER -const int ClientDownloadReport_UserInformation::kEmailFieldNumber; -#endif // !_MSC_VER - -ClientDownloadReport_UserInformation::ClientDownloadReport_UserInformation() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientDownloadReport_UserInformation::InitAsDefaultInstance() { -} - -ClientDownloadReport_UserInformation::ClientDownloadReport_UserInformation(const ClientDownloadReport_UserInformation& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientDownloadReport_UserInformation::SharedCtor() { - _cached_size_ = 0; - email_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientDownloadReport_UserInformation::~ClientDownloadReport_UserInformation() { - SharedDtor(); -} - -void ClientDownloadReport_UserInformation::SharedDtor() { - if (email_ != &::google::protobuf::internal::kEmptyString) { - delete email_; - } - if (this != default_instance_) { - } -} - -void ClientDownloadReport_UserInformation::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientDownloadReport_UserInformation& ClientDownloadReport_UserInformation::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientDownloadReport_UserInformation* ClientDownloadReport_UserInformation::default_instance_ = NULL; - -ClientDownloadReport_UserInformation* ClientDownloadReport_UserInformation::New() const { - return new ClientDownloadReport_UserInformation; -} - -void ClientDownloadReport_UserInformation::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (has_email()) { - if (email_ != &::google::protobuf::internal::kEmptyString) { - email_->clear(); - } - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientDownloadReport_UserInformation::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string email = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_email())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientDownloadReport_UserInformation::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional string email = 1; - if (has_email()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->email(), output); - } - -} - -int ClientDownloadReport_UserInformation::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional string email = 1; - if (has_email()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->email()); - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientDownloadReport_UserInformation::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientDownloadReport_UserInformation::MergeFrom(const ClientDownloadReport_UserInformation& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_email()) { - set_email(from.email()); - } - } -} - -void ClientDownloadReport_UserInformation::CopyFrom(const ClientDownloadReport_UserInformation& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientDownloadReport_UserInformation::IsInitialized() const { - - return true; -} - -void ClientDownloadReport_UserInformation::Swap(ClientDownloadReport_UserInformation* other) { - if (other != this) { - std::swap(email_, other->email_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientDownloadReport_UserInformation::GetTypeName() const { - return "safe_browsing.ClientDownloadReport.UserInformation"; -} - - -// ------------------------------------------------------------------- - -#ifndef _MSC_VER -const int ClientDownloadReport::kReasonFieldNumber; -const int ClientDownloadReport::kDownloadRequestFieldNumber; -const int ClientDownloadReport::kUserInformationFieldNumber; -const int ClientDownloadReport::kCommentFieldNumber; -const int ClientDownloadReport::kDownloadResponseFieldNumber; -#endif // !_MSC_VER - -ClientDownloadReport::ClientDownloadReport() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientDownloadReport::InitAsDefaultInstance() { - download_request_ = const_cast< ::safe_browsing::ClientDownloadRequest*>(&::safe_browsing::ClientDownloadRequest::default_instance()); - user_information_ = const_cast< ::safe_browsing::ClientDownloadReport_UserInformation*>(&::safe_browsing::ClientDownloadReport_UserInformation::default_instance()); - download_response_ = const_cast< ::safe_browsing::ClientDownloadResponse*>(&::safe_browsing::ClientDownloadResponse::default_instance()); -} - -ClientDownloadReport::ClientDownloadReport(const ClientDownloadReport& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientDownloadReport::SharedCtor() { - _cached_size_ = 0; - reason_ = 0; - download_request_ = NULL; - user_information_ = NULL; - comment_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - download_response_ = NULL; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientDownloadReport::~ClientDownloadReport() { - SharedDtor(); -} - -void ClientDownloadReport::SharedDtor() { - if (comment_ != &::google::protobuf::internal::kEmptyString) { - delete comment_; - } - if (this != default_instance_) { - delete download_request_; - delete user_information_; - delete download_response_; - } -} - -void ClientDownloadReport::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientDownloadReport& ClientDownloadReport::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientDownloadReport* ClientDownloadReport::default_instance_ = NULL; - -ClientDownloadReport* ClientDownloadReport::New() const { - return new ClientDownloadReport; -} - -void ClientDownloadReport::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - reason_ = 0; - if (has_download_request()) { - if (download_request_ != NULL) download_request_->::safe_browsing::ClientDownloadRequest::Clear(); - } - if (has_user_information()) { - if (user_information_ != NULL) user_information_->::safe_browsing::ClientDownloadReport_UserInformation::Clear(); - } - if (has_comment()) { - if (comment_ != &::google::protobuf::internal::kEmptyString) { - comment_->clear(); - } - } - if (has_download_response()) { - if (download_response_ != NULL) download_response_->::safe_browsing::ClientDownloadResponse::Clear(); - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientDownloadReport::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::safe_browsing::ClientDownloadReport_Reason_IsValid(value)) { - set_reason(static_cast< ::safe_browsing::ClientDownloadReport_Reason >(value)); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_download_request; - break; - } - - // optional .safe_browsing.ClientDownloadRequest download_request = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_download_request: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_download_request())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(26)) goto parse_user_information; - break; - } - - // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_user_information: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_user_information())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(34)) goto parse_comment; - break; - } - - // optional bytes comment = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_comment: - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->mutable_comment())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(42)) goto parse_download_response; - break; - } - - // optional .safe_browsing.ClientDownloadResponse download_response = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_download_response: - DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( - input, mutable_download_response())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientDownloadReport::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; - if (has_reason()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->reason(), output); - } - - // optional .safe_browsing.ClientDownloadRequest download_request = 2; - if (has_download_request()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 2, this->download_request(), output); - } - - // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; - if (has_user_information()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 3, this->user_information(), output); - } - - // optional bytes comment = 4; - if (has_comment()) { - ::google::protobuf::internal::WireFormatLite::WriteBytes( - 4, this->comment(), output); - } - - // optional .safe_browsing.ClientDownloadResponse download_response = 5; - if (has_download_response()) { - ::google::protobuf::internal::WireFormatLite::WriteMessage( - 5, this->download_response(), output); - } - -} - -int ClientDownloadReport::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; - if (has_reason()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->reason()); - } - - // optional .safe_browsing.ClientDownloadRequest download_request = 2; - if (has_download_request()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->download_request()); - } - - // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; - if (has_user_information()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->user_information()); - } - - // optional bytes comment = 4; - if (has_comment()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( - this->comment()); - } - - // optional .safe_browsing.ClientDownloadResponse download_response = 5; - if (has_download_response()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( - this->download_response()); - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientDownloadReport::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientDownloadReport::MergeFrom(const ClientDownloadReport& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_reason()) { - set_reason(from.reason()); - } - if (from.has_download_request()) { - mutable_download_request()->::safe_browsing::ClientDownloadRequest::MergeFrom(from.download_request()); - } - if (from.has_user_information()) { - mutable_user_information()->::safe_browsing::ClientDownloadReport_UserInformation::MergeFrom(from.user_information()); - } - if (from.has_comment()) { - set_comment(from.comment()); - } - if (from.has_download_response()) { - mutable_download_response()->::safe_browsing::ClientDownloadResponse::MergeFrom(from.download_response()); - } - } -} - -void ClientDownloadReport::CopyFrom(const ClientDownloadReport& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientDownloadReport::IsInitialized() const { - - if (has_download_request()) { - if (!this->download_request().IsInitialized()) return false; - } - if (has_download_response()) { - if (!this->download_response().IsInitialized()) return false; - } - return true; -} - -void ClientDownloadReport::Swap(ClientDownloadReport* other) { - if (other != this) { - std::swap(reason_, other->reason_); - std::swap(download_request_, other->download_request_); - std::swap(user_information_, other->user_information_); - std::swap(comment_, other->comment_); - std::swap(download_response_, other->download_response_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientDownloadReport::GetTypeName() const { - return "safe_browsing.ClientDownloadReport"; -} - - -// =================================================================== - -bool ClientUploadResponse_UploadStatus_IsValid(int value) { - switch(value) { - case 0: - case 1: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const ClientUploadResponse_UploadStatus ClientUploadResponse::SUCCESS; -const ClientUploadResponse_UploadStatus ClientUploadResponse::UPLOAD_FAILURE; -const ClientUploadResponse_UploadStatus ClientUploadResponse::UploadStatus_MIN; -const ClientUploadResponse_UploadStatus ClientUploadResponse::UploadStatus_MAX; -const int ClientUploadResponse::UploadStatus_ARRAYSIZE; -#endif // _MSC_VER -#ifndef _MSC_VER -const int ClientUploadResponse::kStatusFieldNumber; -const int ClientUploadResponse::kPermalinkFieldNumber; -#endif // !_MSC_VER - -ClientUploadResponse::ClientUploadResponse() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void ClientUploadResponse::InitAsDefaultInstance() { -} - -ClientUploadResponse::ClientUploadResponse(const ClientUploadResponse& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void ClientUploadResponse::SharedCtor() { - _cached_size_ = 0; - status_ = 0; - permalink_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -ClientUploadResponse::~ClientUploadResponse() { - SharedDtor(); -} - -void ClientUploadResponse::SharedDtor() { - if (permalink_ != &::google::protobuf::internal::kEmptyString) { - delete permalink_; - } - if (this != default_instance_) { - } -} - -void ClientUploadResponse::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ClientUploadResponse& ClientUploadResponse::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_; -} - -ClientUploadResponse* ClientUploadResponse::default_instance_ = NULL; - -ClientUploadResponse* ClientUploadResponse::New() const { - return new ClientUploadResponse; -} - -void ClientUploadResponse::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - status_ = 0; - if (has_permalink()) { - if (permalink_ != &::google::protobuf::internal::kEmptyString) { - permalink_->clear(); - } - } - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool ClientUploadResponse::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::safe_browsing::ClientUploadResponse_UploadStatus_IsValid(value)) { - set_status(static_cast< ::safe_browsing::ClientUploadResponse_UploadStatus >(value)); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(18)) goto parse_permalink; - break; - } - - // optional string permalink = 2; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_permalink: - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_permalink())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void ClientUploadResponse::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; - if (has_status()) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->status(), output); - } - - // optional string permalink = 2; - if (has_permalink()) { - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->permalink(), output); - } - -} - -int ClientUploadResponse::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; - if (has_status()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); - } - - // optional string permalink = 2; - if (has_permalink()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->permalink()); - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void ClientUploadResponse::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast(&from)); -} - -void ClientUploadResponse::MergeFrom(const ClientUploadResponse& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from.has_status()) { - set_status(from.status()); - } - if (from.has_permalink()) { - set_permalink(from.permalink()); - } - } -} - -void ClientUploadResponse::CopyFrom(const ClientUploadResponse& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool ClientUploadResponse::IsInitialized() const { - - return true; -} - -void ClientUploadResponse::Swap(ClientUploadResponse* other) { - if (other != this) { - std::swap(status_, other->status_); - std::swap(permalink_, other->permalink_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string ClientUploadResponse::GetTypeName() const { - return "safe_browsing.ClientUploadResponse"; -} - - // @@protoc_insertion_point(namespace_scope) } // namespace safe_browsing diff --git a/toolkit/components/downloads/csd.pb.h b/toolkit/components/downloads/csd.pb.h index 5b963c993fa..77e5d79329d 100644 --- a/toolkit/components/downloads/csd.pb.h +++ b/toolkit/components/downloads/csd.pb.h @@ -31,23 +31,17 @@ void protobuf_AddDesc_csd_2eproto(); void protobuf_AssignDesc_csd_2eproto(); void protobuf_ShutdownFile_csd_2eproto(); -class ClientPhishingRequest; -class ClientPhishingRequest_Feature; -class ClientPhishingResponse; -class ClientMalwareRequest; -class ClientMalwareRequest_Feature; -class ClientMalwareResponse; class ClientDownloadRequest; class ClientDownloadRequest_Digests; class ClientDownloadRequest_Resource; class ClientDownloadRequest_CertificateChain; class ClientDownloadRequest_CertificateChain_Element; class ClientDownloadRequest_SignatureInfo; +class ClientDownloadRequest_PEImageHeaders; +class ClientDownloadRequest_PEImageHeaders_DebugData; +class ClientDownloadRequest_ImageHeaders; class ClientDownloadResponse; class ClientDownloadResponse_MoreInfo; -class ClientDownloadReport; -class ClientDownloadReport_UserInformation; -class ClientUploadResponse; enum ClientDownloadRequest_ResourceType { ClientDownloadRequest_ResourceType_DOWNLOAD_URL = 0, @@ -83,640 +77,8 @@ const ClientDownloadResponse_Verdict ClientDownloadResponse_Verdict_Verdict_MIN const ClientDownloadResponse_Verdict ClientDownloadResponse_Verdict_Verdict_MAX = ClientDownloadResponse_Verdict_DANGEROUS_HOST; const int ClientDownloadResponse_Verdict_Verdict_ARRAYSIZE = ClientDownloadResponse_Verdict_Verdict_MAX + 1; -enum ClientDownloadReport_Reason { - ClientDownloadReport_Reason_SHARE = 0, - ClientDownloadReport_Reason_FALSE_POSITIVE = 1, - ClientDownloadReport_Reason_APPEAL = 2 -}; -bool ClientDownloadReport_Reason_IsValid(int value); -const ClientDownloadReport_Reason ClientDownloadReport_Reason_Reason_MIN = ClientDownloadReport_Reason_SHARE; -const ClientDownloadReport_Reason ClientDownloadReport_Reason_Reason_MAX = ClientDownloadReport_Reason_APPEAL; -const int ClientDownloadReport_Reason_Reason_ARRAYSIZE = ClientDownloadReport_Reason_Reason_MAX + 1; - -enum ClientUploadResponse_UploadStatus { - ClientUploadResponse_UploadStatus_SUCCESS = 0, - ClientUploadResponse_UploadStatus_UPLOAD_FAILURE = 1 -}; -bool ClientUploadResponse_UploadStatus_IsValid(int value); -const ClientUploadResponse_UploadStatus ClientUploadResponse_UploadStatus_UploadStatus_MIN = ClientUploadResponse_UploadStatus_SUCCESS; -const ClientUploadResponse_UploadStatus ClientUploadResponse_UploadStatus_UploadStatus_MAX = ClientUploadResponse_UploadStatus_UPLOAD_FAILURE; -const int ClientUploadResponse_UploadStatus_UploadStatus_ARRAYSIZE = ClientUploadResponse_UploadStatus_UploadStatus_MAX + 1; - // =================================================================== -class ClientPhishingRequest_Feature : public ::google::protobuf::MessageLite { - public: - ClientPhishingRequest_Feature(); - virtual ~ClientPhishingRequest_Feature(); - - ClientPhishingRequest_Feature(const ClientPhishingRequest_Feature& from); - - inline ClientPhishingRequest_Feature& operator=(const ClientPhishingRequest_Feature& from) { - CopyFrom(from); - return *this; - } - - static const ClientPhishingRequest_Feature& default_instance(); - - void Swap(ClientPhishingRequest_Feature* other); - - // implements Message ---------------------------------------------- - - ClientPhishingRequest_Feature* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientPhishingRequest_Feature& from); - void MergeFrom(const ClientPhishingRequest_Feature& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // required string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // required double value = 2; - inline bool has_value() const; - inline void clear_value(); - static const int kValueFieldNumber = 2; - inline double value() const; - inline void set_value(double value); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientPhishingRequest.Feature) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_value(); - inline void clear_has_value(); - - ::std::string* name_; - double value_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientPhishingRequest_Feature* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientPhishingRequest : public ::google::protobuf::MessageLite { - public: - ClientPhishingRequest(); - virtual ~ClientPhishingRequest(); - - ClientPhishingRequest(const ClientPhishingRequest& from); - - inline ClientPhishingRequest& operator=(const ClientPhishingRequest& from) { - CopyFrom(from); - return *this; - } - - static const ClientPhishingRequest& default_instance(); - - void Swap(ClientPhishingRequest* other); - - // implements Message ---------------------------------------------- - - ClientPhishingRequest* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientPhishingRequest& from); - void MergeFrom(const ClientPhishingRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - typedef ClientPhishingRequest_Feature Feature; - - // accessors ------------------------------------------------------- - - // optional string url = 1; - inline bool has_url() const; - inline void clear_url(); - static const int kUrlFieldNumber = 1; - inline const ::std::string& url() const; - inline void set_url(const ::std::string& value); - inline void set_url(const char* value); - inline void set_url(const char* value, size_t size); - inline ::std::string* mutable_url(); - inline ::std::string* release_url(); - - // optional bytes OBSOLETE_hash_prefix = 10; - inline bool has_obsolete_hash_prefix() const; - inline void clear_obsolete_hash_prefix(); - static const int kOBSOLETEHashPrefixFieldNumber = 10; - inline const ::std::string& obsolete_hash_prefix() const; - inline void set_obsolete_hash_prefix(const ::std::string& value); - inline void set_obsolete_hash_prefix(const char* value); - inline void set_obsolete_hash_prefix(const void* value, size_t size); - inline ::std::string* mutable_obsolete_hash_prefix(); - inline ::std::string* release_obsolete_hash_prefix(); - - // required float client_score = 2; - inline bool has_client_score() const; - inline void clear_client_score(); - static const int kClientScoreFieldNumber = 2; - inline float client_score() const; - inline void set_client_score(float value); - - // optional bool is_phishing = 4; - inline bool has_is_phishing() const; - inline void clear_is_phishing(); - static const int kIsPhishingFieldNumber = 4; - inline bool is_phishing() const; - inline void set_is_phishing(bool value); - - // repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; - inline int feature_map_size() const; - inline void clear_feature_map(); - static const int kFeatureMapFieldNumber = 5; - inline const ::safe_browsing::ClientPhishingRequest_Feature& feature_map(int index) const; - inline ::safe_browsing::ClientPhishingRequest_Feature* mutable_feature_map(int index); - inline ::safe_browsing::ClientPhishingRequest_Feature* add_feature_map(); - inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >& - feature_map() const; - inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >* - mutable_feature_map(); - - // optional int32 model_version = 6; - inline bool has_model_version() const; - inline void clear_model_version(); - static const int kModelVersionFieldNumber = 6; - inline ::google::protobuf::int32 model_version() const; - inline void set_model_version(::google::protobuf::int32 value); - - // repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; - inline int non_model_feature_map_size() const; - inline void clear_non_model_feature_map(); - static const int kNonModelFeatureMapFieldNumber = 8; - inline const ::safe_browsing::ClientPhishingRequest_Feature& non_model_feature_map(int index) const; - inline ::safe_browsing::ClientPhishingRequest_Feature* mutable_non_model_feature_map(int index); - inline ::safe_browsing::ClientPhishingRequest_Feature* add_non_model_feature_map(); - inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >& - non_model_feature_map() const; - inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >* - mutable_non_model_feature_map(); - - // optional string OBSOLETE_referrer_url = 9; - inline bool has_obsolete_referrer_url() const; - inline void clear_obsolete_referrer_url(); - static const int kOBSOLETEReferrerUrlFieldNumber = 9; - inline const ::std::string& obsolete_referrer_url() const; - inline void set_obsolete_referrer_url(const ::std::string& value); - inline void set_obsolete_referrer_url(const char* value); - inline void set_obsolete_referrer_url(const char* value, size_t size); - inline ::std::string* mutable_obsolete_referrer_url(); - inline ::std::string* release_obsolete_referrer_url(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientPhishingRequest) - private: - inline void set_has_url(); - inline void clear_has_url(); - inline void set_has_obsolete_hash_prefix(); - inline void clear_has_obsolete_hash_prefix(); - inline void set_has_client_score(); - inline void clear_has_client_score(); - inline void set_has_is_phishing(); - inline void clear_has_is_phishing(); - inline void set_has_model_version(); - inline void clear_has_model_version(); - inline void set_has_obsolete_referrer_url(); - inline void clear_has_obsolete_referrer_url(); - - ::std::string* url_; - ::std::string* obsolete_hash_prefix_; - float client_score_; - bool is_phishing_; - ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature > feature_map_; - ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature > non_model_feature_map_; - ::std::string* obsolete_referrer_url_; - ::google::protobuf::int32 model_version_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientPhishingRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientPhishingResponse : public ::google::protobuf::MessageLite { - public: - ClientPhishingResponse(); - virtual ~ClientPhishingResponse(); - - ClientPhishingResponse(const ClientPhishingResponse& from); - - inline ClientPhishingResponse& operator=(const ClientPhishingResponse& from) { - CopyFrom(from); - return *this; - } - - static const ClientPhishingResponse& default_instance(); - - void Swap(ClientPhishingResponse* other); - - // implements Message ---------------------------------------------- - - ClientPhishingResponse* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientPhishingResponse& from); - void MergeFrom(const ClientPhishingResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // required bool phishy = 1; - inline bool has_phishy() const; - inline void clear_phishy(); - static const int kPhishyFieldNumber = 1; - inline bool phishy() const; - inline void set_phishy(bool value); - - // repeated string OBSOLETE_whitelist_expression = 2; - inline int obsolete_whitelist_expression_size() const; - inline void clear_obsolete_whitelist_expression(); - static const int kOBSOLETEWhitelistExpressionFieldNumber = 2; - inline const ::std::string& obsolete_whitelist_expression(int index) const; - inline ::std::string* mutable_obsolete_whitelist_expression(int index); - inline void set_obsolete_whitelist_expression(int index, const ::std::string& value); - inline void set_obsolete_whitelist_expression(int index, const char* value); - inline void set_obsolete_whitelist_expression(int index, const char* value, size_t size); - inline ::std::string* add_obsolete_whitelist_expression(); - inline void add_obsolete_whitelist_expression(const ::std::string& value); - inline void add_obsolete_whitelist_expression(const char* value); - inline void add_obsolete_whitelist_expression(const char* value, size_t size); - inline const ::google::protobuf::RepeatedPtrField< ::std::string>& obsolete_whitelist_expression() const; - inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_obsolete_whitelist_expression(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientPhishingResponse) - private: - inline void set_has_phishy(); - inline void clear_has_phishy(); - - ::google::protobuf::RepeatedPtrField< ::std::string> obsolete_whitelist_expression_; - bool phishy_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientPhishingResponse* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientMalwareRequest_Feature : public ::google::protobuf::MessageLite { - public: - ClientMalwareRequest_Feature(); - virtual ~ClientMalwareRequest_Feature(); - - ClientMalwareRequest_Feature(const ClientMalwareRequest_Feature& from); - - inline ClientMalwareRequest_Feature& operator=(const ClientMalwareRequest_Feature& from) { - CopyFrom(from); - return *this; - } - - static const ClientMalwareRequest_Feature& default_instance(); - - void Swap(ClientMalwareRequest_Feature* other); - - // implements Message ---------------------------------------------- - - ClientMalwareRequest_Feature* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientMalwareRequest_Feature& from); - void MergeFrom(const ClientMalwareRequest_Feature& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // required string name = 1; - inline bool has_name() const; - inline void clear_name(); - static const int kNameFieldNumber = 1; - inline const ::std::string& name() const; - inline void set_name(const ::std::string& value); - inline void set_name(const char* value); - inline void set_name(const char* value, size_t size); - inline ::std::string* mutable_name(); - inline ::std::string* release_name(); - - // required double value = 2; - inline bool has_value() const; - inline void clear_value(); - static const int kValueFieldNumber = 2; - inline double value() const; - inline void set_value(double value); - - // repeated string metainfo = 3; - inline int metainfo_size() const; - inline void clear_metainfo(); - static const int kMetainfoFieldNumber = 3; - inline const ::std::string& metainfo(int index) const; - inline ::std::string* mutable_metainfo(int index); - inline void set_metainfo(int index, const ::std::string& value); - inline void set_metainfo(int index, const char* value); - inline void set_metainfo(int index, const char* value, size_t size); - inline ::std::string* add_metainfo(); - inline void add_metainfo(const ::std::string& value); - inline void add_metainfo(const char* value); - inline void add_metainfo(const char* value, size_t size); - inline const ::google::protobuf::RepeatedPtrField< ::std::string>& metainfo() const; - inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_metainfo(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientMalwareRequest.Feature) - private: - inline void set_has_name(); - inline void clear_has_name(); - inline void set_has_value(); - inline void clear_has_value(); - - ::std::string* name_; - double value_; - ::google::protobuf::RepeatedPtrField< ::std::string> metainfo_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientMalwareRequest_Feature* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientMalwareRequest : public ::google::protobuf::MessageLite { - public: - ClientMalwareRequest(); - virtual ~ClientMalwareRequest(); - - ClientMalwareRequest(const ClientMalwareRequest& from); - - inline ClientMalwareRequest& operator=(const ClientMalwareRequest& from) { - CopyFrom(from); - return *this; - } - - static const ClientMalwareRequest& default_instance(); - - void Swap(ClientMalwareRequest* other); - - // implements Message ---------------------------------------------- - - ClientMalwareRequest* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientMalwareRequest& from); - void MergeFrom(const ClientMalwareRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - typedef ClientMalwareRequest_Feature Feature; - - // accessors ------------------------------------------------------- - - // required string url = 1; - inline bool has_url() const; - inline void clear_url(); - static const int kUrlFieldNumber = 1; - inline const ::std::string& url() const; - inline void set_url(const ::std::string& value); - inline void set_url(const char* value); - inline void set_url(const char* value, size_t size); - inline ::std::string* mutable_url(); - inline ::std::string* release_url(); - - // repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; - inline int feature_map_size() const; - inline void clear_feature_map(); - static const int kFeatureMapFieldNumber = 2; - inline const ::safe_browsing::ClientMalwareRequest_Feature& feature_map(int index) const; - inline ::safe_browsing::ClientMalwareRequest_Feature* mutable_feature_map(int index); - inline ::safe_browsing::ClientMalwareRequest_Feature* add_feature_map(); - inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientMalwareRequest_Feature >& - feature_map() const; - inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientMalwareRequest_Feature >* - mutable_feature_map(); - - // optional string referrer_url = 4; - inline bool has_referrer_url() const; - inline void clear_referrer_url(); - static const int kReferrerUrlFieldNumber = 4; - inline const ::std::string& referrer_url() const; - inline void set_referrer_url(const ::std::string& value); - inline void set_referrer_url(const char* value); - inline void set_referrer_url(const char* value, size_t size); - inline ::std::string* mutable_referrer_url(); - inline ::std::string* release_referrer_url(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientMalwareRequest) - private: - inline void set_has_url(); - inline void clear_has_url(); - inline void set_has_referrer_url(); - inline void clear_has_referrer_url(); - - ::std::string* url_; - ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientMalwareRequest_Feature > feature_map_; - ::std::string* referrer_url_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(3 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientMalwareRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientMalwareResponse : public ::google::protobuf::MessageLite { - public: - ClientMalwareResponse(); - virtual ~ClientMalwareResponse(); - - ClientMalwareResponse(const ClientMalwareResponse& from); - - inline ClientMalwareResponse& operator=(const ClientMalwareResponse& from) { - CopyFrom(from); - return *this; - } - - static const ClientMalwareResponse& default_instance(); - - void Swap(ClientMalwareResponse* other); - - // implements Message ---------------------------------------------- - - ClientMalwareResponse* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientMalwareResponse& from); - void MergeFrom(const ClientMalwareResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // required bool blacklist = 1; - inline bool has_blacklist() const; - inline void clear_blacklist(); - static const int kBlacklistFieldNumber = 1; - inline bool blacklist() const; - inline void set_blacklist(bool value); - - // optional string bad_ip = 2; - inline bool has_bad_ip() const; - inline void clear_bad_ip(); - static const int kBadIpFieldNumber = 2; - inline const ::std::string& bad_ip() const; - inline void set_bad_ip(const ::std::string& value); - inline void set_bad_ip(const char* value); - inline void set_bad_ip(const char* value, size_t size); - inline ::std::string* mutable_bad_ip(); - inline ::std::string* release_bad_ip(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientMalwareResponse) - private: - inline void set_has_blacklist(); - inline void clear_has_blacklist(); - inline void set_has_bad_ip(); - inline void clear_has_bad_ip(); - - ::std::string* bad_ip_; - bool blacklist_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientMalwareResponse* default_instance_; -}; -// ------------------------------------------------------------------- - class ClientDownloadRequest_Digests : public ::google::protobuf::MessageLite { public: ClientDownloadRequest_Digests(); @@ -1158,6 +520,324 @@ class ClientDownloadRequest_SignatureInfo : public ::google::protobuf::MessageLi }; // ------------------------------------------------------------------- +class ClientDownloadRequest_PEImageHeaders_DebugData : public ::google::protobuf::MessageLite { + public: + ClientDownloadRequest_PEImageHeaders_DebugData(); + virtual ~ClientDownloadRequest_PEImageHeaders_DebugData(); + + ClientDownloadRequest_PEImageHeaders_DebugData(const ClientDownloadRequest_PEImageHeaders_DebugData& from); + + inline ClientDownloadRequest_PEImageHeaders_DebugData& operator=(const ClientDownloadRequest_PEImageHeaders_DebugData& from) { + CopyFrom(from); + return *this; + } + + static const ClientDownloadRequest_PEImageHeaders_DebugData& default_instance(); + + void Swap(ClientDownloadRequest_PEImageHeaders_DebugData* other); + + // implements Message ---------------------------------------------- + + ClientDownloadRequest_PEImageHeaders_DebugData* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const ClientDownloadRequest_PEImageHeaders_DebugData& from); + void MergeFrom(const ClientDownloadRequest_PEImageHeaders_DebugData& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional bytes directory_entry = 1; + inline bool has_directory_entry() const; + inline void clear_directory_entry(); + static const int kDirectoryEntryFieldNumber = 1; + inline const ::std::string& directory_entry() const; + inline void set_directory_entry(const ::std::string& value); + inline void set_directory_entry(const char* value); + inline void set_directory_entry(const void* value, size_t size); + inline ::std::string* mutable_directory_entry(); + inline ::std::string* release_directory_entry(); + + // optional bytes raw_data = 2; + inline bool has_raw_data() const; + inline void clear_raw_data(); + static const int kRawDataFieldNumber = 2; + inline const ::std::string& raw_data() const; + inline void set_raw_data(const ::std::string& value); + inline void set_raw_data(const char* value); + inline void set_raw_data(const void* value, size_t size); + inline ::std::string* mutable_raw_data(); + inline ::std::string* release_raw_data(); + + // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData) + private: + inline void set_has_directory_entry(); + inline void clear_has_directory_entry(); + inline void set_has_raw_data(); + inline void clear_has_raw_data(); + + ::std::string* directory_entry_; + ::std::string* raw_data_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; + + friend void protobuf_AddDesc_csd_2eproto(); + friend void protobuf_AssignDesc_csd_2eproto(); + friend void protobuf_ShutdownFile_csd_2eproto(); + + void InitAsDefaultInstance(); + static ClientDownloadRequest_PEImageHeaders_DebugData* default_instance_; +}; +// ------------------------------------------------------------------- + +class ClientDownloadRequest_PEImageHeaders : public ::google::protobuf::MessageLite { + public: + ClientDownloadRequest_PEImageHeaders(); + virtual ~ClientDownloadRequest_PEImageHeaders(); + + ClientDownloadRequest_PEImageHeaders(const ClientDownloadRequest_PEImageHeaders& from); + + inline ClientDownloadRequest_PEImageHeaders& operator=(const ClientDownloadRequest_PEImageHeaders& from) { + CopyFrom(from); + return *this; + } + + static const ClientDownloadRequest_PEImageHeaders& default_instance(); + + void Swap(ClientDownloadRequest_PEImageHeaders* other); + + // implements Message ---------------------------------------------- + + ClientDownloadRequest_PEImageHeaders* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const ClientDownloadRequest_PEImageHeaders& from); + void MergeFrom(const ClientDownloadRequest_PEImageHeaders& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + typedef ClientDownloadRequest_PEImageHeaders_DebugData DebugData; + + // accessors ------------------------------------------------------- + + // optional bytes dos_header = 1; + inline bool has_dos_header() const; + inline void clear_dos_header(); + static const int kDosHeaderFieldNumber = 1; + inline const ::std::string& dos_header() const; + inline void set_dos_header(const ::std::string& value); + inline void set_dos_header(const char* value); + inline void set_dos_header(const void* value, size_t size); + inline ::std::string* mutable_dos_header(); + inline ::std::string* release_dos_header(); + + // optional bytes file_header = 2; + inline bool has_file_header() const; + inline void clear_file_header(); + static const int kFileHeaderFieldNumber = 2; + inline const ::std::string& file_header() const; + inline void set_file_header(const ::std::string& value); + inline void set_file_header(const char* value); + inline void set_file_header(const void* value, size_t size); + inline ::std::string* mutable_file_header(); + inline ::std::string* release_file_header(); + + // optional bytes optional_headers32 = 3; + inline bool has_optional_headers32() const; + inline void clear_optional_headers32(); + static const int kOptionalHeaders32FieldNumber = 3; + inline const ::std::string& optional_headers32() const; + inline void set_optional_headers32(const ::std::string& value); + inline void set_optional_headers32(const char* value); + inline void set_optional_headers32(const void* value, size_t size); + inline ::std::string* mutable_optional_headers32(); + inline ::std::string* release_optional_headers32(); + + // optional bytes optional_headers64 = 4; + inline bool has_optional_headers64() const; + inline void clear_optional_headers64(); + static const int kOptionalHeaders64FieldNumber = 4; + inline const ::std::string& optional_headers64() const; + inline void set_optional_headers64(const ::std::string& value); + inline void set_optional_headers64(const char* value); + inline void set_optional_headers64(const void* value, size_t size); + inline ::std::string* mutable_optional_headers64(); + inline ::std::string* release_optional_headers64(); + + // repeated bytes section_header = 5; + inline int section_header_size() const; + inline void clear_section_header(); + static const int kSectionHeaderFieldNumber = 5; + inline const ::std::string& section_header(int index) const; + inline ::std::string* mutable_section_header(int index); + inline void set_section_header(int index, const ::std::string& value); + inline void set_section_header(int index, const char* value); + inline void set_section_header(int index, const void* value, size_t size); + inline ::std::string* add_section_header(); + inline void add_section_header(const ::std::string& value); + inline void add_section_header(const char* value); + inline void add_section_header(const void* value, size_t size); + inline const ::google::protobuf::RepeatedPtrField< ::std::string>& section_header() const; + inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_section_header(); + + // optional bytes export_section_data = 6; + inline bool has_export_section_data() const; + inline void clear_export_section_data(); + static const int kExportSectionDataFieldNumber = 6; + inline const ::std::string& export_section_data() const; + inline void set_export_section_data(const ::std::string& value); + inline void set_export_section_data(const char* value); + inline void set_export_section_data(const void* value, size_t size); + inline ::std::string* mutable_export_section_data(); + inline ::std::string* release_export_section_data(); + + // repeated .safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData debug_data = 7; + inline int debug_data_size() const; + inline void clear_debug_data(); + static const int kDebugDataFieldNumber = 7; + inline const ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData& debug_data(int index) const; + inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData* mutable_debug_data(int index); + inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData* add_debug_data(); + inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData >& + debug_data() const; + inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData >* + mutable_debug_data(); + + // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadRequest.PEImageHeaders) + private: + inline void set_has_dos_header(); + inline void clear_has_dos_header(); + inline void set_has_file_header(); + inline void clear_has_file_header(); + inline void set_has_optional_headers32(); + inline void clear_has_optional_headers32(); + inline void set_has_optional_headers64(); + inline void clear_has_optional_headers64(); + inline void set_has_export_section_data(); + inline void clear_has_export_section_data(); + + ::std::string* dos_header_; + ::std::string* file_header_; + ::std::string* optional_headers32_; + ::std::string* optional_headers64_; + ::google::protobuf::RepeatedPtrField< ::std::string> section_header_; + ::std::string* export_section_data_; + ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData > debug_data_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; + + friend void protobuf_AddDesc_csd_2eproto(); + friend void protobuf_AssignDesc_csd_2eproto(); + friend void protobuf_ShutdownFile_csd_2eproto(); + + void InitAsDefaultInstance(); + static ClientDownloadRequest_PEImageHeaders* default_instance_; +}; +// ------------------------------------------------------------------- + +class ClientDownloadRequest_ImageHeaders : public ::google::protobuf::MessageLite { + public: + ClientDownloadRequest_ImageHeaders(); + virtual ~ClientDownloadRequest_ImageHeaders(); + + ClientDownloadRequest_ImageHeaders(const ClientDownloadRequest_ImageHeaders& from); + + inline ClientDownloadRequest_ImageHeaders& operator=(const ClientDownloadRequest_ImageHeaders& from) { + CopyFrom(from); + return *this; + } + + static const ClientDownloadRequest_ImageHeaders& default_instance(); + + void Swap(ClientDownloadRequest_ImageHeaders* other); + + // implements Message ---------------------------------------------- + + ClientDownloadRequest_ImageHeaders* New() const; + void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); + void CopyFrom(const ClientDownloadRequest_ImageHeaders& from); + void MergeFrom(const ClientDownloadRequest_ImageHeaders& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + int GetCachedSize() const { return _cached_size_; } + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + public: + + ::std::string GetTypeName() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional .safe_browsing.ClientDownloadRequest.PEImageHeaders pe_headers = 1; + inline bool has_pe_headers() const; + inline void clear_pe_headers(); + static const int kPeHeadersFieldNumber = 1; + inline const ::safe_browsing::ClientDownloadRequest_PEImageHeaders& pe_headers() const; + inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders* mutable_pe_headers(); + inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders* release_pe_headers(); + + // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadRequest.ImageHeaders) + private: + inline void set_has_pe_headers(); + inline void clear_has_pe_headers(); + + ::safe_browsing::ClientDownloadRequest_PEImageHeaders* pe_headers_; + + mutable int _cached_size_; + ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; + + friend void protobuf_AddDesc_csd_2eproto(); + friend void protobuf_AssignDesc_csd_2eproto(); + friend void protobuf_ShutdownFile_csd_2eproto(); + + void InitAsDefaultInstance(); + static ClientDownloadRequest_ImageHeaders* default_instance_; +}; +// ------------------------------------------------------------------- + class ClientDownloadRequest : public ::google::protobuf::MessageLite { public: ClientDownloadRequest(); @@ -1203,6 +883,8 @@ class ClientDownloadRequest : public ::google::protobuf::MessageLite { typedef ClientDownloadRequest_Resource Resource; typedef ClientDownloadRequest_CertificateChain CertificateChain; typedef ClientDownloadRequest_SignatureInfo SignatureInfo; + typedef ClientDownloadRequest_PEImageHeaders PEImageHeaders; + typedef ClientDownloadRequest_ImageHeaders ImageHeaders; typedef ClientDownloadRequest_ResourceType ResourceType; static const ResourceType DOWNLOAD_URL = ClientDownloadRequest_ResourceType_DOWNLOAD_URL; @@ -1318,6 +1000,14 @@ class ClientDownloadRequest : public ::google::protobuf::MessageLite { inline ::std::string* mutable_locale(); inline ::std::string* release_locale(); + // optional .safe_browsing.ClientDownloadRequest.ImageHeaders image_headers = 18; + inline bool has_image_headers() const; + inline void clear_image_headers(); + static const int kImageHeadersFieldNumber = 18; + inline const ::safe_browsing::ClientDownloadRequest_ImageHeaders& image_headers() const; + inline ::safe_browsing::ClientDownloadRequest_ImageHeaders* mutable_image_headers(); + inline ::safe_browsing::ClientDownloadRequest_ImageHeaders* release_image_headers(); + // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadRequest) private: inline void set_has_url(); @@ -1336,6 +1026,8 @@ class ClientDownloadRequest : public ::google::protobuf::MessageLite { inline void clear_has_download_type(); inline void set_has_locale(); inline void clear_has_locale(); + inline void set_has_image_headers(); + inline void clear_has_image_headers(); ::std::string* url_; ::safe_browsing::ClientDownloadRequest_Digests* digests_; @@ -1346,9 +1038,10 @@ class ClientDownloadRequest : public ::google::protobuf::MessageLite { bool user_initiated_; int download_type_; ::std::string* locale_; + ::safe_browsing::ClientDownloadRequest_ImageHeaders* image_headers_; mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(9 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(10 + 31) / 32]; friend void protobuf_AddDesc_csd_2eproto(); friend void protobuf_AssignDesc_csd_2eproto(); @@ -1556,1117 +1249,11 @@ class ClientDownloadResponse : public ::google::protobuf::MessageLite { void InitAsDefaultInstance(); static ClientDownloadResponse* default_instance_; }; -// ------------------------------------------------------------------- - -class ClientDownloadReport_UserInformation : public ::google::protobuf::MessageLite { - public: - ClientDownloadReport_UserInformation(); - virtual ~ClientDownloadReport_UserInformation(); - - ClientDownloadReport_UserInformation(const ClientDownloadReport_UserInformation& from); - - inline ClientDownloadReport_UserInformation& operator=(const ClientDownloadReport_UserInformation& from) { - CopyFrom(from); - return *this; - } - - static const ClientDownloadReport_UserInformation& default_instance(); - - void Swap(ClientDownloadReport_UserInformation* other); - - // implements Message ---------------------------------------------- - - ClientDownloadReport_UserInformation* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientDownloadReport_UserInformation& from); - void MergeFrom(const ClientDownloadReport_UserInformation& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string email = 1; - inline bool has_email() const; - inline void clear_email(); - static const int kEmailFieldNumber = 1; - inline const ::std::string& email() const; - inline void set_email(const ::std::string& value); - inline void set_email(const char* value); - inline void set_email(const char* value, size_t size); - inline ::std::string* mutable_email(); - inline ::std::string* release_email(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadReport.UserInformation) - private: - inline void set_has_email(); - inline void clear_has_email(); - - ::std::string* email_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(1 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientDownloadReport_UserInformation* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientDownloadReport : public ::google::protobuf::MessageLite { - public: - ClientDownloadReport(); - virtual ~ClientDownloadReport(); - - ClientDownloadReport(const ClientDownloadReport& from); - - inline ClientDownloadReport& operator=(const ClientDownloadReport& from) { - CopyFrom(from); - return *this; - } - - static const ClientDownloadReport& default_instance(); - - void Swap(ClientDownloadReport* other); - - // implements Message ---------------------------------------------- - - ClientDownloadReport* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientDownloadReport& from); - void MergeFrom(const ClientDownloadReport& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - typedef ClientDownloadReport_UserInformation UserInformation; - - typedef ClientDownloadReport_Reason Reason; - static const Reason SHARE = ClientDownloadReport_Reason_SHARE; - static const Reason FALSE_POSITIVE = ClientDownloadReport_Reason_FALSE_POSITIVE; - static const Reason APPEAL = ClientDownloadReport_Reason_APPEAL; - static inline bool Reason_IsValid(int value) { - return ClientDownloadReport_Reason_IsValid(value); - } - static const Reason Reason_MIN = - ClientDownloadReport_Reason_Reason_MIN; - static const Reason Reason_MAX = - ClientDownloadReport_Reason_Reason_MAX; - static const int Reason_ARRAYSIZE = - ClientDownloadReport_Reason_Reason_ARRAYSIZE; - - // accessors ------------------------------------------------------- - - // optional .safe_browsing.ClientDownloadReport.Reason reason = 1; - inline bool has_reason() const; - inline void clear_reason(); - static const int kReasonFieldNumber = 1; - inline ::safe_browsing::ClientDownloadReport_Reason reason() const; - inline void set_reason(::safe_browsing::ClientDownloadReport_Reason value); - - // optional .safe_browsing.ClientDownloadRequest download_request = 2; - inline bool has_download_request() const; - inline void clear_download_request(); - static const int kDownloadRequestFieldNumber = 2; - inline const ::safe_browsing::ClientDownloadRequest& download_request() const; - inline ::safe_browsing::ClientDownloadRequest* mutable_download_request(); - inline ::safe_browsing::ClientDownloadRequest* release_download_request(); - - // optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; - inline bool has_user_information() const; - inline void clear_user_information(); - static const int kUserInformationFieldNumber = 3; - inline const ::safe_browsing::ClientDownloadReport_UserInformation& user_information() const; - inline ::safe_browsing::ClientDownloadReport_UserInformation* mutable_user_information(); - inline ::safe_browsing::ClientDownloadReport_UserInformation* release_user_information(); - - // optional bytes comment = 4; - inline bool has_comment() const; - inline void clear_comment(); - static const int kCommentFieldNumber = 4; - inline const ::std::string& comment() const; - inline void set_comment(const ::std::string& value); - inline void set_comment(const char* value); - inline void set_comment(const void* value, size_t size); - inline ::std::string* mutable_comment(); - inline ::std::string* release_comment(); - - // optional .safe_browsing.ClientDownloadResponse download_response = 5; - inline bool has_download_response() const; - inline void clear_download_response(); - static const int kDownloadResponseFieldNumber = 5; - inline const ::safe_browsing::ClientDownloadResponse& download_response() const; - inline ::safe_browsing::ClientDownloadResponse* mutable_download_response(); - inline ::safe_browsing::ClientDownloadResponse* release_download_response(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadReport) - private: - inline void set_has_reason(); - inline void clear_has_reason(); - inline void set_has_download_request(); - inline void clear_has_download_request(); - inline void set_has_user_information(); - inline void clear_has_user_information(); - inline void set_has_comment(); - inline void clear_has_comment(); - inline void set_has_download_response(); - inline void clear_has_download_response(); - - ::safe_browsing::ClientDownloadRequest* download_request_; - ::safe_browsing::ClientDownloadReport_UserInformation* user_information_; - ::std::string* comment_; - ::safe_browsing::ClientDownloadResponse* download_response_; - int reason_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(5 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientDownloadReport* default_instance_; -}; -// ------------------------------------------------------------------- - -class ClientUploadResponse : public ::google::protobuf::MessageLite { - public: - ClientUploadResponse(); - virtual ~ClientUploadResponse(); - - ClientUploadResponse(const ClientUploadResponse& from); - - inline ClientUploadResponse& operator=(const ClientUploadResponse& from) { - CopyFrom(from); - return *this; - } - - static const ClientUploadResponse& default_instance(); - - void Swap(ClientUploadResponse* other); - - // implements Message ---------------------------------------------- - - ClientUploadResponse* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const ClientUploadResponse& from); - void MergeFrom(const ClientUploadResponse& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - typedef ClientUploadResponse_UploadStatus UploadStatus; - static const UploadStatus SUCCESS = ClientUploadResponse_UploadStatus_SUCCESS; - static const UploadStatus UPLOAD_FAILURE = ClientUploadResponse_UploadStatus_UPLOAD_FAILURE; - static inline bool UploadStatus_IsValid(int value) { - return ClientUploadResponse_UploadStatus_IsValid(value); - } - static const UploadStatus UploadStatus_MIN = - ClientUploadResponse_UploadStatus_UploadStatus_MIN; - static const UploadStatus UploadStatus_MAX = - ClientUploadResponse_UploadStatus_UploadStatus_MAX; - static const int UploadStatus_ARRAYSIZE = - ClientUploadResponse_UploadStatus_UploadStatus_ARRAYSIZE; - - // accessors ------------------------------------------------------- - - // optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; - inline bool has_status() const; - inline void clear_status(); - static const int kStatusFieldNumber = 1; - inline ::safe_browsing::ClientUploadResponse_UploadStatus status() const; - inline void set_status(::safe_browsing::ClientUploadResponse_UploadStatus value); - - // optional string permalink = 2; - inline bool has_permalink() const; - inline void clear_permalink(); - static const int kPermalinkFieldNumber = 2; - inline const ::std::string& permalink() const; - inline void set_permalink(const ::std::string& value); - inline void set_permalink(const char* value); - inline void set_permalink(const char* value, size_t size); - inline ::std::string* mutable_permalink(); - inline ::std::string* release_permalink(); - - // @@protoc_insertion_point(class_scope:safe_browsing.ClientUploadResponse) - private: - inline void set_has_status(); - inline void clear_has_status(); - inline void set_has_permalink(); - inline void clear_has_permalink(); - - ::std::string* permalink_; - int status_; - - mutable int _cached_size_; - ::google::protobuf::uint32 _has_bits_[(2 + 31) / 32]; - - friend void protobuf_AddDesc_csd_2eproto(); - friend void protobuf_AssignDesc_csd_2eproto(); - friend void protobuf_ShutdownFile_csd_2eproto(); - - void InitAsDefaultInstance(); - static ClientUploadResponse* default_instance_; -}; // =================================================================== // =================================================================== -// ClientPhishingRequest_Feature - -// required string name = 1; -inline bool ClientPhishingRequest_Feature::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientPhishingRequest_Feature::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientPhishingRequest_Feature::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientPhishingRequest_Feature::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& ClientPhishingRequest_Feature::name() const { - return *name_; -} -inline void ClientPhishingRequest_Feature::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void ClientPhishingRequest_Feature::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void ClientPhishingRequest_Feature::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientPhishingRequest_Feature::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* ClientPhishingRequest_Feature::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// required double value = 2; -inline bool ClientPhishingRequest_Feature::has_value() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void ClientPhishingRequest_Feature::set_has_value() { - _has_bits_[0] |= 0x00000002u; -} -inline void ClientPhishingRequest_Feature::clear_has_value() { - _has_bits_[0] &= ~0x00000002u; -} -inline void ClientPhishingRequest_Feature::clear_value() { - value_ = 0; - clear_has_value(); -} -inline double ClientPhishingRequest_Feature::value() const { - return value_; -} -inline void ClientPhishingRequest_Feature::set_value(double value) { - set_has_value(); - value_ = value; -} - -// ------------------------------------------------------------------- - -// ClientPhishingRequest - -// optional string url = 1; -inline bool ClientPhishingRequest::has_url() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientPhishingRequest::set_has_url() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientPhishingRequest::clear_has_url() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientPhishingRequest::clear_url() { - if (url_ != &::google::protobuf::internal::kEmptyString) { - url_->clear(); - } - clear_has_url(); -} -inline const ::std::string& ClientPhishingRequest::url() const { - return *url_; -} -inline void ClientPhishingRequest::set_url(const ::std::string& value) { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - url_->assign(value); -} -inline void ClientPhishingRequest::set_url(const char* value) { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - url_->assign(value); -} -inline void ClientPhishingRequest::set_url(const char* value, size_t size) { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - url_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientPhishingRequest::mutable_url() { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - return url_; -} -inline ::std::string* ClientPhishingRequest::release_url() { - clear_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = url_; - url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional bytes OBSOLETE_hash_prefix = 10; -inline bool ClientPhishingRequest::has_obsolete_hash_prefix() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void ClientPhishingRequest::set_has_obsolete_hash_prefix() { - _has_bits_[0] |= 0x00000002u; -} -inline void ClientPhishingRequest::clear_has_obsolete_hash_prefix() { - _has_bits_[0] &= ~0x00000002u; -} -inline void ClientPhishingRequest::clear_obsolete_hash_prefix() { - if (obsolete_hash_prefix_ != &::google::protobuf::internal::kEmptyString) { - obsolete_hash_prefix_->clear(); - } - clear_has_obsolete_hash_prefix(); -} -inline const ::std::string& ClientPhishingRequest::obsolete_hash_prefix() const { - return *obsolete_hash_prefix_; -} -inline void ClientPhishingRequest::set_obsolete_hash_prefix(const ::std::string& value) { - set_has_obsolete_hash_prefix(); - if (obsolete_hash_prefix_ == &::google::protobuf::internal::kEmptyString) { - obsolete_hash_prefix_ = new ::std::string; - } - obsolete_hash_prefix_->assign(value); -} -inline void ClientPhishingRequest::set_obsolete_hash_prefix(const char* value) { - set_has_obsolete_hash_prefix(); - if (obsolete_hash_prefix_ == &::google::protobuf::internal::kEmptyString) { - obsolete_hash_prefix_ = new ::std::string; - } - obsolete_hash_prefix_->assign(value); -} -inline void ClientPhishingRequest::set_obsolete_hash_prefix(const void* value, size_t size) { - set_has_obsolete_hash_prefix(); - if (obsolete_hash_prefix_ == &::google::protobuf::internal::kEmptyString) { - obsolete_hash_prefix_ = new ::std::string; - } - obsolete_hash_prefix_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientPhishingRequest::mutable_obsolete_hash_prefix() { - set_has_obsolete_hash_prefix(); - if (obsolete_hash_prefix_ == &::google::protobuf::internal::kEmptyString) { - obsolete_hash_prefix_ = new ::std::string; - } - return obsolete_hash_prefix_; -} -inline ::std::string* ClientPhishingRequest::release_obsolete_hash_prefix() { - clear_has_obsolete_hash_prefix(); - if (obsolete_hash_prefix_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = obsolete_hash_prefix_; - obsolete_hash_prefix_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// required float client_score = 2; -inline bool ClientPhishingRequest::has_client_score() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void ClientPhishingRequest::set_has_client_score() { - _has_bits_[0] |= 0x00000004u; -} -inline void ClientPhishingRequest::clear_has_client_score() { - _has_bits_[0] &= ~0x00000004u; -} -inline void ClientPhishingRequest::clear_client_score() { - client_score_ = 0; - clear_has_client_score(); -} -inline float ClientPhishingRequest::client_score() const { - return client_score_; -} -inline void ClientPhishingRequest::set_client_score(float value) { - set_has_client_score(); - client_score_ = value; -} - -// optional bool is_phishing = 4; -inline bool ClientPhishingRequest::has_is_phishing() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void ClientPhishingRequest::set_has_is_phishing() { - _has_bits_[0] |= 0x00000008u; -} -inline void ClientPhishingRequest::clear_has_is_phishing() { - _has_bits_[0] &= ~0x00000008u; -} -inline void ClientPhishingRequest::clear_is_phishing() { - is_phishing_ = false; - clear_has_is_phishing(); -} -inline bool ClientPhishingRequest::is_phishing() const { - return is_phishing_; -} -inline void ClientPhishingRequest::set_is_phishing(bool value) { - set_has_is_phishing(); - is_phishing_ = value; -} - -// repeated .safe_browsing.ClientPhishingRequest.Feature feature_map = 5; -inline int ClientPhishingRequest::feature_map_size() const { - return feature_map_.size(); -} -inline void ClientPhishingRequest::clear_feature_map() { - feature_map_.Clear(); -} -inline const ::safe_browsing::ClientPhishingRequest_Feature& ClientPhishingRequest::feature_map(int index) const { - return feature_map_.Get(index); -} -inline ::safe_browsing::ClientPhishingRequest_Feature* ClientPhishingRequest::mutable_feature_map(int index) { - return feature_map_.Mutable(index); -} -inline ::safe_browsing::ClientPhishingRequest_Feature* ClientPhishingRequest::add_feature_map() { - return feature_map_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >& -ClientPhishingRequest::feature_map() const { - return feature_map_; -} -inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >* -ClientPhishingRequest::mutable_feature_map() { - return &feature_map_; -} - -// optional int32 model_version = 6; -inline bool ClientPhishingRequest::has_model_version() const { - return (_has_bits_[0] & 0x00000020u) != 0; -} -inline void ClientPhishingRequest::set_has_model_version() { - _has_bits_[0] |= 0x00000020u; -} -inline void ClientPhishingRequest::clear_has_model_version() { - _has_bits_[0] &= ~0x00000020u; -} -inline void ClientPhishingRequest::clear_model_version() { - model_version_ = 0; - clear_has_model_version(); -} -inline ::google::protobuf::int32 ClientPhishingRequest::model_version() const { - return model_version_; -} -inline void ClientPhishingRequest::set_model_version(::google::protobuf::int32 value) { - set_has_model_version(); - model_version_ = value; -} - -// repeated .safe_browsing.ClientPhishingRequest.Feature non_model_feature_map = 8; -inline int ClientPhishingRequest::non_model_feature_map_size() const { - return non_model_feature_map_.size(); -} -inline void ClientPhishingRequest::clear_non_model_feature_map() { - non_model_feature_map_.Clear(); -} -inline const ::safe_browsing::ClientPhishingRequest_Feature& ClientPhishingRequest::non_model_feature_map(int index) const { - return non_model_feature_map_.Get(index); -} -inline ::safe_browsing::ClientPhishingRequest_Feature* ClientPhishingRequest::mutable_non_model_feature_map(int index) { - return non_model_feature_map_.Mutable(index); -} -inline ::safe_browsing::ClientPhishingRequest_Feature* ClientPhishingRequest::add_non_model_feature_map() { - return non_model_feature_map_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >& -ClientPhishingRequest::non_model_feature_map() const { - return non_model_feature_map_; -} -inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientPhishingRequest_Feature >* -ClientPhishingRequest::mutable_non_model_feature_map() { - return &non_model_feature_map_; -} - -// optional string OBSOLETE_referrer_url = 9; -inline bool ClientPhishingRequest::has_obsolete_referrer_url() const { - return (_has_bits_[0] & 0x00000080u) != 0; -} -inline void ClientPhishingRequest::set_has_obsolete_referrer_url() { - _has_bits_[0] |= 0x00000080u; -} -inline void ClientPhishingRequest::clear_has_obsolete_referrer_url() { - _has_bits_[0] &= ~0x00000080u; -} -inline void ClientPhishingRequest::clear_obsolete_referrer_url() { - if (obsolete_referrer_url_ != &::google::protobuf::internal::kEmptyString) { - obsolete_referrer_url_->clear(); - } - clear_has_obsolete_referrer_url(); -} -inline const ::std::string& ClientPhishingRequest::obsolete_referrer_url() const { - return *obsolete_referrer_url_; -} -inline void ClientPhishingRequest::set_obsolete_referrer_url(const ::std::string& value) { - set_has_obsolete_referrer_url(); - if (obsolete_referrer_url_ == &::google::protobuf::internal::kEmptyString) { - obsolete_referrer_url_ = new ::std::string; - } - obsolete_referrer_url_->assign(value); -} -inline void ClientPhishingRequest::set_obsolete_referrer_url(const char* value) { - set_has_obsolete_referrer_url(); - if (obsolete_referrer_url_ == &::google::protobuf::internal::kEmptyString) { - obsolete_referrer_url_ = new ::std::string; - } - obsolete_referrer_url_->assign(value); -} -inline void ClientPhishingRequest::set_obsolete_referrer_url(const char* value, size_t size) { - set_has_obsolete_referrer_url(); - if (obsolete_referrer_url_ == &::google::protobuf::internal::kEmptyString) { - obsolete_referrer_url_ = new ::std::string; - } - obsolete_referrer_url_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientPhishingRequest::mutable_obsolete_referrer_url() { - set_has_obsolete_referrer_url(); - if (obsolete_referrer_url_ == &::google::protobuf::internal::kEmptyString) { - obsolete_referrer_url_ = new ::std::string; - } - return obsolete_referrer_url_; -} -inline ::std::string* ClientPhishingRequest::release_obsolete_referrer_url() { - clear_has_obsolete_referrer_url(); - if (obsolete_referrer_url_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = obsolete_referrer_url_; - obsolete_referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// ------------------------------------------------------------------- - -// ClientPhishingResponse - -// required bool phishy = 1; -inline bool ClientPhishingResponse::has_phishy() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientPhishingResponse::set_has_phishy() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientPhishingResponse::clear_has_phishy() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientPhishingResponse::clear_phishy() { - phishy_ = false; - clear_has_phishy(); -} -inline bool ClientPhishingResponse::phishy() const { - return phishy_; -} -inline void ClientPhishingResponse::set_phishy(bool value) { - set_has_phishy(); - phishy_ = value; -} - -// repeated string OBSOLETE_whitelist_expression = 2; -inline int ClientPhishingResponse::obsolete_whitelist_expression_size() const { - return obsolete_whitelist_expression_.size(); -} -inline void ClientPhishingResponse::clear_obsolete_whitelist_expression() { - obsolete_whitelist_expression_.Clear(); -} -inline const ::std::string& ClientPhishingResponse::obsolete_whitelist_expression(int index) const { - return obsolete_whitelist_expression_.Get(index); -} -inline ::std::string* ClientPhishingResponse::mutable_obsolete_whitelist_expression(int index) { - return obsolete_whitelist_expression_.Mutable(index); -} -inline void ClientPhishingResponse::set_obsolete_whitelist_expression(int index, const ::std::string& value) { - obsolete_whitelist_expression_.Mutable(index)->assign(value); -} -inline void ClientPhishingResponse::set_obsolete_whitelist_expression(int index, const char* value) { - obsolete_whitelist_expression_.Mutable(index)->assign(value); -} -inline void ClientPhishingResponse::set_obsolete_whitelist_expression(int index, const char* value, size_t size) { - obsolete_whitelist_expression_.Mutable(index)->assign( - reinterpret_cast(value), size); -} -inline ::std::string* ClientPhishingResponse::add_obsolete_whitelist_expression() { - return obsolete_whitelist_expression_.Add(); -} -inline void ClientPhishingResponse::add_obsolete_whitelist_expression(const ::std::string& value) { - obsolete_whitelist_expression_.Add()->assign(value); -} -inline void ClientPhishingResponse::add_obsolete_whitelist_expression(const char* value) { - obsolete_whitelist_expression_.Add()->assign(value); -} -inline void ClientPhishingResponse::add_obsolete_whitelist_expression(const char* value, size_t size) { - obsolete_whitelist_expression_.Add()->assign(reinterpret_cast(value), size); -} -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -ClientPhishingResponse::obsolete_whitelist_expression() const { - return obsolete_whitelist_expression_; -} -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -ClientPhishingResponse::mutable_obsolete_whitelist_expression() { - return &obsolete_whitelist_expression_; -} - -// ------------------------------------------------------------------- - -// ClientMalwareRequest_Feature - -// required string name = 1; -inline bool ClientMalwareRequest_Feature::has_name() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientMalwareRequest_Feature::set_has_name() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientMalwareRequest_Feature::clear_has_name() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientMalwareRequest_Feature::clear_name() { - if (name_ != &::google::protobuf::internal::kEmptyString) { - name_->clear(); - } - clear_has_name(); -} -inline const ::std::string& ClientMalwareRequest_Feature::name() const { - return *name_; -} -inline void ClientMalwareRequest_Feature::set_name(const ::std::string& value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void ClientMalwareRequest_Feature::set_name(const char* value) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(value); -} -inline void ClientMalwareRequest_Feature::set_name(const char* value, size_t size) { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - name_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientMalwareRequest_Feature::mutable_name() { - set_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - name_ = new ::std::string; - } - return name_; -} -inline ::std::string* ClientMalwareRequest_Feature::release_name() { - clear_has_name(); - if (name_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = name_; - name_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// required double value = 2; -inline bool ClientMalwareRequest_Feature::has_value() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void ClientMalwareRequest_Feature::set_has_value() { - _has_bits_[0] |= 0x00000002u; -} -inline void ClientMalwareRequest_Feature::clear_has_value() { - _has_bits_[0] &= ~0x00000002u; -} -inline void ClientMalwareRequest_Feature::clear_value() { - value_ = 0; - clear_has_value(); -} -inline double ClientMalwareRequest_Feature::value() const { - return value_; -} -inline void ClientMalwareRequest_Feature::set_value(double value) { - set_has_value(); - value_ = value; -} - -// repeated string metainfo = 3; -inline int ClientMalwareRequest_Feature::metainfo_size() const { - return metainfo_.size(); -} -inline void ClientMalwareRequest_Feature::clear_metainfo() { - metainfo_.Clear(); -} -inline const ::std::string& ClientMalwareRequest_Feature::metainfo(int index) const { - return metainfo_.Get(index); -} -inline ::std::string* ClientMalwareRequest_Feature::mutable_metainfo(int index) { - return metainfo_.Mutable(index); -} -inline void ClientMalwareRequest_Feature::set_metainfo(int index, const ::std::string& value) { - metainfo_.Mutable(index)->assign(value); -} -inline void ClientMalwareRequest_Feature::set_metainfo(int index, const char* value) { - metainfo_.Mutable(index)->assign(value); -} -inline void ClientMalwareRequest_Feature::set_metainfo(int index, const char* value, size_t size) { - metainfo_.Mutable(index)->assign( - reinterpret_cast(value), size); -} -inline ::std::string* ClientMalwareRequest_Feature::add_metainfo() { - return metainfo_.Add(); -} -inline void ClientMalwareRequest_Feature::add_metainfo(const ::std::string& value) { - metainfo_.Add()->assign(value); -} -inline void ClientMalwareRequest_Feature::add_metainfo(const char* value) { - metainfo_.Add()->assign(value); -} -inline void ClientMalwareRequest_Feature::add_metainfo(const char* value, size_t size) { - metainfo_.Add()->assign(reinterpret_cast(value), size); -} -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -ClientMalwareRequest_Feature::metainfo() const { - return metainfo_; -} -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -ClientMalwareRequest_Feature::mutable_metainfo() { - return &metainfo_; -} - -// ------------------------------------------------------------------- - -// ClientMalwareRequest - -// required string url = 1; -inline bool ClientMalwareRequest::has_url() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientMalwareRequest::set_has_url() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientMalwareRequest::clear_has_url() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientMalwareRequest::clear_url() { - if (url_ != &::google::protobuf::internal::kEmptyString) { - url_->clear(); - } - clear_has_url(); -} -inline const ::std::string& ClientMalwareRequest::url() const { - return *url_; -} -inline void ClientMalwareRequest::set_url(const ::std::string& value) { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - url_->assign(value); -} -inline void ClientMalwareRequest::set_url(const char* value) { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - url_->assign(value); -} -inline void ClientMalwareRequest::set_url(const char* value, size_t size) { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - url_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientMalwareRequest::mutable_url() { - set_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - url_ = new ::std::string; - } - return url_; -} -inline ::std::string* ClientMalwareRequest::release_url() { - clear_has_url(); - if (url_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = url_; - url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// repeated .safe_browsing.ClientMalwareRequest.Feature feature_map = 2; -inline int ClientMalwareRequest::feature_map_size() const { - return feature_map_.size(); -} -inline void ClientMalwareRequest::clear_feature_map() { - feature_map_.Clear(); -} -inline const ::safe_browsing::ClientMalwareRequest_Feature& ClientMalwareRequest::feature_map(int index) const { - return feature_map_.Get(index); -} -inline ::safe_browsing::ClientMalwareRequest_Feature* ClientMalwareRequest::mutable_feature_map(int index) { - return feature_map_.Mutable(index); -} -inline ::safe_browsing::ClientMalwareRequest_Feature* ClientMalwareRequest::add_feature_map() { - return feature_map_.Add(); -} -inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientMalwareRequest_Feature >& -ClientMalwareRequest::feature_map() const { - return feature_map_; -} -inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientMalwareRequest_Feature >* -ClientMalwareRequest::mutable_feature_map() { - return &feature_map_; -} - -// optional string referrer_url = 4; -inline bool ClientMalwareRequest::has_referrer_url() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void ClientMalwareRequest::set_has_referrer_url() { - _has_bits_[0] |= 0x00000004u; -} -inline void ClientMalwareRequest::clear_has_referrer_url() { - _has_bits_[0] &= ~0x00000004u; -} -inline void ClientMalwareRequest::clear_referrer_url() { - if (referrer_url_ != &::google::protobuf::internal::kEmptyString) { - referrer_url_->clear(); - } - clear_has_referrer_url(); -} -inline const ::std::string& ClientMalwareRequest::referrer_url() const { - return *referrer_url_; -} -inline void ClientMalwareRequest::set_referrer_url(const ::std::string& value) { - set_has_referrer_url(); - if (referrer_url_ == &::google::protobuf::internal::kEmptyString) { - referrer_url_ = new ::std::string; - } - referrer_url_->assign(value); -} -inline void ClientMalwareRequest::set_referrer_url(const char* value) { - set_has_referrer_url(); - if (referrer_url_ == &::google::protobuf::internal::kEmptyString) { - referrer_url_ = new ::std::string; - } - referrer_url_->assign(value); -} -inline void ClientMalwareRequest::set_referrer_url(const char* value, size_t size) { - set_has_referrer_url(); - if (referrer_url_ == &::google::protobuf::internal::kEmptyString) { - referrer_url_ = new ::std::string; - } - referrer_url_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientMalwareRequest::mutable_referrer_url() { - set_has_referrer_url(); - if (referrer_url_ == &::google::protobuf::internal::kEmptyString) { - referrer_url_ = new ::std::string; - } - return referrer_url_; -} -inline ::std::string* ClientMalwareRequest::release_referrer_url() { - clear_has_referrer_url(); - if (referrer_url_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = referrer_url_; - referrer_url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// ------------------------------------------------------------------- - -// ClientMalwareResponse - -// required bool blacklist = 1; -inline bool ClientMalwareResponse::has_blacklist() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientMalwareResponse::set_has_blacklist() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientMalwareResponse::clear_has_blacklist() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientMalwareResponse::clear_blacklist() { - blacklist_ = false; - clear_has_blacklist(); -} -inline bool ClientMalwareResponse::blacklist() const { - return blacklist_; -} -inline void ClientMalwareResponse::set_blacklist(bool value) { - set_has_blacklist(); - blacklist_ = value; -} - -// optional string bad_ip = 2; -inline bool ClientMalwareResponse::has_bad_ip() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void ClientMalwareResponse::set_has_bad_ip() { - _has_bits_[0] |= 0x00000002u; -} -inline void ClientMalwareResponse::clear_has_bad_ip() { - _has_bits_[0] &= ~0x00000002u; -} -inline void ClientMalwareResponse::clear_bad_ip() { - if (bad_ip_ != &::google::protobuf::internal::kEmptyString) { - bad_ip_->clear(); - } - clear_has_bad_ip(); -} -inline const ::std::string& ClientMalwareResponse::bad_ip() const { - return *bad_ip_; -} -inline void ClientMalwareResponse::set_bad_ip(const ::std::string& value) { - set_has_bad_ip(); - if (bad_ip_ == &::google::protobuf::internal::kEmptyString) { - bad_ip_ = new ::std::string; - } - bad_ip_->assign(value); -} -inline void ClientMalwareResponse::set_bad_ip(const char* value) { - set_has_bad_ip(); - if (bad_ip_ == &::google::protobuf::internal::kEmptyString) { - bad_ip_ = new ::std::string; - } - bad_ip_->assign(value); -} -inline void ClientMalwareResponse::set_bad_ip(const char* value, size_t size) { - set_has_bad_ip(); - if (bad_ip_ == &::google::protobuf::internal::kEmptyString) { - bad_ip_ = new ::std::string; - } - bad_ip_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientMalwareResponse::mutable_bad_ip() { - set_has_bad_ip(); - if (bad_ip_ == &::google::protobuf::internal::kEmptyString) { - bad_ip_ = new ::std::string; - } - return bad_ip_; -} -inline ::std::string* ClientMalwareResponse::release_bad_ip() { - clear_has_bad_ip(); - if (bad_ip_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = bad_ip_; - bad_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// ------------------------------------------------------------------- - // ClientDownloadRequest_Digests // optional bytes sha256 = 1; @@ -3188,6 +1775,522 @@ inline void ClientDownloadRequest_SignatureInfo::set_trusted(bool value) { // ------------------------------------------------------------------- +// ClientDownloadRequest_PEImageHeaders_DebugData + +// optional bytes directory_entry = 1; +inline bool ClientDownloadRequest_PEImageHeaders_DebugData::has_directory_entry() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_has_directory_entry() { + _has_bits_[0] |= 0x00000001u; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::clear_has_directory_entry() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::clear_directory_entry() { + if (directory_entry_ != &::google::protobuf::internal::kEmptyString) { + directory_entry_->clear(); + } + clear_has_directory_entry(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders_DebugData::directory_entry() const { + return *directory_entry_; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_directory_entry(const ::std::string& value) { + set_has_directory_entry(); + if (directory_entry_ == &::google::protobuf::internal::kEmptyString) { + directory_entry_ = new ::std::string; + } + directory_entry_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_directory_entry(const char* value) { + set_has_directory_entry(); + if (directory_entry_ == &::google::protobuf::internal::kEmptyString) { + directory_entry_ = new ::std::string; + } + directory_entry_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_directory_entry(const void* value, size_t size) { + set_has_directory_entry(); + if (directory_entry_ == &::google::protobuf::internal::kEmptyString) { + directory_entry_ = new ::std::string; + } + directory_entry_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders_DebugData::mutable_directory_entry() { + set_has_directory_entry(); + if (directory_entry_ == &::google::protobuf::internal::kEmptyString) { + directory_entry_ = new ::std::string; + } + return directory_entry_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders_DebugData::release_directory_entry() { + clear_has_directory_entry(); + if (directory_entry_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = directory_entry_; + directory_entry_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional bytes raw_data = 2; +inline bool ClientDownloadRequest_PEImageHeaders_DebugData::has_raw_data() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_has_raw_data() { + _has_bits_[0] |= 0x00000002u; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::clear_has_raw_data() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::clear_raw_data() { + if (raw_data_ != &::google::protobuf::internal::kEmptyString) { + raw_data_->clear(); + } + clear_has_raw_data(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders_DebugData::raw_data() const { + return *raw_data_; +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_raw_data(const ::std::string& value) { + set_has_raw_data(); + if (raw_data_ == &::google::protobuf::internal::kEmptyString) { + raw_data_ = new ::std::string; + } + raw_data_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_raw_data(const char* value) { + set_has_raw_data(); + if (raw_data_ == &::google::protobuf::internal::kEmptyString) { + raw_data_ = new ::std::string; + } + raw_data_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders_DebugData::set_raw_data(const void* value, size_t size) { + set_has_raw_data(); + if (raw_data_ == &::google::protobuf::internal::kEmptyString) { + raw_data_ = new ::std::string; + } + raw_data_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders_DebugData::mutable_raw_data() { + set_has_raw_data(); + if (raw_data_ == &::google::protobuf::internal::kEmptyString) { + raw_data_ = new ::std::string; + } + return raw_data_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders_DebugData::release_raw_data() { + clear_has_raw_data(); + if (raw_data_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = raw_data_; + raw_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// ------------------------------------------------------------------- + +// ClientDownloadRequest_PEImageHeaders + +// optional bytes dos_header = 1; +inline bool ClientDownloadRequest_PEImageHeaders::has_dos_header() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders::set_has_dos_header() { + _has_bits_[0] |= 0x00000001u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_has_dos_header() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_dos_header() { + if (dos_header_ != &::google::protobuf::internal::kEmptyString) { + dos_header_->clear(); + } + clear_has_dos_header(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders::dos_header() const { + return *dos_header_; +} +inline void ClientDownloadRequest_PEImageHeaders::set_dos_header(const ::std::string& value) { + set_has_dos_header(); + if (dos_header_ == &::google::protobuf::internal::kEmptyString) { + dos_header_ = new ::std::string; + } + dos_header_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_dos_header(const char* value) { + set_has_dos_header(); + if (dos_header_ == &::google::protobuf::internal::kEmptyString) { + dos_header_ = new ::std::string; + } + dos_header_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_dos_header(const void* value, size_t size) { + set_has_dos_header(); + if (dos_header_ == &::google::protobuf::internal::kEmptyString) { + dos_header_ = new ::std::string; + } + dos_header_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::mutable_dos_header() { + set_has_dos_header(); + if (dos_header_ == &::google::protobuf::internal::kEmptyString) { + dos_header_ = new ::std::string; + } + return dos_header_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::release_dos_header() { + clear_has_dos_header(); + if (dos_header_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = dos_header_; + dos_header_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional bytes file_header = 2; +inline bool ClientDownloadRequest_PEImageHeaders::has_file_header() const { + return (_has_bits_[0] & 0x00000002u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders::set_has_file_header() { + _has_bits_[0] |= 0x00000002u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_has_file_header() { + _has_bits_[0] &= ~0x00000002u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_file_header() { + if (file_header_ != &::google::protobuf::internal::kEmptyString) { + file_header_->clear(); + } + clear_has_file_header(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders::file_header() const { + return *file_header_; +} +inline void ClientDownloadRequest_PEImageHeaders::set_file_header(const ::std::string& value) { + set_has_file_header(); + if (file_header_ == &::google::protobuf::internal::kEmptyString) { + file_header_ = new ::std::string; + } + file_header_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_file_header(const char* value) { + set_has_file_header(); + if (file_header_ == &::google::protobuf::internal::kEmptyString) { + file_header_ = new ::std::string; + } + file_header_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_file_header(const void* value, size_t size) { + set_has_file_header(); + if (file_header_ == &::google::protobuf::internal::kEmptyString) { + file_header_ = new ::std::string; + } + file_header_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::mutable_file_header() { + set_has_file_header(); + if (file_header_ == &::google::protobuf::internal::kEmptyString) { + file_header_ = new ::std::string; + } + return file_header_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::release_file_header() { + clear_has_file_header(); + if (file_header_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = file_header_; + file_header_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional bytes optional_headers32 = 3; +inline bool ClientDownloadRequest_PEImageHeaders::has_optional_headers32() const { + return (_has_bits_[0] & 0x00000004u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders::set_has_optional_headers32() { + _has_bits_[0] |= 0x00000004u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_has_optional_headers32() { + _has_bits_[0] &= ~0x00000004u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_optional_headers32() { + if (optional_headers32_ != &::google::protobuf::internal::kEmptyString) { + optional_headers32_->clear(); + } + clear_has_optional_headers32(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders::optional_headers32() const { + return *optional_headers32_; +} +inline void ClientDownloadRequest_PEImageHeaders::set_optional_headers32(const ::std::string& value) { + set_has_optional_headers32(); + if (optional_headers32_ == &::google::protobuf::internal::kEmptyString) { + optional_headers32_ = new ::std::string; + } + optional_headers32_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_optional_headers32(const char* value) { + set_has_optional_headers32(); + if (optional_headers32_ == &::google::protobuf::internal::kEmptyString) { + optional_headers32_ = new ::std::string; + } + optional_headers32_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_optional_headers32(const void* value, size_t size) { + set_has_optional_headers32(); + if (optional_headers32_ == &::google::protobuf::internal::kEmptyString) { + optional_headers32_ = new ::std::string; + } + optional_headers32_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::mutable_optional_headers32() { + set_has_optional_headers32(); + if (optional_headers32_ == &::google::protobuf::internal::kEmptyString) { + optional_headers32_ = new ::std::string; + } + return optional_headers32_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::release_optional_headers32() { + clear_has_optional_headers32(); + if (optional_headers32_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = optional_headers32_; + optional_headers32_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// optional bytes optional_headers64 = 4; +inline bool ClientDownloadRequest_PEImageHeaders::has_optional_headers64() const { + return (_has_bits_[0] & 0x00000008u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders::set_has_optional_headers64() { + _has_bits_[0] |= 0x00000008u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_has_optional_headers64() { + _has_bits_[0] &= ~0x00000008u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_optional_headers64() { + if (optional_headers64_ != &::google::protobuf::internal::kEmptyString) { + optional_headers64_->clear(); + } + clear_has_optional_headers64(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders::optional_headers64() const { + return *optional_headers64_; +} +inline void ClientDownloadRequest_PEImageHeaders::set_optional_headers64(const ::std::string& value) { + set_has_optional_headers64(); + if (optional_headers64_ == &::google::protobuf::internal::kEmptyString) { + optional_headers64_ = new ::std::string; + } + optional_headers64_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_optional_headers64(const char* value) { + set_has_optional_headers64(); + if (optional_headers64_ == &::google::protobuf::internal::kEmptyString) { + optional_headers64_ = new ::std::string; + } + optional_headers64_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_optional_headers64(const void* value, size_t size) { + set_has_optional_headers64(); + if (optional_headers64_ == &::google::protobuf::internal::kEmptyString) { + optional_headers64_ = new ::std::string; + } + optional_headers64_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::mutable_optional_headers64() { + set_has_optional_headers64(); + if (optional_headers64_ == &::google::protobuf::internal::kEmptyString) { + optional_headers64_ = new ::std::string; + } + return optional_headers64_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::release_optional_headers64() { + clear_has_optional_headers64(); + if (optional_headers64_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = optional_headers64_; + optional_headers64_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// repeated bytes section_header = 5; +inline int ClientDownloadRequest_PEImageHeaders::section_header_size() const { + return section_header_.size(); +} +inline void ClientDownloadRequest_PEImageHeaders::clear_section_header() { + section_header_.Clear(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders::section_header(int index) const { + return section_header_.Get(index); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::mutable_section_header(int index) { + return section_header_.Mutable(index); +} +inline void ClientDownloadRequest_PEImageHeaders::set_section_header(int index, const ::std::string& value) { + section_header_.Mutable(index)->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_section_header(int index, const char* value) { + section_header_.Mutable(index)->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_section_header(int index, const void* value, size_t size) { + section_header_.Mutable(index)->assign( + reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::add_section_header() { + return section_header_.Add(); +} +inline void ClientDownloadRequest_PEImageHeaders::add_section_header(const ::std::string& value) { + section_header_.Add()->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::add_section_header(const char* value) { + section_header_.Add()->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::add_section_header(const void* value, size_t size) { + section_header_.Add()->assign(reinterpret_cast(value), size); +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +ClientDownloadRequest_PEImageHeaders::section_header() const { + return section_header_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +ClientDownloadRequest_PEImageHeaders::mutable_section_header() { + return §ion_header_; +} + +// optional bytes export_section_data = 6; +inline bool ClientDownloadRequest_PEImageHeaders::has_export_section_data() const { + return (_has_bits_[0] & 0x00000020u) != 0; +} +inline void ClientDownloadRequest_PEImageHeaders::set_has_export_section_data() { + _has_bits_[0] |= 0x00000020u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_has_export_section_data() { + _has_bits_[0] &= ~0x00000020u; +} +inline void ClientDownloadRequest_PEImageHeaders::clear_export_section_data() { + if (export_section_data_ != &::google::protobuf::internal::kEmptyString) { + export_section_data_->clear(); + } + clear_has_export_section_data(); +} +inline const ::std::string& ClientDownloadRequest_PEImageHeaders::export_section_data() const { + return *export_section_data_; +} +inline void ClientDownloadRequest_PEImageHeaders::set_export_section_data(const ::std::string& value) { + set_has_export_section_data(); + if (export_section_data_ == &::google::protobuf::internal::kEmptyString) { + export_section_data_ = new ::std::string; + } + export_section_data_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_export_section_data(const char* value) { + set_has_export_section_data(); + if (export_section_data_ == &::google::protobuf::internal::kEmptyString) { + export_section_data_ = new ::std::string; + } + export_section_data_->assign(value); +} +inline void ClientDownloadRequest_PEImageHeaders::set_export_section_data(const void* value, size_t size) { + set_has_export_section_data(); + if (export_section_data_ == &::google::protobuf::internal::kEmptyString) { + export_section_data_ = new ::std::string; + } + export_section_data_->assign(reinterpret_cast(value), size); +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::mutable_export_section_data() { + set_has_export_section_data(); + if (export_section_data_ == &::google::protobuf::internal::kEmptyString) { + export_section_data_ = new ::std::string; + } + return export_section_data_; +} +inline ::std::string* ClientDownloadRequest_PEImageHeaders::release_export_section_data() { + clear_has_export_section_data(); + if (export_section_data_ == &::google::protobuf::internal::kEmptyString) { + return NULL; + } else { + ::std::string* temp = export_section_data_; + export_section_data_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); + return temp; + } +} + +// repeated .safe_browsing.ClientDownloadRequest.PEImageHeaders.DebugData debug_data = 7; +inline int ClientDownloadRequest_PEImageHeaders::debug_data_size() const { + return debug_data_.size(); +} +inline void ClientDownloadRequest_PEImageHeaders::clear_debug_data() { + debug_data_.Clear(); +} +inline const ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData& ClientDownloadRequest_PEImageHeaders::debug_data(int index) const { + return debug_data_.Get(index); +} +inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData* ClientDownloadRequest_PEImageHeaders::mutable_debug_data(int index) { + return debug_data_.Mutable(index); +} +inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData* ClientDownloadRequest_PEImageHeaders::add_debug_data() { + return debug_data_.Add(); +} +inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData >& +ClientDownloadRequest_PEImageHeaders::debug_data() const { + return debug_data_; +} +inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_PEImageHeaders_DebugData >* +ClientDownloadRequest_PEImageHeaders::mutable_debug_data() { + return &debug_data_; +} + +// ------------------------------------------------------------------- + +// ClientDownloadRequest_ImageHeaders + +// optional .safe_browsing.ClientDownloadRequest.PEImageHeaders pe_headers = 1; +inline bool ClientDownloadRequest_ImageHeaders::has_pe_headers() const { + return (_has_bits_[0] & 0x00000001u) != 0; +} +inline void ClientDownloadRequest_ImageHeaders::set_has_pe_headers() { + _has_bits_[0] |= 0x00000001u; +} +inline void ClientDownloadRequest_ImageHeaders::clear_has_pe_headers() { + _has_bits_[0] &= ~0x00000001u; +} +inline void ClientDownloadRequest_ImageHeaders::clear_pe_headers() { + if (pe_headers_ != NULL) pe_headers_->::safe_browsing::ClientDownloadRequest_PEImageHeaders::Clear(); + clear_has_pe_headers(); +} +inline const ::safe_browsing::ClientDownloadRequest_PEImageHeaders& ClientDownloadRequest_ImageHeaders::pe_headers() const { + return pe_headers_ != NULL ? *pe_headers_ : *default_instance_->pe_headers_; +} +inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders* ClientDownloadRequest_ImageHeaders::mutable_pe_headers() { + set_has_pe_headers(); + if (pe_headers_ == NULL) pe_headers_ = new ::safe_browsing::ClientDownloadRequest_PEImageHeaders; + return pe_headers_; +} +inline ::safe_browsing::ClientDownloadRequest_PEImageHeaders* ClientDownloadRequest_ImageHeaders::release_pe_headers() { + clear_has_pe_headers(); + ::safe_browsing::ClientDownloadRequest_PEImageHeaders* temp = pe_headers_; + pe_headers_ = NULL; + return temp; +} + +// ------------------------------------------------------------------- + // ClientDownloadRequest // required string url = 1; @@ -3514,6 +2617,35 @@ inline ::std::string* ClientDownloadRequest::release_locale() { } } +// optional .safe_browsing.ClientDownloadRequest.ImageHeaders image_headers = 18; +inline bool ClientDownloadRequest::has_image_headers() const { + return (_has_bits_[0] & 0x00000200u) != 0; +} +inline void ClientDownloadRequest::set_has_image_headers() { + _has_bits_[0] |= 0x00000200u; +} +inline void ClientDownloadRequest::clear_has_image_headers() { + _has_bits_[0] &= ~0x00000200u; +} +inline void ClientDownloadRequest::clear_image_headers() { + if (image_headers_ != NULL) image_headers_->::safe_browsing::ClientDownloadRequest_ImageHeaders::Clear(); + clear_has_image_headers(); +} +inline const ::safe_browsing::ClientDownloadRequest_ImageHeaders& ClientDownloadRequest::image_headers() const { + return image_headers_ != NULL ? *image_headers_ : *default_instance_->image_headers_; +} +inline ::safe_browsing::ClientDownloadRequest_ImageHeaders* ClientDownloadRequest::mutable_image_headers() { + set_has_image_headers(); + if (image_headers_ == NULL) image_headers_ = new ::safe_browsing::ClientDownloadRequest_ImageHeaders; + return image_headers_; +} +inline ::safe_browsing::ClientDownloadRequest_ImageHeaders* ClientDownloadRequest::release_image_headers() { + clear_has_image_headers(); + ::safe_browsing::ClientDownloadRequest_ImageHeaders* temp = image_headers_; + image_headers_ = NULL; + return temp; +} + // ------------------------------------------------------------------- // ClientDownloadResponse_MoreInfo @@ -3748,325 +2880,6 @@ inline ::std::string* ClientDownloadResponse::release_token() { } } -// ------------------------------------------------------------------- - -// ClientDownloadReport_UserInformation - -// optional string email = 1; -inline bool ClientDownloadReport_UserInformation::has_email() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientDownloadReport_UserInformation::set_has_email() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientDownloadReport_UserInformation::clear_has_email() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientDownloadReport_UserInformation::clear_email() { - if (email_ != &::google::protobuf::internal::kEmptyString) { - email_->clear(); - } - clear_has_email(); -} -inline const ::std::string& ClientDownloadReport_UserInformation::email() const { - return *email_; -} -inline void ClientDownloadReport_UserInformation::set_email(const ::std::string& value) { - set_has_email(); - if (email_ == &::google::protobuf::internal::kEmptyString) { - email_ = new ::std::string; - } - email_->assign(value); -} -inline void ClientDownloadReport_UserInformation::set_email(const char* value) { - set_has_email(); - if (email_ == &::google::protobuf::internal::kEmptyString) { - email_ = new ::std::string; - } - email_->assign(value); -} -inline void ClientDownloadReport_UserInformation::set_email(const char* value, size_t size) { - set_has_email(); - if (email_ == &::google::protobuf::internal::kEmptyString) { - email_ = new ::std::string; - } - email_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientDownloadReport_UserInformation::mutable_email() { - set_has_email(); - if (email_ == &::google::protobuf::internal::kEmptyString) { - email_ = new ::std::string; - } - return email_; -} -inline ::std::string* ClientDownloadReport_UserInformation::release_email() { - clear_has_email(); - if (email_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = email_; - email_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// ------------------------------------------------------------------- - -// ClientDownloadReport - -// optional .safe_browsing.ClientDownloadReport.Reason reason = 1; -inline bool ClientDownloadReport::has_reason() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientDownloadReport::set_has_reason() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientDownloadReport::clear_has_reason() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientDownloadReport::clear_reason() { - reason_ = 0; - clear_has_reason(); -} -inline ::safe_browsing::ClientDownloadReport_Reason ClientDownloadReport::reason() const { - return static_cast< ::safe_browsing::ClientDownloadReport_Reason >(reason_); -} -inline void ClientDownloadReport::set_reason(::safe_browsing::ClientDownloadReport_Reason value) { - GOOGLE_DCHECK(::safe_browsing::ClientDownloadReport_Reason_IsValid(value)); - set_has_reason(); - reason_ = value; -} - -// optional .safe_browsing.ClientDownloadRequest download_request = 2; -inline bool ClientDownloadReport::has_download_request() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void ClientDownloadReport::set_has_download_request() { - _has_bits_[0] |= 0x00000002u; -} -inline void ClientDownloadReport::clear_has_download_request() { - _has_bits_[0] &= ~0x00000002u; -} -inline void ClientDownloadReport::clear_download_request() { - if (download_request_ != NULL) download_request_->::safe_browsing::ClientDownloadRequest::Clear(); - clear_has_download_request(); -} -inline const ::safe_browsing::ClientDownloadRequest& ClientDownloadReport::download_request() const { - return download_request_ != NULL ? *download_request_ : *default_instance_->download_request_; -} -inline ::safe_browsing::ClientDownloadRequest* ClientDownloadReport::mutable_download_request() { - set_has_download_request(); - if (download_request_ == NULL) download_request_ = new ::safe_browsing::ClientDownloadRequest; - return download_request_; -} -inline ::safe_browsing::ClientDownloadRequest* ClientDownloadReport::release_download_request() { - clear_has_download_request(); - ::safe_browsing::ClientDownloadRequest* temp = download_request_; - download_request_ = NULL; - return temp; -} - -// optional .safe_browsing.ClientDownloadReport.UserInformation user_information = 3; -inline bool ClientDownloadReport::has_user_information() const { - return (_has_bits_[0] & 0x00000004u) != 0; -} -inline void ClientDownloadReport::set_has_user_information() { - _has_bits_[0] |= 0x00000004u; -} -inline void ClientDownloadReport::clear_has_user_information() { - _has_bits_[0] &= ~0x00000004u; -} -inline void ClientDownloadReport::clear_user_information() { - if (user_information_ != NULL) user_information_->::safe_browsing::ClientDownloadReport_UserInformation::Clear(); - clear_has_user_information(); -} -inline const ::safe_browsing::ClientDownloadReport_UserInformation& ClientDownloadReport::user_information() const { - return user_information_ != NULL ? *user_information_ : *default_instance_->user_information_; -} -inline ::safe_browsing::ClientDownloadReport_UserInformation* ClientDownloadReport::mutable_user_information() { - set_has_user_information(); - if (user_information_ == NULL) user_information_ = new ::safe_browsing::ClientDownloadReport_UserInformation; - return user_information_; -} -inline ::safe_browsing::ClientDownloadReport_UserInformation* ClientDownloadReport::release_user_information() { - clear_has_user_information(); - ::safe_browsing::ClientDownloadReport_UserInformation* temp = user_information_; - user_information_ = NULL; - return temp; -} - -// optional bytes comment = 4; -inline bool ClientDownloadReport::has_comment() const { - return (_has_bits_[0] & 0x00000008u) != 0; -} -inline void ClientDownloadReport::set_has_comment() { - _has_bits_[0] |= 0x00000008u; -} -inline void ClientDownloadReport::clear_has_comment() { - _has_bits_[0] &= ~0x00000008u; -} -inline void ClientDownloadReport::clear_comment() { - if (comment_ != &::google::protobuf::internal::kEmptyString) { - comment_->clear(); - } - clear_has_comment(); -} -inline const ::std::string& ClientDownloadReport::comment() const { - return *comment_; -} -inline void ClientDownloadReport::set_comment(const ::std::string& value) { - set_has_comment(); - if (comment_ == &::google::protobuf::internal::kEmptyString) { - comment_ = new ::std::string; - } - comment_->assign(value); -} -inline void ClientDownloadReport::set_comment(const char* value) { - set_has_comment(); - if (comment_ == &::google::protobuf::internal::kEmptyString) { - comment_ = new ::std::string; - } - comment_->assign(value); -} -inline void ClientDownloadReport::set_comment(const void* value, size_t size) { - set_has_comment(); - if (comment_ == &::google::protobuf::internal::kEmptyString) { - comment_ = new ::std::string; - } - comment_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientDownloadReport::mutable_comment() { - set_has_comment(); - if (comment_ == &::google::protobuf::internal::kEmptyString) { - comment_ = new ::std::string; - } - return comment_; -} -inline ::std::string* ClientDownloadReport::release_comment() { - clear_has_comment(); - if (comment_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = comment_; - comment_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - -// optional .safe_browsing.ClientDownloadResponse download_response = 5; -inline bool ClientDownloadReport::has_download_response() const { - return (_has_bits_[0] & 0x00000010u) != 0; -} -inline void ClientDownloadReport::set_has_download_response() { - _has_bits_[0] |= 0x00000010u; -} -inline void ClientDownloadReport::clear_has_download_response() { - _has_bits_[0] &= ~0x00000010u; -} -inline void ClientDownloadReport::clear_download_response() { - if (download_response_ != NULL) download_response_->::safe_browsing::ClientDownloadResponse::Clear(); - clear_has_download_response(); -} -inline const ::safe_browsing::ClientDownloadResponse& ClientDownloadReport::download_response() const { - return download_response_ != NULL ? *download_response_ : *default_instance_->download_response_; -} -inline ::safe_browsing::ClientDownloadResponse* ClientDownloadReport::mutable_download_response() { - set_has_download_response(); - if (download_response_ == NULL) download_response_ = new ::safe_browsing::ClientDownloadResponse; - return download_response_; -} -inline ::safe_browsing::ClientDownloadResponse* ClientDownloadReport::release_download_response() { - clear_has_download_response(); - ::safe_browsing::ClientDownloadResponse* temp = download_response_; - download_response_ = NULL; - return temp; -} - -// ------------------------------------------------------------------- - -// ClientUploadResponse - -// optional .safe_browsing.ClientUploadResponse.UploadStatus status = 1; -inline bool ClientUploadResponse::has_status() const { - return (_has_bits_[0] & 0x00000001u) != 0; -} -inline void ClientUploadResponse::set_has_status() { - _has_bits_[0] |= 0x00000001u; -} -inline void ClientUploadResponse::clear_has_status() { - _has_bits_[0] &= ~0x00000001u; -} -inline void ClientUploadResponse::clear_status() { - status_ = 0; - clear_has_status(); -} -inline ::safe_browsing::ClientUploadResponse_UploadStatus ClientUploadResponse::status() const { - return static_cast< ::safe_browsing::ClientUploadResponse_UploadStatus >(status_); -} -inline void ClientUploadResponse::set_status(::safe_browsing::ClientUploadResponse_UploadStatus value) { - GOOGLE_DCHECK(::safe_browsing::ClientUploadResponse_UploadStatus_IsValid(value)); - set_has_status(); - status_ = value; -} - -// optional string permalink = 2; -inline bool ClientUploadResponse::has_permalink() const { - return (_has_bits_[0] & 0x00000002u) != 0; -} -inline void ClientUploadResponse::set_has_permalink() { - _has_bits_[0] |= 0x00000002u; -} -inline void ClientUploadResponse::clear_has_permalink() { - _has_bits_[0] &= ~0x00000002u; -} -inline void ClientUploadResponse::clear_permalink() { - if (permalink_ != &::google::protobuf::internal::kEmptyString) { - permalink_->clear(); - } - clear_has_permalink(); -} -inline const ::std::string& ClientUploadResponse::permalink() const { - return *permalink_; -} -inline void ClientUploadResponse::set_permalink(const ::std::string& value) { - set_has_permalink(); - if (permalink_ == &::google::protobuf::internal::kEmptyString) { - permalink_ = new ::std::string; - } - permalink_->assign(value); -} -inline void ClientUploadResponse::set_permalink(const char* value) { - set_has_permalink(); - if (permalink_ == &::google::protobuf::internal::kEmptyString) { - permalink_ = new ::std::string; - } - permalink_->assign(value); -} -inline void ClientUploadResponse::set_permalink(const char* value, size_t size) { - set_has_permalink(); - if (permalink_ == &::google::protobuf::internal::kEmptyString) { - permalink_ = new ::std::string; - } - permalink_->assign(reinterpret_cast(value), size); -} -inline ::std::string* ClientUploadResponse::mutable_permalink() { - set_has_permalink(); - if (permalink_ == &::google::protobuf::internal::kEmptyString) { - permalink_ = new ::std::string; - } - return permalink_; -} -inline ::std::string* ClientUploadResponse::release_permalink() { - clear_has_permalink(); - if (permalink_ == &::google::protobuf::internal::kEmptyString) { - return NULL; - } else { - ::std::string* temp = permalink_; - permalink_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString); - return temp; - } -} - // @@protoc_insertion_point(namespace_scope) diff --git a/toolkit/components/downloads/generate_csd.sh b/toolkit/components/downloads/generate_csd.sh index ff2b1c18a67..a0eba711ae7 100755 --- a/toolkit/components/downloads/generate_csd.sh +++ b/toolkit/components/downloads/generate_csd.sh @@ -2,7 +2,9 @@ # A script to generate toolkit/components/downloads/csd.pb.{cc,h} for use in # nsIApplicationReputationQuery. This script assumes you have downloaded and # installed the protocol buffer compiler. - +# As of June 26 2014, csd.proto contains many protobufs that are currently +# unused by ApplicationReputation. You may want to strip csd.proto of these +# before running the protocol compiler on it. if [ -n $PROTOC_PATH ]; then PROTOC_PATH=/usr/local/bin/protoc fi