mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
708ddc7be7
Backed out changeset 53058615e7a3 (bug 1024774) Backed out changeset 68fe0894bb09 (bug 1065657) Backed out changeset 1b9620d674df (bug 1024774) Backed out changeset a31c514b59da (bug 1024774) Backed out changeset 0fcf8757f6c2 (bug 1024774) Backed out changeset 9a3c71b925d4 (bug 1024774) Backed out changeset 783acc92af04 (bug 1024774) Backed out changeset ad71c9a3446b (bug 1024774) Backed out changeset 4f37e72e70f6 (bug 1024774) Backed out changeset ec869578cc0a (bug 1024774) Backed out changeset 3c1d306c8a3d (bug 1024774) Backed out changeset b3a90f30892d (bug 1024774) Backed out changeset cf7bbb3774c0 (bug 1024774) Backed out changeset 2522eb4d3cf2 (bug 1024774) Backed out changeset 89a502d88f9c (bug 1024774) Backed out changeset 61046ad3161f (bug 1024774) Backed out changeset 36706aaa2f06 (bug 1024774) Backed out changeset ba8e68e05149 (bug 1149397) Backed out changeset 532169437c2f (bug 1065657)
2888 lines
96 KiB
C++
2888 lines
96 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
|
|
#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
|
|
#include "csd.pb.h"
|
|
|
|
#include <algorithm>
|
|
|
|
#include <google/protobuf/stubs/once.h>
|
|
#include <google/protobuf/io/coded_stream.h>
|
|
#include <google/protobuf/wire_format_lite_inl.h>
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace safe_browsing {
|
|
|
|
void protobuf_ShutdownFile_csd_2eproto() {
|
|
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_;
|
|
}
|
|
|
|
void protobuf_AddDesc_csd_2eproto() {
|
|
static bool already_here = false;
|
|
if (already_here) return;
|
|
already_here = true;
|
|
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
|
|
|
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();
|
|
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();
|
|
::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_csd_2eproto);
|
|
}
|
|
|
|
// Force AddDescriptors() to be called at static initialization time.
|
|
struct StaticDescriptorInitializer_csd_2eproto {
|
|
StaticDescriptorInitializer_csd_2eproto() {
|
|
protobuf_AddDesc_csd_2eproto();
|
|
}
|
|
} static_descriptor_initializer_csd_2eproto_;
|
|
|
|
|
|
// ===================================================================
|
|
|
|
bool ClientDownloadRequest_ResourceType_IsValid(int value) {
|
|
switch(value) {
|
|
case 0:
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#ifndef _MSC_VER
|
|
const ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_URL;
|
|
const ClientDownloadRequest_ResourceType ClientDownloadRequest::DOWNLOAD_REDIRECT;
|
|
const ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_URL;
|
|
const ClientDownloadRequest_ResourceType ClientDownloadRequest::TAB_REDIRECT;
|
|
const ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MIN;
|
|
const ClientDownloadRequest_ResourceType ClientDownloadRequest::ResourceType_MAX;
|
|
const int ClientDownloadRequest::ResourceType_ARRAYSIZE;
|
|
#endif // _MSC_VER
|
|
bool ClientDownloadRequest_DownloadType_IsValid(int value) {
|
|
switch(value) {
|
|
case 0:
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#ifndef _MSC_VER
|
|
const ClientDownloadRequest_DownloadType ClientDownloadRequest::WIN_EXECUTABLE;
|
|
const ClientDownloadRequest_DownloadType ClientDownloadRequest::CHROME_EXTENSION;
|
|
const ClientDownloadRequest_DownloadType ClientDownloadRequest::ANDROID_APK;
|
|
const ClientDownloadRequest_DownloadType ClientDownloadRequest::ZIPPED_EXECUTABLE;
|
|
const ClientDownloadRequest_DownloadType ClientDownloadRequest::DownloadType_MIN;
|
|
const ClientDownloadRequest_DownloadType ClientDownloadRequest::DownloadType_MAX;
|
|
const int ClientDownloadRequest::DownloadType_ARRAYSIZE;
|
|
#endif // _MSC_VER
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadRequest_Digests::kSha256FieldNumber;
|
|
const int ClientDownloadRequest_Digests::kSha1FieldNumber;
|
|
const int ClientDownloadRequest_Digests::kMd5FieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadRequest_Digests::ClientDownloadRequest_Digests()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::InitAsDefaultInstance() {
|
|
}
|
|
|
|
ClientDownloadRequest_Digests::ClientDownloadRequest_Digests(const ClientDownloadRequest_Digests& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
sha256_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
sha1_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
md5_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadRequest_Digests::~ClientDownloadRequest_Digests() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::SharedDtor() {
|
|
if (sha256_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete sha256_;
|
|
}
|
|
if (sha1_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete sha1_;
|
|
}
|
|
if (md5_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete md5_;
|
|
}
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadRequest_Digests& ClientDownloadRequest_Digests::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadRequest_Digests* ClientDownloadRequest_Digests::default_instance_ = NULL;
|
|
|
|
ClientDownloadRequest_Digests* ClientDownloadRequest_Digests::New() const {
|
|
return new ClientDownloadRequest_Digests;
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (has_sha256()) {
|
|
if (sha256_ != &::google::protobuf::internal::kEmptyString) {
|
|
sha256_->clear();
|
|
}
|
|
}
|
|
if (has_sha1()) {
|
|
if (sha1_ != &::google::protobuf::internal::kEmptyString) {
|
|
sha1_->clear();
|
|
}
|
|
}
|
|
if (has_md5()) {
|
|
if (md5_ != &::google::protobuf::internal::kEmptyString) {
|
|
md5_->clear();
|
|
}
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadRequest_Digests::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 sha256 = 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_sha256()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(18)) goto parse_sha1;
|
|
break;
|
|
}
|
|
|
|
// optional bytes sha1 = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_sha1:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_sha1()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(26)) goto parse_md5;
|
|
break;
|
|
}
|
|
|
|
// optional bytes md5 = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_md5:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_md5()));
|
|
} 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_Digests::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// optional bytes sha256 = 1;
|
|
if (has_sha256()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
1, this->sha256(), output);
|
|
}
|
|
|
|
// optional bytes sha1 = 2;
|
|
if (has_sha1()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
2, this->sha1(), output);
|
|
}
|
|
|
|
// optional bytes md5 = 3;
|
|
if (has_md5()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
3, this->md5(), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadRequest_Digests::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// optional bytes sha256 = 1;
|
|
if (has_sha256()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->sha256());
|
|
}
|
|
|
|
// optional bytes sha1 = 2;
|
|
if (has_sha1()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->sha1());
|
|
}
|
|
|
|
// optional bytes md5 = 3;
|
|
if (has_md5()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->md5());
|
|
}
|
|
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_Digests*>(&from));
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::MergeFrom(const ClientDownloadRequest_Digests& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_sha256()) {
|
|
set_sha256(from.sha256());
|
|
}
|
|
if (from.has_sha1()) {
|
|
set_sha1(from.sha1());
|
|
}
|
|
if (from.has_md5()) {
|
|
set_md5(from.md5());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::CopyFrom(const ClientDownloadRequest_Digests& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadRequest_Digests::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadRequest_Digests::Swap(ClientDownloadRequest_Digests* other) {
|
|
if (other != this) {
|
|
std::swap(sha256_, other->sha256_);
|
|
std::swap(sha1_, other->sha1_);
|
|
std::swap(md5_, other->md5_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadRequest_Digests::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadRequest.Digests";
|
|
}
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadRequest_Resource::kUrlFieldNumber;
|
|
const int ClientDownloadRequest_Resource::kTypeFieldNumber;
|
|
const int ClientDownloadRequest_Resource::kRemoteIpFieldNumber;
|
|
const int ClientDownloadRequest_Resource::kReferrerFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadRequest_Resource::ClientDownloadRequest_Resource()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::InitAsDefaultInstance() {
|
|
}
|
|
|
|
ClientDownloadRequest_Resource::ClientDownloadRequest_Resource(const ClientDownloadRequest_Resource& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
type_ = 0;
|
|
remote_ip_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadRequest_Resource::~ClientDownloadRequest_Resource() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::SharedDtor() {
|
|
if (url_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete url_;
|
|
}
|
|
if (remote_ip_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete remote_ip_;
|
|
}
|
|
if (referrer_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete referrer_;
|
|
}
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadRequest_Resource& ClientDownloadRequest_Resource::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadRequest_Resource* ClientDownloadRequest_Resource::default_instance_ = NULL;
|
|
|
|
ClientDownloadRequest_Resource* ClientDownloadRequest_Resource::New() const {
|
|
return new ClientDownloadRequest_Resource;
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (has_url()) {
|
|
if (url_ != &::google::protobuf::internal::kEmptyString) {
|
|
url_->clear();
|
|
}
|
|
}
|
|
type_ = 0;
|
|
if (has_remote_ip()) {
|
|
if (remote_ip_ != &::google::protobuf::internal::kEmptyString) {
|
|
remote_ip_->clear();
|
|
}
|
|
}
|
|
if (has_referrer()) {
|
|
if (referrer_ != &::google::protobuf::internal::kEmptyString) {
|
|
referrer_->clear();
|
|
}
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadRequest_Resource::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(16)) goto parse_type;
|
|
break;
|
|
}
|
|
|
|
// required .safe_browsing.ClientDownloadRequest.ResourceType type = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_type:
|
|
int value;
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
input, &value)));
|
|
if (::safe_browsing::ClientDownloadRequest_ResourceType_IsValid(value)) {
|
|
set_type(static_cast< ::safe_browsing::ClientDownloadRequest_ResourceType >(value));
|
|
}
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(26)) goto parse_remote_ip;
|
|
break;
|
|
}
|
|
|
|
// optional bytes remote_ip = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_remote_ip:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_remote_ip()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(34)) goto parse_referrer;
|
|
break;
|
|
}
|
|
|
|
// optional string referrer = 4;
|
|
case 4: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_referrer:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_referrer()));
|
|
} 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_Resource::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// required string url = 1;
|
|
if (has_url()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
1, this->url(), output);
|
|
}
|
|
|
|
// required .safe_browsing.ClientDownloadRequest.ResourceType type = 2;
|
|
if (has_type()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
2, this->type(), output);
|
|
}
|
|
|
|
// optional bytes remote_ip = 3;
|
|
if (has_remote_ip()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
3, this->remote_ip(), output);
|
|
}
|
|
|
|
// optional string referrer = 4;
|
|
if (has_referrer()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
4, this->referrer(), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadRequest_Resource::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());
|
|
}
|
|
|
|
// required .safe_browsing.ClientDownloadRequest.ResourceType type = 2;
|
|
if (has_type()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
|
|
}
|
|
|
|
// optional bytes remote_ip = 3;
|
|
if (has_remote_ip()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->remote_ip());
|
|
}
|
|
|
|
// optional string referrer = 4;
|
|
if (has_referrer()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->referrer());
|
|
}
|
|
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_Resource*>(&from));
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::MergeFrom(const ClientDownloadRequest_Resource& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_url()) {
|
|
set_url(from.url());
|
|
}
|
|
if (from.has_type()) {
|
|
set_type(from.type());
|
|
}
|
|
if (from.has_remote_ip()) {
|
|
set_remote_ip(from.remote_ip());
|
|
}
|
|
if (from.has_referrer()) {
|
|
set_referrer(from.referrer());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::CopyFrom(const ClientDownloadRequest_Resource& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadRequest_Resource::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000003) != 0x00000003) return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadRequest_Resource::Swap(ClientDownloadRequest_Resource* other) {
|
|
if (other != this) {
|
|
std::swap(url_, other->url_);
|
|
std::swap(type_, other->type_);
|
|
std::swap(remote_ip_, other->remote_ip_);
|
|
std::swap(referrer_, other->referrer_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadRequest_Resource::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadRequest.Resource";
|
|
}
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadRequest_CertificateChain_Element::kCertificateFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadRequest_CertificateChain_Element::ClientDownloadRequest_CertificateChain_Element()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::InitAsDefaultInstance() {
|
|
}
|
|
|
|
ClientDownloadRequest_CertificateChain_Element::ClientDownloadRequest_CertificateChain_Element(const ClientDownloadRequest_CertificateChain_Element& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
certificate_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadRequest_CertificateChain_Element::~ClientDownloadRequest_CertificateChain_Element() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::SharedDtor() {
|
|
if (certificate_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete certificate_;
|
|
}
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadRequest_CertificateChain_Element& ClientDownloadRequest_CertificateChain_Element::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadRequest_CertificateChain_Element* ClientDownloadRequest_CertificateChain_Element::default_instance_ = NULL;
|
|
|
|
ClientDownloadRequest_CertificateChain_Element* ClientDownloadRequest_CertificateChain_Element::New() const {
|
|
return new ClientDownloadRequest_CertificateChain_Element;
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (has_certificate()) {
|
|
if (certificate_ != &::google::protobuf::internal::kEmptyString) {
|
|
certificate_->clear();
|
|
}
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadRequest_CertificateChain_Element::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 certificate = 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_certificate()));
|
|
} 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_CertificateChain_Element::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// optional bytes certificate = 1;
|
|
if (has_certificate()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
1, this->certificate(), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadRequest_CertificateChain_Element::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// optional bytes certificate = 1;
|
|
if (has_certificate()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->certificate());
|
|
}
|
|
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_CertificateChain_Element*>(&from));
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::MergeFrom(const ClientDownloadRequest_CertificateChain_Element& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_certificate()) {
|
|
set_certificate(from.certificate());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::CopyFrom(const ClientDownloadRequest_CertificateChain_Element& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadRequest_CertificateChain_Element::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain_Element::Swap(ClientDownloadRequest_CertificateChain_Element* other) {
|
|
if (other != this) {
|
|
std::swap(certificate_, other->certificate_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadRequest_CertificateChain_Element::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadRequest.CertificateChain.Element";
|
|
}
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadRequest_CertificateChain::kElementFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadRequest_CertificateChain::ClientDownloadRequest_CertificateChain()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::InitAsDefaultInstance() {
|
|
}
|
|
|
|
ClientDownloadRequest_CertificateChain::ClientDownloadRequest_CertificateChain(const ClientDownloadRequest_CertificateChain& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadRequest_CertificateChain::~ClientDownloadRequest_CertificateChain() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::SharedDtor() {
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadRequest_CertificateChain& ClientDownloadRequest_CertificateChain::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadRequest_CertificateChain* ClientDownloadRequest_CertificateChain::default_instance_ = NULL;
|
|
|
|
ClientDownloadRequest_CertificateChain* ClientDownloadRequest_CertificateChain::New() const {
|
|
return new ClientDownloadRequest_CertificateChain;
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::Clear() {
|
|
element_.Clear();
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadRequest_CertificateChain::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)) {
|
|
// repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1;
|
|
case 1: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_element:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, add_element()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(10)) goto parse_element;
|
|
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_CertificateChain::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1;
|
|
for (int i = 0; i < this->element_size(); i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
|
1, this->element(i), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadRequest_CertificateChain::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
// repeated .safe_browsing.ClientDownloadRequest.CertificateChain.Element element = 1;
|
|
total_size += 1 * this->element_size();
|
|
for (int i = 0; i < this->element_size(); i++) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->element(i));
|
|
}
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_CertificateChain*>(&from));
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::MergeFrom(const ClientDownloadRequest_CertificateChain& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
element_.MergeFrom(from.element_);
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::CopyFrom(const ClientDownloadRequest_CertificateChain& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadRequest_CertificateChain::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadRequest_CertificateChain::Swap(ClientDownloadRequest_CertificateChain* other) {
|
|
if (other != this) {
|
|
element_.Swap(&other->element_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadRequest_CertificateChain::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadRequest.CertificateChain";
|
|
}
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadRequest_SignatureInfo::kCertificateChainFieldNumber;
|
|
const int ClientDownloadRequest_SignatureInfo::kTrustedFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadRequest_SignatureInfo::ClientDownloadRequest_SignatureInfo()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::InitAsDefaultInstance() {
|
|
}
|
|
|
|
ClientDownloadRequest_SignatureInfo::ClientDownloadRequest_SignatureInfo(const ClientDownloadRequest_SignatureInfo& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
trusted_ = false;
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadRequest_SignatureInfo::~ClientDownloadRequest_SignatureInfo() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::SharedDtor() {
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadRequest_SignatureInfo& ClientDownloadRequest_SignatureInfo::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadRequest_SignatureInfo* ClientDownloadRequest_SignatureInfo::default_instance_ = NULL;
|
|
|
|
ClientDownloadRequest_SignatureInfo* ClientDownloadRequest_SignatureInfo::New() const {
|
|
return new ClientDownloadRequest_SignatureInfo;
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::Clear() {
|
|
if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
|
|
trusted_ = false;
|
|
}
|
|
certificate_chain_.Clear();
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadRequest_SignatureInfo::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)) {
|
|
// repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1;
|
|
case 1: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_certificate_chain:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, add_certificate_chain()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(10)) goto parse_certificate_chain;
|
|
if (input->ExpectTag(16)) goto parse_trusted;
|
|
break;
|
|
}
|
|
|
|
// optional bool trusted = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_trusted:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &trusted_)));
|
|
set_has_trusted();
|
|
} 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_SignatureInfo::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1;
|
|
for (int i = 0; i < this->certificate_chain_size(); i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
|
1, this->certificate_chain(i), output);
|
|
}
|
|
|
|
// optional bool trusted = 2;
|
|
if (has_trusted()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(2, this->trusted(), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadRequest_SignatureInfo::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[1 / 32] & (0xffu << (1 % 32))) {
|
|
// optional bool trusted = 2;
|
|
if (has_trusted()) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
}
|
|
// repeated .safe_browsing.ClientDownloadRequest.CertificateChain certificate_chain = 1;
|
|
total_size += 1 * this->certificate_chain_size();
|
|
for (int i = 0; i < this->certificate_chain_size(); i++) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->certificate_chain(i));
|
|
}
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_SignatureInfo*>(&from));
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::MergeFrom(const ClientDownloadRequest_SignatureInfo& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
certificate_chain_.MergeFrom(from.certificate_chain_);
|
|
if (from._has_bits_[1 / 32] & (0xffu << (1 % 32))) {
|
|
if (from.has_trusted()) {
|
|
set_trusted(from.trusted());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::CopyFrom(const ClientDownloadRequest_SignatureInfo& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadRequest_SignatureInfo::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadRequest_SignatureInfo::Swap(ClientDownloadRequest_SignatureInfo* other) {
|
|
if (other != this) {
|
|
certificate_chain_.Swap(&other->certificate_chain_);
|
|
std::swap(trusted_, other->trusted_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadRequest_SignatureInfo::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadRequest.SignatureInfo";
|
|
}
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
#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<const ClientDownloadRequest_PEImageHeaders_DebugData*>(&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<const ClientDownloadRequest_PEImageHeaders*>(&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<const ClientDownloadRequest_ImageHeaders*>(&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
|
|
const int ClientDownloadRequest::kUrlFieldNumber;
|
|
const int ClientDownloadRequest::kDigestsFieldNumber;
|
|
const int ClientDownloadRequest::kLengthFieldNumber;
|
|
const int ClientDownloadRequest::kResourcesFieldNumber;
|
|
const int ClientDownloadRequest::kSignatureFieldNumber;
|
|
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()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
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)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadRequest::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
digests_ = NULL;
|
|
length_ = GOOGLE_LONGLONG(0);
|
|
signature_ = NULL;
|
|
user_initiated_ = false;
|
|
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_));
|
|
}
|
|
|
|
ClientDownloadRequest::~ClientDownloadRequest() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadRequest::SharedDtor() {
|
|
if (url_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete url_;
|
|
}
|
|
if (file_basename_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete file_basename_;
|
|
}
|
|
if (locale_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete locale_;
|
|
}
|
|
if (this != default_instance_) {
|
|
delete digests_;
|
|
delete signature_;
|
|
delete image_headers_;
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadRequest& ClientDownloadRequest::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadRequest* ClientDownloadRequest::default_instance_ = NULL;
|
|
|
|
ClientDownloadRequest* ClientDownloadRequest::New() const {
|
|
return new ClientDownloadRequest;
|
|
}
|
|
|
|
void ClientDownloadRequest::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (has_url()) {
|
|
if (url_ != &::google::protobuf::internal::kEmptyString) {
|
|
url_->clear();
|
|
}
|
|
}
|
|
if (has_digests()) {
|
|
if (digests_ != NULL) digests_->::safe_browsing::ClientDownloadRequest_Digests::Clear();
|
|
}
|
|
length_ = GOOGLE_LONGLONG(0);
|
|
if (has_signature()) {
|
|
if (signature_ != NULL) signature_->::safe_browsing::ClientDownloadRequest_SignatureInfo::Clear();
|
|
}
|
|
user_initiated_ = false;
|
|
if (has_file_basename()) {
|
|
if (file_basename_ != &::google::protobuf::internal::kEmptyString) {
|
|
file_basename_->clear();
|
|
}
|
|
}
|
|
download_type_ = 0;
|
|
}
|
|
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
|
|
if (has_locale()) {
|
|
if (locale_ != &::google::protobuf::internal::kEmptyString) {
|
|
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_));
|
|
}
|
|
|
|
bool ClientDownloadRequest::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_digests;
|
|
break;
|
|
}
|
|
|
|
// required .safe_browsing.ClientDownloadRequest.Digests digests = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_digests:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_digests()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(24)) goto parse_length;
|
|
break;
|
|
}
|
|
|
|
// required int64 length = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_length:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
|
|
input, &length_)));
|
|
set_has_length();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(34)) goto parse_resources;
|
|
break;
|
|
}
|
|
|
|
// repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4;
|
|
case 4: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_resources:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, add_resources()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(34)) goto parse_resources;
|
|
if (input->ExpectTag(42)) goto parse_signature;
|
|
break;
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5;
|
|
case 5: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_signature:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_signature()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(48)) goto parse_user_initiated;
|
|
break;
|
|
}
|
|
|
|
// optional bool user_initiated = 6;
|
|
case 6: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_user_initiated:
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
|
|
input, &user_initiated_)));
|
|
set_has_user_initiated();
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(74)) goto parse_file_basename;
|
|
break;
|
|
}
|
|
|
|
// optional string file_basename = 9;
|
|
case 9: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_file_basename:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_file_basename()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(80)) goto parse_download_type;
|
|
break;
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE];
|
|
case 10: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) {
|
|
parse_download_type:
|
|
int value;
|
|
DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
|
|
int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
|
|
input, &value)));
|
|
if (::safe_browsing::ClientDownloadRequest_DownloadType_IsValid(value)) {
|
|
set_download_type(static_cast< ::safe_browsing::ClientDownloadRequest_DownloadType >(value));
|
|
}
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(90)) goto parse_locale;
|
|
break;
|
|
}
|
|
|
|
// optional string locale = 11;
|
|
case 11: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_locale:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_locale()));
|
|
} 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;
|
|
}
|
|
|
|
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::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// required string url = 1;
|
|
if (has_url()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
1, this->url(), output);
|
|
}
|
|
|
|
// required .safe_browsing.ClientDownloadRequest.Digests digests = 2;
|
|
if (has_digests()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
|
2, this->digests(), output);
|
|
}
|
|
|
|
// required int64 length = 3;
|
|
if (has_length()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->length(), output);
|
|
}
|
|
|
|
// repeated .safe_browsing.ClientDownloadRequest.Resource resources = 4;
|
|
for (int i = 0; i < this->resources_size(); i++) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
|
4, this->resources(i), output);
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5;
|
|
if (has_signature()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
|
5, this->signature(), output);
|
|
}
|
|
|
|
// optional bool user_initiated = 6;
|
|
if (has_user_initiated()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBool(6, this->user_initiated(), output);
|
|
}
|
|
|
|
// optional string file_basename = 9;
|
|
if (has_file_basename()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
9, this->file_basename(), output);
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE];
|
|
if (has_download_type()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
10, this->download_type(), output);
|
|
}
|
|
|
|
// optional string locale = 11;
|
|
if (has_locale()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
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 {
|
|
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());
|
|
}
|
|
|
|
// required .safe_browsing.ClientDownloadRequest.Digests digests = 2;
|
|
if (has_digests()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->digests());
|
|
}
|
|
|
|
// required int64 length = 3;
|
|
if (has_length()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::Int64Size(
|
|
this->length());
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadRequest.SignatureInfo signature = 5;
|
|
if (has_signature()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->signature());
|
|
}
|
|
|
|
// optional bool user_initiated = 6;
|
|
if (has_user_initiated()) {
|
|
total_size += 1 + 1;
|
|
}
|
|
|
|
// optional string file_basename = 9;
|
|
if (has_file_basename()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->file_basename());
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadRequest.DownloadType download_type = 10 [default = WIN_EXECUTABLE];
|
|
if (has_download_type()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->download_type());
|
|
}
|
|
|
|
}
|
|
if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) {
|
|
// optional string locale = 11;
|
|
if (has_locale()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
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();
|
|
for (int i = 0; i < this->resources_size(); i++) {
|
|
total_size +=
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->resources(i));
|
|
}
|
|
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadRequest::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest*>(&from));
|
|
}
|
|
|
|
void ClientDownloadRequest::MergeFrom(const ClientDownloadRequest& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
resources_.MergeFrom(from.resources_);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_url()) {
|
|
set_url(from.url());
|
|
}
|
|
if (from.has_digests()) {
|
|
mutable_digests()->::safe_browsing::ClientDownloadRequest_Digests::MergeFrom(from.digests());
|
|
}
|
|
if (from.has_length()) {
|
|
set_length(from.length());
|
|
}
|
|
if (from.has_signature()) {
|
|
mutable_signature()->::safe_browsing::ClientDownloadRequest_SignatureInfo::MergeFrom(from.signature());
|
|
}
|
|
if (from.has_user_initiated()) {
|
|
set_user_initiated(from.user_initiated());
|
|
}
|
|
if (from.has_file_basename()) {
|
|
set_file_basename(from.file_basename());
|
|
}
|
|
if (from.has_download_type()) {
|
|
set_download_type(from.download_type());
|
|
}
|
|
}
|
|
if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) {
|
|
if (from.has_locale()) {
|
|
set_locale(from.locale());
|
|
}
|
|
if (from.has_image_headers()) {
|
|
mutable_image_headers()->::safe_browsing::ClientDownloadRequest_ImageHeaders::MergeFrom(from.image_headers());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadRequest::CopyFrom(const ClientDownloadRequest& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadRequest::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000007) != 0x00000007) return false;
|
|
|
|
for (int i = 0; i < resources_size(); i++) {
|
|
if (!this->resources(i).IsInitialized()) return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadRequest::Swap(ClientDownloadRequest* other) {
|
|
if (other != this) {
|
|
std::swap(url_, other->url_);
|
|
std::swap(digests_, other->digests_);
|
|
std::swap(length_, other->length_);
|
|
resources_.Swap(&other->resources_);
|
|
std::swap(signature_, other->signature_);
|
|
std::swap(user_initiated_, other->user_initiated_);
|
|
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_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadRequest::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadRequest";
|
|
}
|
|
|
|
|
|
// ===================================================================
|
|
|
|
bool ClientDownloadResponse_Verdict_IsValid(int value) {
|
|
switch(value) {
|
|
case 0:
|
|
case 1:
|
|
case 2:
|
|
case 3:
|
|
case 4:
|
|
return true;
|
|
default:
|
|
return false;
|
|
}
|
|
}
|
|
|
|
#ifndef _MSC_VER
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::SAFE;
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::DANGEROUS;
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::UNCOMMON;
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::POTENTIALLY_UNWANTED;
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::DANGEROUS_HOST;
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::Verdict_MIN;
|
|
const ClientDownloadResponse_Verdict ClientDownloadResponse::Verdict_MAX;
|
|
const int ClientDownloadResponse::Verdict_ARRAYSIZE;
|
|
#endif // _MSC_VER
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadResponse_MoreInfo::kDescriptionFieldNumber;
|
|
const int ClientDownloadResponse_MoreInfo::kUrlFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadResponse_MoreInfo::ClientDownloadResponse_MoreInfo()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::InitAsDefaultInstance() {
|
|
}
|
|
|
|
ClientDownloadResponse_MoreInfo::ClientDownloadResponse_MoreInfo(const ClientDownloadResponse_MoreInfo& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
description_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
url_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadResponse_MoreInfo::~ClientDownloadResponse_MoreInfo() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::SharedDtor() {
|
|
if (description_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete description_;
|
|
}
|
|
if (url_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete url_;
|
|
}
|
|
if (this != default_instance_) {
|
|
}
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadResponse_MoreInfo& ClientDownloadResponse_MoreInfo::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadResponse_MoreInfo* ClientDownloadResponse_MoreInfo::default_instance_ = NULL;
|
|
|
|
ClientDownloadResponse_MoreInfo* ClientDownloadResponse_MoreInfo::New() const {
|
|
return new ClientDownloadResponse_MoreInfo;
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (has_description()) {
|
|
if (description_ != &::google::protobuf::internal::kEmptyString) {
|
|
description_->clear();
|
|
}
|
|
}
|
|
if (has_url()) {
|
|
if (url_ != &::google::protobuf::internal::kEmptyString) {
|
|
url_->clear();
|
|
}
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadResponse_MoreInfo::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 description = 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_description()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(18)) goto parse_url;
|
|
break;
|
|
}
|
|
|
|
// optional string url = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_url:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadString(
|
|
input, this->mutable_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 ClientDownloadResponse_MoreInfo::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// optional string description = 1;
|
|
if (has_description()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
1, this->description(), output);
|
|
}
|
|
|
|
// optional string url = 2;
|
|
if (has_url()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteString(
|
|
2, this->url(), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadResponse_MoreInfo::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// optional string description = 1;
|
|
if (has_description()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->description());
|
|
}
|
|
|
|
// optional string url = 2;
|
|
if (has_url()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::StringSize(
|
|
this->url());
|
|
}
|
|
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadResponse_MoreInfo*>(&from));
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::MergeFrom(const ClientDownloadResponse_MoreInfo& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_description()) {
|
|
set_description(from.description());
|
|
}
|
|
if (from.has_url()) {
|
|
set_url(from.url());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::CopyFrom(const ClientDownloadResponse_MoreInfo& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadResponse_MoreInfo::IsInitialized() const {
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadResponse_MoreInfo::Swap(ClientDownloadResponse_MoreInfo* other) {
|
|
if (other != this) {
|
|
std::swap(description_, other->description_);
|
|
std::swap(url_, other->url_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadResponse_MoreInfo::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadResponse.MoreInfo";
|
|
}
|
|
|
|
|
|
// -------------------------------------------------------------------
|
|
|
|
#ifndef _MSC_VER
|
|
const int ClientDownloadResponse::kVerdictFieldNumber;
|
|
const int ClientDownloadResponse::kMoreInfoFieldNumber;
|
|
const int ClientDownloadResponse::kTokenFieldNumber;
|
|
#endif // !_MSC_VER
|
|
|
|
ClientDownloadResponse::ClientDownloadResponse()
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
}
|
|
|
|
void ClientDownloadResponse::InitAsDefaultInstance() {
|
|
more_info_ = const_cast< ::safe_browsing::ClientDownloadResponse_MoreInfo*>(&::safe_browsing::ClientDownloadResponse_MoreInfo::default_instance());
|
|
}
|
|
|
|
ClientDownloadResponse::ClientDownloadResponse(const ClientDownloadResponse& from)
|
|
: ::google::protobuf::MessageLite() {
|
|
SharedCtor();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
void ClientDownloadResponse::SharedCtor() {
|
|
_cached_size_ = 0;
|
|
verdict_ = 0;
|
|
more_info_ = NULL;
|
|
token_ = const_cast< ::std::string*>(&::google::protobuf::internal::kEmptyString);
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
ClientDownloadResponse::~ClientDownloadResponse() {
|
|
SharedDtor();
|
|
}
|
|
|
|
void ClientDownloadResponse::SharedDtor() {
|
|
if (token_ != &::google::protobuf::internal::kEmptyString) {
|
|
delete token_;
|
|
}
|
|
if (this != default_instance_) {
|
|
delete more_info_;
|
|
}
|
|
}
|
|
|
|
void ClientDownloadResponse::SetCachedSize(int size) const {
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
}
|
|
const ClientDownloadResponse& ClientDownloadResponse::default_instance() {
|
|
if (default_instance_ == NULL) protobuf_AddDesc_csd_2eproto(); return *default_instance_;
|
|
}
|
|
|
|
ClientDownloadResponse* ClientDownloadResponse::default_instance_ = NULL;
|
|
|
|
ClientDownloadResponse* ClientDownloadResponse::New() const {
|
|
return new ClientDownloadResponse;
|
|
}
|
|
|
|
void ClientDownloadResponse::Clear() {
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
verdict_ = 0;
|
|
if (has_more_info()) {
|
|
if (more_info_ != NULL) more_info_->::safe_browsing::ClientDownloadResponse_MoreInfo::Clear();
|
|
}
|
|
if (has_token()) {
|
|
if (token_ != &::google::protobuf::internal::kEmptyString) {
|
|
token_->clear();
|
|
}
|
|
}
|
|
}
|
|
::memset(_has_bits_, 0, sizeof(_has_bits_));
|
|
}
|
|
|
|
bool ClientDownloadResponse::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 .safe_browsing.ClientDownloadResponse.Verdict verdict = 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::ClientDownloadResponse_Verdict_IsValid(value)) {
|
|
set_verdict(static_cast< ::safe_browsing::ClientDownloadResponse_Verdict >(value));
|
|
}
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(18)) goto parse_more_info;
|
|
break;
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
|
|
case 2: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_more_info:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
|
|
input, mutable_more_info()));
|
|
} else {
|
|
goto handle_uninterpreted;
|
|
}
|
|
if (input->ExpectTag(26)) goto parse_token;
|
|
break;
|
|
}
|
|
|
|
// optional bytes token = 3;
|
|
case 3: {
|
|
if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
|
|
::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) {
|
|
parse_token:
|
|
DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
|
|
input, this->mutable_token()));
|
|
} 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 ClientDownloadResponse::SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const {
|
|
// required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
|
|
if (has_verdict()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteEnum(
|
|
1, this->verdict(), output);
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
|
|
if (has_more_info()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteMessage(
|
|
2, this->more_info(), output);
|
|
}
|
|
|
|
// optional bytes token = 3;
|
|
if (has_token()) {
|
|
::google::protobuf::internal::WireFormatLite::WriteBytes(
|
|
3, this->token(), output);
|
|
}
|
|
|
|
}
|
|
|
|
int ClientDownloadResponse::ByteSize() const {
|
|
int total_size = 0;
|
|
|
|
if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
// required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
|
|
if (has_verdict()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::EnumSize(this->verdict());
|
|
}
|
|
|
|
// optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
|
|
if (has_more_info()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
|
|
this->more_info());
|
|
}
|
|
|
|
// optional bytes token = 3;
|
|
if (has_token()) {
|
|
total_size += 1 +
|
|
::google::protobuf::internal::WireFormatLite::BytesSize(
|
|
this->token());
|
|
}
|
|
|
|
}
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
|
|
_cached_size_ = total_size;
|
|
GOOGLE_SAFE_CONCURRENT_WRITES_END();
|
|
return total_size;
|
|
}
|
|
|
|
void ClientDownloadResponse::CheckTypeAndMergeFrom(
|
|
const ::google::protobuf::MessageLite& from) {
|
|
MergeFrom(*::google::protobuf::down_cast<const ClientDownloadResponse*>(&from));
|
|
}
|
|
|
|
void ClientDownloadResponse::MergeFrom(const ClientDownloadResponse& from) {
|
|
GOOGLE_CHECK_NE(&from, this);
|
|
if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
|
|
if (from.has_verdict()) {
|
|
set_verdict(from.verdict());
|
|
}
|
|
if (from.has_more_info()) {
|
|
mutable_more_info()->::safe_browsing::ClientDownloadResponse_MoreInfo::MergeFrom(from.more_info());
|
|
}
|
|
if (from.has_token()) {
|
|
set_token(from.token());
|
|
}
|
|
}
|
|
}
|
|
|
|
void ClientDownloadResponse::CopyFrom(const ClientDownloadResponse& from) {
|
|
if (&from == this) return;
|
|
Clear();
|
|
MergeFrom(from);
|
|
}
|
|
|
|
bool ClientDownloadResponse::IsInitialized() const {
|
|
if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
void ClientDownloadResponse::Swap(ClientDownloadResponse* other) {
|
|
if (other != this) {
|
|
std::swap(verdict_, other->verdict_);
|
|
std::swap(more_info_, other->more_info_);
|
|
std::swap(token_, other->token_);
|
|
std::swap(_has_bits_[0], other->_has_bits_[0]);
|
|
std::swap(_cached_size_, other->_cached_size_);
|
|
}
|
|
}
|
|
|
|
::std::string ClientDownloadResponse::GetTypeName() const {
|
|
return "safe_browsing.ClientDownloadResponse";
|
|
}
|
|
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
} // namespace safe_browsing
|
|
|
|
// @@protoc_insertion_point(global_scope)
|