// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: download_entry.proto

#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
#include "download_entry.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.h>
#include <google/protobuf/io/zero_copy_stream_impl_lite.h>
// @@protoc_insertion_point(includes)

namespace download_pb {
class HttpRequestHeaderDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<HttpRequestHeader> {
} _HttpRequestHeader_default_instance_;
class ReceivedSliceDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<ReceivedSlice> {
} _ReceivedSlice_default_instance_;
class DownloadEntryDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DownloadEntry> {
} _DownloadEntry_default_instance_;
class DownloadEntriesDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DownloadEntries> {
} _DownloadEntries_default_instance_;
class UkmInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<UkmInfo> {
} _UkmInfo_default_instance_;
class InProgressInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<InProgressInfo> {
} _InProgressInfo_default_instance_;
class DownloadInfoDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DownloadInfo> {
} _DownloadInfo_default_instance_;
class DownloadDBEntryDefaultTypeInternal : public ::google::protobuf::internal::ExplicitlyConstructed<DownloadDBEntry> {
  public:
  const ::download_pb::DownloadInfo* download_info_;
} _DownloadDBEntry_default_instance_;

namespace protobuf_download_5fentry_2eproto {

PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTableField
    const TableStruct::entries[] = {
  {0, 0, 0, ::google::protobuf::internal::kInvalidMask, 0, 0},
};

PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::AuxillaryParseTableField
    const TableStruct::aux[] = {
  ::google::protobuf::internal::AuxillaryParseTableField(),
};
PROTOBUF_CONSTEXPR_VAR ::google::protobuf::internal::ParseTable const
    TableStruct::schema[] = {
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
  { NULL, NULL, 0, -1, -1, false },
};


void TableStruct::Shutdown() {
  _HttpRequestHeader_default_instance_.Shutdown();
  _ReceivedSlice_default_instance_.Shutdown();
  _DownloadEntry_default_instance_.Shutdown();
  _DownloadEntries_default_instance_.Shutdown();
  _UkmInfo_default_instance_.Shutdown();
  _InProgressInfo_default_instance_.Shutdown();
  _DownloadInfo_default_instance_.Shutdown();
  _DownloadDBEntry_default_instance_.Shutdown();
}

void TableStruct::InitDefaultsImpl() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  ::google::protobuf::internal::InitProtobufDefaults();
  ::download_pb::protobuf_download_5fsource_2eproto::InitDefaults();
  _HttpRequestHeader_default_instance_.DefaultConstruct();
  _ReceivedSlice_default_instance_.DefaultConstruct();
  _DownloadEntry_default_instance_.DefaultConstruct();
  _DownloadEntries_default_instance_.DefaultConstruct();
  _UkmInfo_default_instance_.DefaultConstruct();
  _InProgressInfo_default_instance_.DefaultConstruct();
  _DownloadInfo_default_instance_.DefaultConstruct();
  _DownloadDBEntry_default_instance_.DefaultConstruct();
  _DownloadInfo_default_instance_.get_mutable()->ukm_info_ = const_cast< ::download_pb::UkmInfo*>(
      ::download_pb::UkmInfo::internal_default_instance());
  _DownloadInfo_default_instance_.get_mutable()->in_progress_info_ = const_cast< ::download_pb::InProgressInfo*>(
      ::download_pb::InProgressInfo::internal_default_instance());
}

void InitDefaults() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &TableStruct::InitDefaultsImpl);
}
void AddDescriptorsImpl() {
  InitDefaults();
  ::download_pb::protobuf_download_5fsource_2eproto::AddDescriptors();
  ::google::protobuf::internal::OnShutdown(&TableStruct::Shutdown);
}

void AddDescriptors() {
  static GOOGLE_PROTOBUF_DECLARE_ONCE(once);
  ::google::protobuf::GoogleOnceInit(&once, &AddDescriptorsImpl);
}

}  // namespace protobuf_download_5fentry_2eproto


// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int HttpRequestHeader::kKeyFieldNumber;
const int HttpRequestHeader::kValueFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

HttpRequestHeader::HttpRequestHeader()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.HttpRequestHeader)
}
HttpRequestHeader::HttpRequestHeader(const HttpRequestHeader& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_key()) {
    key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
  }
  value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_value()) {
    value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
  }
  // @@protoc_insertion_point(copy_constructor:download_pb.HttpRequestHeader)
}

void HttpRequestHeader::SharedCtor() {
  _cached_size_ = 0;
  key_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  value_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

HttpRequestHeader::~HttpRequestHeader() {
  // @@protoc_insertion_point(destructor:download_pb.HttpRequestHeader)
  SharedDtor();
}

void HttpRequestHeader::SharedDtor() {
  key_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  value_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void HttpRequestHeader::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const HttpRequestHeader& HttpRequestHeader::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

HttpRequestHeader* HttpRequestHeader::New(::google::protobuf::Arena* arena) const {
  HttpRequestHeader* n = new HttpRequestHeader;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void HttpRequestHeader::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.HttpRequestHeader)
  if (_has_bits_[0 / 32] & 3u) {
    if (has_key()) {
      GOOGLE_DCHECK(!key_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*key_.UnsafeRawStringPointer())->clear();
    }
    if (has_value()) {
      GOOGLE_DCHECK(!value_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*value_.UnsafeRawStringPointer())->clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool HttpRequestHeader::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.HttpRequestHeader)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string key = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_key()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string value = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_value()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.HttpRequestHeader)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.HttpRequestHeader)
  return false;
#undef DO_
}

void HttpRequestHeader::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.HttpRequestHeader)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string key = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->key(), output);
  }

  // optional string value = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->value(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.HttpRequestHeader)
}

size_t HttpRequestHeader::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.HttpRequestHeader)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  if (_has_bits_[0 / 32] & 3u) {
    // optional string key = 1;
    if (has_key()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->key());
    }

    // optional string value = 2;
    if (has_value()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->value());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void HttpRequestHeader::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const HttpRequestHeader*>(&from));
}

void HttpRequestHeader::MergeFrom(const HttpRequestHeader& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.HttpRequestHeader)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_key();
      key_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.key_);
    }
    if (cached_has_bits & 0x00000002u) {
      set_has_value();
      value_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_);
    }
  }
}

void HttpRequestHeader::CopyFrom(const HttpRequestHeader& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.HttpRequestHeader)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool HttpRequestHeader::IsInitialized() const {
  return true;
}

void HttpRequestHeader::Swap(HttpRequestHeader* other) {
  if (other == this) return;
  InternalSwap(other);
}
void HttpRequestHeader::InternalSwap(HttpRequestHeader* other) {
  key_.Swap(&other->key_);
  value_.Swap(&other->value_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string HttpRequestHeader::GetTypeName() const {
  return "download_pb.HttpRequestHeader";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// HttpRequestHeader

// optional string key = 1;
bool HttpRequestHeader::has_key() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void HttpRequestHeader::set_has_key() {
  _has_bits_[0] |= 0x00000001u;
}
void HttpRequestHeader::clear_has_key() {
  _has_bits_[0] &= ~0x00000001u;
}
void HttpRequestHeader::clear_key() {
  key_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_key();
}
const ::std::string& HttpRequestHeader::key() const {
  // @@protoc_insertion_point(field_get:download_pb.HttpRequestHeader.key)
  return key_.GetNoArena();
}
void HttpRequestHeader::set_key(const ::std::string& value) {
  set_has_key();
  key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.HttpRequestHeader.key)
}
#if LANG_CXX11
void HttpRequestHeader::set_key(::std::string&& value) {
  set_has_key();
  key_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.HttpRequestHeader.key)
}
#endif
void HttpRequestHeader::set_key(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_key();
  key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.HttpRequestHeader.key)
}
void HttpRequestHeader::set_key(const char* value, size_t size) {
  set_has_key();
  key_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.HttpRequestHeader.key)
}
::std::string* HttpRequestHeader::mutable_key() {
  set_has_key();
  // @@protoc_insertion_point(field_mutable:download_pb.HttpRequestHeader.key)
  return key_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* HttpRequestHeader::release_key() {
  // @@protoc_insertion_point(field_release:download_pb.HttpRequestHeader.key)
  clear_has_key();
  return key_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void HttpRequestHeader::set_allocated_key(::std::string* key) {
  if (key != NULL) {
    set_has_key();
  } else {
    clear_has_key();
  }
  key_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), key);
  // @@protoc_insertion_point(field_set_allocated:download_pb.HttpRequestHeader.key)
}

// optional string value = 2;
bool HttpRequestHeader::has_value() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void HttpRequestHeader::set_has_value() {
  _has_bits_[0] |= 0x00000002u;
}
void HttpRequestHeader::clear_has_value() {
  _has_bits_[0] &= ~0x00000002u;
}
void HttpRequestHeader::clear_value() {
  value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_value();
}
const ::std::string& HttpRequestHeader::value() const {
  // @@protoc_insertion_point(field_get:download_pb.HttpRequestHeader.value)
  return value_.GetNoArena();
}
void HttpRequestHeader::set_value(const ::std::string& value) {
  set_has_value();
  value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.HttpRequestHeader.value)
}
#if LANG_CXX11
void HttpRequestHeader::set_value(::std::string&& value) {
  set_has_value();
  value_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.HttpRequestHeader.value)
}
#endif
void HttpRequestHeader::set_value(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_value();
  value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.HttpRequestHeader.value)
}
void HttpRequestHeader::set_value(const char* value, size_t size) {
  set_has_value();
  value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.HttpRequestHeader.value)
}
::std::string* HttpRequestHeader::mutable_value() {
  set_has_value();
  // @@protoc_insertion_point(field_mutable:download_pb.HttpRequestHeader.value)
  return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* HttpRequestHeader::release_value() {
  // @@protoc_insertion_point(field_release:download_pb.HttpRequestHeader.value)
  clear_has_value();
  return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void HttpRequestHeader::set_allocated_value(::std::string* value) {
  if (value != NULL) {
    set_has_value();
  } else {
    clear_has_value();
  }
  value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set_allocated:download_pb.HttpRequestHeader.value)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ReceivedSlice::kOffsetFieldNumber;
const int ReceivedSlice::kReceivedBytesFieldNumber;
const int ReceivedSlice::kFinishedFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ReceivedSlice::ReceivedSlice()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.ReceivedSlice)
}
ReceivedSlice::ReceivedSlice(const ReceivedSlice& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&offset_, &from.offset_,
    static_cast<size_t>(reinterpret_cast<char*>(&finished_) -
    reinterpret_cast<char*>(&offset_)) + sizeof(finished_));
  // @@protoc_insertion_point(copy_constructor:download_pb.ReceivedSlice)
}

void ReceivedSlice::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&offset_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&finished_) -
      reinterpret_cast<char*>(&offset_)) + sizeof(finished_));
}

ReceivedSlice::~ReceivedSlice() {
  // @@protoc_insertion_point(destructor:download_pb.ReceivedSlice)
  SharedDtor();
}

void ReceivedSlice::SharedDtor() {
}

void ReceivedSlice::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const ReceivedSlice& ReceivedSlice::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

ReceivedSlice* ReceivedSlice::New(::google::protobuf::Arena* arena) const {
  ReceivedSlice* n = new ReceivedSlice;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void ReceivedSlice::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.ReceivedSlice)
  if (_has_bits_[0 / 32] & 7u) {
    ::memset(&offset_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&finished_) -
        reinterpret_cast<char*>(&offset_)) + sizeof(finished_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ReceivedSlice::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.ReceivedSlice)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional int64 offset = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u)) {
          set_has_offset();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &offset_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 received_bytes = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u)) {
          set_has_received_bytes();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &received_bytes_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool finished = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u)) {
          set_has_finished();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &finished_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.ReceivedSlice)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.ReceivedSlice)
  return false;
#undef DO_
}

void ReceivedSlice::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.ReceivedSlice)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional int64 offset = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(1, this->offset(), output);
  }

  // optional int64 received_bytes = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->received_bytes(), output);
  }

  // optional bool finished = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(3, this->finished(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.ReceivedSlice)
}

size_t ReceivedSlice::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.ReceivedSlice)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  if (_has_bits_[0 / 32] & 7u) {
    // optional int64 offset = 1;
    if (has_offset()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->offset());
    }

    // optional int64 received_bytes = 2;
    if (has_received_bytes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->received_bytes());
    }

    // optional bool finished = 3;
    if (has_finished()) {
      total_size += 1 + 1;
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void ReceivedSlice::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const ReceivedSlice*>(&from));
}

void ReceivedSlice::MergeFrom(const ReceivedSlice& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.ReceivedSlice)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      offset_ = from.offset_;
    }
    if (cached_has_bits & 0x00000002u) {
      received_bytes_ = from.received_bytes_;
    }
    if (cached_has_bits & 0x00000004u) {
      finished_ = from.finished_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void ReceivedSlice::CopyFrom(const ReceivedSlice& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.ReceivedSlice)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool ReceivedSlice::IsInitialized() const {
  return true;
}

void ReceivedSlice::Swap(ReceivedSlice* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ReceivedSlice::InternalSwap(ReceivedSlice* other) {
  std::swap(offset_, other->offset_);
  std::swap(received_bytes_, other->received_bytes_);
  std::swap(finished_, other->finished_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string ReceivedSlice::GetTypeName() const {
  return "download_pb.ReceivedSlice";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// ReceivedSlice

// optional int64 offset = 1;
bool ReceivedSlice::has_offset() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void ReceivedSlice::set_has_offset() {
  _has_bits_[0] |= 0x00000001u;
}
void ReceivedSlice::clear_has_offset() {
  _has_bits_[0] &= ~0x00000001u;
}
void ReceivedSlice::clear_offset() {
  offset_ = GOOGLE_LONGLONG(0);
  clear_has_offset();
}
::google::protobuf::int64 ReceivedSlice::offset() const {
  // @@protoc_insertion_point(field_get:download_pb.ReceivedSlice.offset)
  return offset_;
}
void ReceivedSlice::set_offset(::google::protobuf::int64 value) {
  set_has_offset();
  offset_ = value;
  // @@protoc_insertion_point(field_set:download_pb.ReceivedSlice.offset)
}

// optional int64 received_bytes = 2;
bool ReceivedSlice::has_received_bytes() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void ReceivedSlice::set_has_received_bytes() {
  _has_bits_[0] |= 0x00000002u;
}
void ReceivedSlice::clear_has_received_bytes() {
  _has_bits_[0] &= ~0x00000002u;
}
void ReceivedSlice::clear_received_bytes() {
  received_bytes_ = GOOGLE_LONGLONG(0);
  clear_has_received_bytes();
}
::google::protobuf::int64 ReceivedSlice::received_bytes() const {
  // @@protoc_insertion_point(field_get:download_pb.ReceivedSlice.received_bytes)
  return received_bytes_;
}
void ReceivedSlice::set_received_bytes(::google::protobuf::int64 value) {
  set_has_received_bytes();
  received_bytes_ = value;
  // @@protoc_insertion_point(field_set:download_pb.ReceivedSlice.received_bytes)
}

// optional bool finished = 3;
bool ReceivedSlice::has_finished() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void ReceivedSlice::set_has_finished() {
  _has_bits_[0] |= 0x00000004u;
}
void ReceivedSlice::clear_has_finished() {
  _has_bits_[0] &= ~0x00000004u;
}
void ReceivedSlice::clear_finished() {
  finished_ = false;
  clear_has_finished();
}
bool ReceivedSlice::finished() const {
  // @@protoc_insertion_point(field_get:download_pb.ReceivedSlice.finished)
  return finished_;
}
void ReceivedSlice::set_finished(bool value) {
  set_has_finished();
  finished_ = value;
  // @@protoc_insertion_point(field_set:download_pb.ReceivedSlice.finished)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DownloadEntry::kGuidFieldNumber;
const int DownloadEntry::kRequestOriginFieldNumber;
const int DownloadEntry::kDownloadSourceFieldNumber;
const int DownloadEntry::kUkmDownloadIdFieldNumber;
const int DownloadEntry::kBytesWastedFieldNumber;
const int DownloadEntry::kFetchErrorBodyFieldNumber;
const int DownloadEntry::kRequestHeadersFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DownloadEntry::DownloadEntry()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.DownloadEntry)
}
DownloadEntry::DownloadEntry(const DownloadEntry& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      request_headers_(from.request_headers_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  guid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_guid()) {
    guid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.guid_);
  }
  request_origin_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_request_origin()) {
    request_origin_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_origin_);
  }
  ::memcpy(&ukm_download_id_, &from.ukm_download_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&bytes_wasted_) -
    reinterpret_cast<char*>(&ukm_download_id_)) + sizeof(bytes_wasted_));
  // @@protoc_insertion_point(copy_constructor:download_pb.DownloadEntry)
}

void DownloadEntry::SharedCtor() {
  _cached_size_ = 0;
  guid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  request_origin_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&ukm_download_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&bytes_wasted_) -
      reinterpret_cast<char*>(&ukm_download_id_)) + sizeof(bytes_wasted_));
}

DownloadEntry::~DownloadEntry() {
  // @@protoc_insertion_point(destructor:download_pb.DownloadEntry)
  SharedDtor();
}

void DownloadEntry::SharedDtor() {
  guid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  request_origin_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void DownloadEntry::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const DownloadEntry& DownloadEntry::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

DownloadEntry* DownloadEntry::New(::google::protobuf::Arena* arena) const {
  DownloadEntry* n = new DownloadEntry;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DownloadEntry::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.DownloadEntry)
  request_headers_.Clear();
  if (_has_bits_[0 / 32] & 3u) {
    if (has_guid()) {
      GOOGLE_DCHECK(!guid_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*guid_.UnsafeRawStringPointer())->clear();
    }
    if (has_request_origin()) {
      GOOGLE_DCHECK(!request_origin_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*request_origin_.UnsafeRawStringPointer())->clear();
    }
  }
  if (_has_bits_[0 / 32] & 60u) {
    ::memset(&ukm_download_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&bytes_wasted_) -
        reinterpret_cast<char*>(&ukm_download_id_)) + sizeof(bytes_wasted_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool DownloadEntry::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.DownloadEntry)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string guid = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_guid()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string request_origin = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_request_origin()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .download_pb.DownloadSource download_source = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::download_pb::DownloadSource_IsValid(value)) {
            set_download_source(static_cast< ::download_pb::DownloadSource >(value));
          } else {
            unknown_fields_stream.WriteVarint32(24u);
            unknown_fields_stream.WriteVarint32(
                static_cast< ::google::protobuf::uint32>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 ukm_download_id = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(32u)) {
          set_has_ukm_download_id();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &ukm_download_id_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 bytes_wasted = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(40u)) {
          set_has_bytes_wasted();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &bytes_wasted_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool fetch_error_body = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u)) {
          set_has_fetch_error_body();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &fetch_error_body_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .download_pb.HttpRequestHeader request_headers = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_request_headers()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.DownloadEntry)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.DownloadEntry)
  return false;
#undef DO_
}

void DownloadEntry::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.DownloadEntry)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string guid = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->guid(), output);
  }

  // optional string request_origin = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->request_origin(), output);
  }

  // optional .download_pb.DownloadSource download_source = 3;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      3, this->download_source(), output);
  }

  // optional int64 ukm_download_id = 4;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->ukm_download_id(), output);
  }

  // optional int64 bytes_wasted = 5;
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(5, this->bytes_wasted(), output);
  }

  // optional bool fetch_error_body = 6;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->fetch_error_body(), output);
  }

  // repeated .download_pb.HttpRequestHeader request_headers = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->request_headers_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      7, this->request_headers(static_cast<int>(i)), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.DownloadEntry)
}

size_t DownloadEntry::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.DownloadEntry)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  // repeated .download_pb.HttpRequestHeader request_headers = 7;
  {
    unsigned int count = static_cast<unsigned int>(this->request_headers_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->request_headers(static_cast<int>(i)));
    }
  }

  if (_has_bits_[0 / 32] & 63u) {
    // optional string guid = 1;
    if (has_guid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->guid());
    }

    // optional string request_origin = 2;
    if (has_request_origin()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->request_origin());
    }

    // optional int64 ukm_download_id = 4;
    if (has_ukm_download_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->ukm_download_id());
    }

    // optional .download_pb.DownloadSource download_source = 3;
    if (has_download_source()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->download_source());
    }

    // optional bool fetch_error_body = 6;
    if (has_fetch_error_body()) {
      total_size += 1 + 1;
    }

    // optional int64 bytes_wasted = 5;
    if (has_bytes_wasted()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->bytes_wasted());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DownloadEntry::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const DownloadEntry*>(&from));
}

void DownloadEntry::MergeFrom(const DownloadEntry& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.DownloadEntry)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  request_headers_.MergeFrom(from.request_headers_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 63u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_guid();
      guid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.guid_);
    }
    if (cached_has_bits & 0x00000002u) {
      set_has_request_origin();
      request_origin_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.request_origin_);
    }
    if (cached_has_bits & 0x00000004u) {
      ukm_download_id_ = from.ukm_download_id_;
    }
    if (cached_has_bits & 0x00000008u) {
      download_source_ = from.download_source_;
    }
    if (cached_has_bits & 0x00000010u) {
      fetch_error_body_ = from.fetch_error_body_;
    }
    if (cached_has_bits & 0x00000020u) {
      bytes_wasted_ = from.bytes_wasted_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void DownloadEntry::CopyFrom(const DownloadEntry& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.DownloadEntry)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DownloadEntry::IsInitialized() const {
  return true;
}

void DownloadEntry::Swap(DownloadEntry* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DownloadEntry::InternalSwap(DownloadEntry* other) {
  request_headers_.InternalSwap(&other->request_headers_);
  guid_.Swap(&other->guid_);
  request_origin_.Swap(&other->request_origin_);
  std::swap(ukm_download_id_, other->ukm_download_id_);
  std::swap(download_source_, other->download_source_);
  std::swap(fetch_error_body_, other->fetch_error_body_);
  std::swap(bytes_wasted_, other->bytes_wasted_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string DownloadEntry::GetTypeName() const {
  return "download_pb.DownloadEntry";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DownloadEntry

// optional string guid = 1;
bool DownloadEntry::has_guid() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DownloadEntry::set_has_guid() {
  _has_bits_[0] |= 0x00000001u;
}
void DownloadEntry::clear_has_guid() {
  _has_bits_[0] &= ~0x00000001u;
}
void DownloadEntry::clear_guid() {
  guid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_guid();
}
const ::std::string& DownloadEntry::guid() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.guid)
  return guid_.GetNoArena();
}
void DownloadEntry::set_guid(const ::std::string& value) {
  set_has_guid();
  guid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.DownloadEntry.guid)
}
#if LANG_CXX11
void DownloadEntry::set_guid(::std::string&& value) {
  set_has_guid();
  guid_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.DownloadEntry.guid)
}
#endif
void DownloadEntry::set_guid(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_guid();
  guid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.DownloadEntry.guid)
}
void DownloadEntry::set_guid(const char* value, size_t size) {
  set_has_guid();
  guid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.DownloadEntry.guid)
}
::std::string* DownloadEntry::mutable_guid() {
  set_has_guid();
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadEntry.guid)
  return guid_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* DownloadEntry::release_guid() {
  // @@protoc_insertion_point(field_release:download_pb.DownloadEntry.guid)
  clear_has_guid();
  return guid_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DownloadEntry::set_allocated_guid(::std::string* guid) {
  if (guid != NULL) {
    set_has_guid();
  } else {
    clear_has_guid();
  }
  guid_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), guid);
  // @@protoc_insertion_point(field_set_allocated:download_pb.DownloadEntry.guid)
}

// optional string request_origin = 2;
bool DownloadEntry::has_request_origin() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void DownloadEntry::set_has_request_origin() {
  _has_bits_[0] |= 0x00000002u;
}
void DownloadEntry::clear_has_request_origin() {
  _has_bits_[0] &= ~0x00000002u;
}
void DownloadEntry::clear_request_origin() {
  request_origin_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_request_origin();
}
const ::std::string& DownloadEntry::request_origin() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.request_origin)
  return request_origin_.GetNoArena();
}
void DownloadEntry::set_request_origin(const ::std::string& value) {
  set_has_request_origin();
  request_origin_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.DownloadEntry.request_origin)
}
#if LANG_CXX11
void DownloadEntry::set_request_origin(::std::string&& value) {
  set_has_request_origin();
  request_origin_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.DownloadEntry.request_origin)
}
#endif
void DownloadEntry::set_request_origin(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_request_origin();
  request_origin_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.DownloadEntry.request_origin)
}
void DownloadEntry::set_request_origin(const char* value, size_t size) {
  set_has_request_origin();
  request_origin_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.DownloadEntry.request_origin)
}
::std::string* DownloadEntry::mutable_request_origin() {
  set_has_request_origin();
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadEntry.request_origin)
  return request_origin_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* DownloadEntry::release_request_origin() {
  // @@protoc_insertion_point(field_release:download_pb.DownloadEntry.request_origin)
  clear_has_request_origin();
  return request_origin_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DownloadEntry::set_allocated_request_origin(::std::string* request_origin) {
  if (request_origin != NULL) {
    set_has_request_origin();
  } else {
    clear_has_request_origin();
  }
  request_origin_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), request_origin);
  // @@protoc_insertion_point(field_set_allocated:download_pb.DownloadEntry.request_origin)
}

// optional .download_pb.DownloadSource download_source = 3;
bool DownloadEntry::has_download_source() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void DownloadEntry::set_has_download_source() {
  _has_bits_[0] |= 0x00000008u;
}
void DownloadEntry::clear_has_download_source() {
  _has_bits_[0] &= ~0x00000008u;
}
void DownloadEntry::clear_download_source() {
  download_source_ = 0;
  clear_has_download_source();
}
::download_pb::DownloadSource DownloadEntry::download_source() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.download_source)
  return static_cast< ::download_pb::DownloadSource >(download_source_);
}
void DownloadEntry::set_download_source(::download_pb::DownloadSource value) {
  assert(::download_pb::DownloadSource_IsValid(value));
  set_has_download_source();
  download_source_ = value;
  // @@protoc_insertion_point(field_set:download_pb.DownloadEntry.download_source)
}

// optional int64 ukm_download_id = 4;
bool DownloadEntry::has_ukm_download_id() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void DownloadEntry::set_has_ukm_download_id() {
  _has_bits_[0] |= 0x00000004u;
}
void DownloadEntry::clear_has_ukm_download_id() {
  _has_bits_[0] &= ~0x00000004u;
}
void DownloadEntry::clear_ukm_download_id() {
  ukm_download_id_ = GOOGLE_LONGLONG(0);
  clear_has_ukm_download_id();
}
::google::protobuf::int64 DownloadEntry::ukm_download_id() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.ukm_download_id)
  return ukm_download_id_;
}
void DownloadEntry::set_ukm_download_id(::google::protobuf::int64 value) {
  set_has_ukm_download_id();
  ukm_download_id_ = value;
  // @@protoc_insertion_point(field_set:download_pb.DownloadEntry.ukm_download_id)
}

// optional int64 bytes_wasted = 5;
bool DownloadEntry::has_bytes_wasted() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void DownloadEntry::set_has_bytes_wasted() {
  _has_bits_[0] |= 0x00000020u;
}
void DownloadEntry::clear_has_bytes_wasted() {
  _has_bits_[0] &= ~0x00000020u;
}
void DownloadEntry::clear_bytes_wasted() {
  bytes_wasted_ = GOOGLE_LONGLONG(0);
  clear_has_bytes_wasted();
}
::google::protobuf::int64 DownloadEntry::bytes_wasted() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.bytes_wasted)
  return bytes_wasted_;
}
void DownloadEntry::set_bytes_wasted(::google::protobuf::int64 value) {
  set_has_bytes_wasted();
  bytes_wasted_ = value;
  // @@protoc_insertion_point(field_set:download_pb.DownloadEntry.bytes_wasted)
}

// optional bool fetch_error_body = 6;
bool DownloadEntry::has_fetch_error_body() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void DownloadEntry::set_has_fetch_error_body() {
  _has_bits_[0] |= 0x00000010u;
}
void DownloadEntry::clear_has_fetch_error_body() {
  _has_bits_[0] &= ~0x00000010u;
}
void DownloadEntry::clear_fetch_error_body() {
  fetch_error_body_ = false;
  clear_has_fetch_error_body();
}
bool DownloadEntry::fetch_error_body() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.fetch_error_body)
  return fetch_error_body_;
}
void DownloadEntry::set_fetch_error_body(bool value) {
  set_has_fetch_error_body();
  fetch_error_body_ = value;
  // @@protoc_insertion_point(field_set:download_pb.DownloadEntry.fetch_error_body)
}

// repeated .download_pb.HttpRequestHeader request_headers = 7;
int DownloadEntry::request_headers_size() const {
  return request_headers_.size();
}
void DownloadEntry::clear_request_headers() {
  request_headers_.Clear();
}
const ::download_pb::HttpRequestHeader& DownloadEntry::request_headers(int index) const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntry.request_headers)
  return request_headers_.Get(index);
}
::download_pb::HttpRequestHeader* DownloadEntry::mutable_request_headers(int index) {
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadEntry.request_headers)
  return request_headers_.Mutable(index);
}
::download_pb::HttpRequestHeader* DownloadEntry::add_request_headers() {
  // @@protoc_insertion_point(field_add:download_pb.DownloadEntry.request_headers)
  return request_headers_.Add();
}
::google::protobuf::RepeatedPtrField< ::download_pb::HttpRequestHeader >*
DownloadEntry::mutable_request_headers() {
  // @@protoc_insertion_point(field_mutable_list:download_pb.DownloadEntry.request_headers)
  return &request_headers_;
}
const ::google::protobuf::RepeatedPtrField< ::download_pb::HttpRequestHeader >&
DownloadEntry::request_headers() const {
  // @@protoc_insertion_point(field_list:download_pb.DownloadEntry.request_headers)
  return request_headers_;
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DownloadEntries::kEntriesFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DownloadEntries::DownloadEntries()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.DownloadEntries)
}
DownloadEntries::DownloadEntries(const DownloadEntries& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      entries_(from.entries_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  // @@protoc_insertion_point(copy_constructor:download_pb.DownloadEntries)
}

void DownloadEntries::SharedCtor() {
  _cached_size_ = 0;
}

DownloadEntries::~DownloadEntries() {
  // @@protoc_insertion_point(destructor:download_pb.DownloadEntries)
  SharedDtor();
}

void DownloadEntries::SharedDtor() {
}

void DownloadEntries::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const DownloadEntries& DownloadEntries::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

DownloadEntries* DownloadEntries::New(::google::protobuf::Arena* arena) const {
  DownloadEntries* n = new DownloadEntries;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DownloadEntries::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.DownloadEntries)
  entries_.Clear();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool DownloadEntries::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.DownloadEntries)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .download_pb.DownloadEntry entries = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_entries()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.DownloadEntries)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.DownloadEntries)
  return false;
#undef DO_
}

void DownloadEntries::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.DownloadEntries)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .download_pb.DownloadEntry entries = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->entries_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      1, this->entries(static_cast<int>(i)), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.DownloadEntries)
}

size_t DownloadEntries::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.DownloadEntries)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  // repeated .download_pb.DownloadEntry entries = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->entries_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->entries(static_cast<int>(i)));
    }
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DownloadEntries::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const DownloadEntries*>(&from));
}

void DownloadEntries::MergeFrom(const DownloadEntries& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.DownloadEntries)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  entries_.MergeFrom(from.entries_);
}

void DownloadEntries::CopyFrom(const DownloadEntries& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.DownloadEntries)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DownloadEntries::IsInitialized() const {
  return true;
}

void DownloadEntries::Swap(DownloadEntries* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DownloadEntries::InternalSwap(DownloadEntries* other) {
  entries_.InternalSwap(&other->entries_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string DownloadEntries::GetTypeName() const {
  return "download_pb.DownloadEntries";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DownloadEntries

// repeated .download_pb.DownloadEntry entries = 1;
int DownloadEntries::entries_size() const {
  return entries_.size();
}
void DownloadEntries::clear_entries() {
  entries_.Clear();
}
const ::download_pb::DownloadEntry& DownloadEntries::entries(int index) const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadEntries.entries)
  return entries_.Get(index);
}
::download_pb::DownloadEntry* DownloadEntries::mutable_entries(int index) {
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadEntries.entries)
  return entries_.Mutable(index);
}
::download_pb::DownloadEntry* DownloadEntries::add_entries() {
  // @@protoc_insertion_point(field_add:download_pb.DownloadEntries.entries)
  return entries_.Add();
}
::google::protobuf::RepeatedPtrField< ::download_pb::DownloadEntry >*
DownloadEntries::mutable_entries() {
  // @@protoc_insertion_point(field_mutable_list:download_pb.DownloadEntries.entries)
  return &entries_;
}
const ::google::protobuf::RepeatedPtrField< ::download_pb::DownloadEntry >&
DownloadEntries::entries() const {
  // @@protoc_insertion_point(field_list:download_pb.DownloadEntries.entries)
  return entries_;
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int UkmInfo::kDownloadSourceFieldNumber;
const int UkmInfo::kUkmDownloadIdFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

UkmInfo::UkmInfo()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.UkmInfo)
}
UkmInfo::UkmInfo(const UkmInfo& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&ukm_download_id_, &from.ukm_download_id_,
    static_cast<size_t>(reinterpret_cast<char*>(&download_source_) -
    reinterpret_cast<char*>(&ukm_download_id_)) + sizeof(download_source_));
  // @@protoc_insertion_point(copy_constructor:download_pb.UkmInfo)
}

void UkmInfo::SharedCtor() {
  _cached_size_ = 0;
  ::memset(&ukm_download_id_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&download_source_) -
      reinterpret_cast<char*>(&ukm_download_id_)) + sizeof(download_source_));
}

UkmInfo::~UkmInfo() {
  // @@protoc_insertion_point(destructor:download_pb.UkmInfo)
  SharedDtor();
}

void UkmInfo::SharedDtor() {
}

void UkmInfo::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const UkmInfo& UkmInfo::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

UkmInfo* UkmInfo::New(::google::protobuf::Arena* arena) const {
  UkmInfo* n = new UkmInfo;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void UkmInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.UkmInfo)
  if (_has_bits_[0 / 32] & 3u) {
    ::memset(&ukm_download_id_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&download_source_) -
        reinterpret_cast<char*>(&ukm_download_id_)) + sizeof(download_source_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool UkmInfo::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.UkmInfo)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .download_pb.DownloadSource download_source = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(8u)) {
          int value;
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                 input, &value)));
          if (::download_pb::DownloadSource_IsValid(value)) {
            set_download_source(static_cast< ::download_pb::DownloadSource >(value));
          } else {
            unknown_fields_stream.WriteVarint32(8u);
            unknown_fields_stream.WriteVarint32(
                static_cast< ::google::protobuf::uint32>(value));
          }
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 ukm_download_id = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u)) {
          set_has_ukm_download_id();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &ukm_download_id_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.UkmInfo)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.UkmInfo)
  return false;
#undef DO_
}

void UkmInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.UkmInfo)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional .download_pb.DownloadSource download_source = 1;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteEnum(
      1, this->download_source(), output);
  }

  // optional int64 ukm_download_id = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(2, this->ukm_download_id(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.UkmInfo)
}

size_t UkmInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.UkmInfo)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  if (_has_bits_[0 / 32] & 3u) {
    // optional int64 ukm_download_id = 2;
    if (has_ukm_download_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->ukm_download_id());
    }

    // optional .download_pb.DownloadSource download_source = 1;
    if (has_download_source()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::EnumSize(this->download_source());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void UkmInfo::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const UkmInfo*>(&from));
}

void UkmInfo::MergeFrom(const UkmInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.UkmInfo)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      ukm_download_id_ = from.ukm_download_id_;
    }
    if (cached_has_bits & 0x00000002u) {
      download_source_ = from.download_source_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void UkmInfo::CopyFrom(const UkmInfo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.UkmInfo)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool UkmInfo::IsInitialized() const {
  return true;
}

void UkmInfo::Swap(UkmInfo* other) {
  if (other == this) return;
  InternalSwap(other);
}
void UkmInfo::InternalSwap(UkmInfo* other) {
  std::swap(ukm_download_id_, other->ukm_download_id_);
  std::swap(download_source_, other->download_source_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string UkmInfo::GetTypeName() const {
  return "download_pb.UkmInfo";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// UkmInfo

// optional .download_pb.DownloadSource download_source = 1;
bool UkmInfo::has_download_source() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void UkmInfo::set_has_download_source() {
  _has_bits_[0] |= 0x00000002u;
}
void UkmInfo::clear_has_download_source() {
  _has_bits_[0] &= ~0x00000002u;
}
void UkmInfo::clear_download_source() {
  download_source_ = 0;
  clear_has_download_source();
}
::download_pb::DownloadSource UkmInfo::download_source() const {
  // @@protoc_insertion_point(field_get:download_pb.UkmInfo.download_source)
  return static_cast< ::download_pb::DownloadSource >(download_source_);
}
void UkmInfo::set_download_source(::download_pb::DownloadSource value) {
  assert(::download_pb::DownloadSource_IsValid(value));
  set_has_download_source();
  download_source_ = value;
  // @@protoc_insertion_point(field_set:download_pb.UkmInfo.download_source)
}

// optional int64 ukm_download_id = 2;
bool UkmInfo::has_ukm_download_id() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void UkmInfo::set_has_ukm_download_id() {
  _has_bits_[0] |= 0x00000001u;
}
void UkmInfo::clear_has_ukm_download_id() {
  _has_bits_[0] &= ~0x00000001u;
}
void UkmInfo::clear_ukm_download_id() {
  ukm_download_id_ = GOOGLE_LONGLONG(0);
  clear_has_ukm_download_id();
}
::google::protobuf::int64 UkmInfo::ukm_download_id() const {
  // @@protoc_insertion_point(field_get:download_pb.UkmInfo.ukm_download_id)
  return ukm_download_id_;
}
void UkmInfo::set_ukm_download_id(::google::protobuf::int64 value) {
  set_has_ukm_download_id();
  ukm_download_id_ = value;
  // @@protoc_insertion_point(field_set:download_pb.UkmInfo.ukm_download_id)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int InProgressInfo::kUrlChainFieldNumber;
const int InProgressInfo::kReferrerUrlFieldNumber;
const int InProgressInfo::kSiteUrlFieldNumber;
const int InProgressInfo::kTabUrlFieldNumber;
const int InProgressInfo::kTabReferrerUrlFieldNumber;
const int InProgressInfo::kFetchErrorBodyFieldNumber;
const int InProgressInfo::kRequestHeadersFieldNumber;
const int InProgressInfo::kEtagFieldNumber;
const int InProgressInfo::kLastModifiedFieldNumber;
const int InProgressInfo::kTotalBytesFieldNumber;
const int InProgressInfo::kMimeTypeFieldNumber;
const int InProgressInfo::kOriginalMimeTypeFieldNumber;
const int InProgressInfo::kCurrentPathFieldNumber;
const int InProgressInfo::kTargetPathFieldNumber;
const int InProgressInfo::kReceivedBytesFieldNumber;
const int InProgressInfo::kStartTimeFieldNumber;
const int InProgressInfo::kEndTimeFieldNumber;
const int InProgressInfo::kReceivedSlicesFieldNumber;
const int InProgressInfo::kHashFieldNumber;
const int InProgressInfo::kTransientFieldNumber;
const int InProgressInfo::kStateFieldNumber;
const int InProgressInfo::kDangerTypeFieldNumber;
const int InProgressInfo::kInterruptReasonFieldNumber;
const int InProgressInfo::kPausedFieldNumber;
const int InProgressInfo::kMeteredFieldNumber;
const int InProgressInfo::kBytesWastedFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

InProgressInfo::InProgressInfo()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.InProgressInfo)
}
InProgressInfo::InProgressInfo(const InProgressInfo& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0),
      url_chain_(from.url_chain_),
      request_headers_(from.request_headers_),
      received_slices_(from.received_slices_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  referrer_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_referrer_url()) {
    referrer_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.referrer_url_);
  }
  site_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_site_url()) {
    site_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.site_url_);
  }
  tab_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_tab_url()) {
    tab_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.tab_url_);
  }
  tab_referrer_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_tab_referrer_url()) {
    tab_referrer_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.tab_referrer_url_);
  }
  etag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_etag()) {
    etag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.etag_);
  }
  last_modified_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_last_modified()) {
    last_modified_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.last_modified_);
  }
  mime_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_mime_type()) {
    mime_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mime_type_);
  }
  original_mime_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_original_mime_type()) {
    original_mime_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.original_mime_type_);
  }
  current_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_current_path()) {
    current_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_path_);
  }
  target_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_target_path()) {
    target_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target_path_);
  }
  hash_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_hash()) {
    hash_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hash_);
  }
  ::memcpy(&total_bytes_, &from.total_bytes_,
    static_cast<size_t>(reinterpret_cast<char*>(&bytes_wasted_) -
    reinterpret_cast<char*>(&total_bytes_)) + sizeof(bytes_wasted_));
  // @@protoc_insertion_point(copy_constructor:download_pb.InProgressInfo)
}

void InProgressInfo::SharedCtor() {
  _cached_size_ = 0;
  referrer_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  site_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  tab_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  tab_referrer_url_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  etag_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  last_modified_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mime_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  original_mime_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  current_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  target_path_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  hash_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&total_bytes_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&bytes_wasted_) -
      reinterpret_cast<char*>(&total_bytes_)) + sizeof(bytes_wasted_));
}

InProgressInfo::~InProgressInfo() {
  // @@protoc_insertion_point(destructor:download_pb.InProgressInfo)
  SharedDtor();
}

void InProgressInfo::SharedDtor() {
  referrer_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  site_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  tab_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  tab_referrer_url_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  etag_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  last_modified_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  mime_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  original_mime_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  current_path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  target_path_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  hash_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void InProgressInfo::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const InProgressInfo& InProgressInfo::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

InProgressInfo* InProgressInfo::New(::google::protobuf::Arena* arena) const {
  InProgressInfo* n = new InProgressInfo;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void InProgressInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.InProgressInfo)
  url_chain_.Clear();
  request_headers_.Clear();
  received_slices_.Clear();
  if (_has_bits_[0 / 32] & 255u) {
    if (has_referrer_url()) {
      GOOGLE_DCHECK(!referrer_url_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*referrer_url_.UnsafeRawStringPointer())->clear();
    }
    if (has_site_url()) {
      GOOGLE_DCHECK(!site_url_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*site_url_.UnsafeRawStringPointer())->clear();
    }
    if (has_tab_url()) {
      GOOGLE_DCHECK(!tab_url_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*tab_url_.UnsafeRawStringPointer())->clear();
    }
    if (has_tab_referrer_url()) {
      GOOGLE_DCHECK(!tab_referrer_url_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*tab_referrer_url_.UnsafeRawStringPointer())->clear();
    }
    if (has_etag()) {
      GOOGLE_DCHECK(!etag_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*etag_.UnsafeRawStringPointer())->clear();
    }
    if (has_last_modified()) {
      GOOGLE_DCHECK(!last_modified_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*last_modified_.UnsafeRawStringPointer())->clear();
    }
    if (has_mime_type()) {
      GOOGLE_DCHECK(!mime_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*mime_type_.UnsafeRawStringPointer())->clear();
    }
    if (has_original_mime_type()) {
      GOOGLE_DCHECK(!original_mime_type_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*original_mime_type_.UnsafeRawStringPointer())->clear();
    }
  }
  if (_has_bits_[8 / 32] & 1792u) {
    if (has_current_path()) {
      GOOGLE_DCHECK(!current_path_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*current_path_.UnsafeRawStringPointer())->clear();
    }
    if (has_target_path()) {
      GOOGLE_DCHECK(!target_path_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*target_path_.UnsafeRawStringPointer())->clear();
    }
    if (has_hash()) {
      GOOGLE_DCHECK(!hash_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*hash_.UnsafeRawStringPointer())->clear();
    }
  }
  if (_has_bits_[8 / 32] & 63488u) {
    ::memset(&total_bytes_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&fetch_error_body_) -
        reinterpret_cast<char*>(&total_bytes_)) + sizeof(fetch_error_body_));
  }
  if (_has_bits_[16 / 32] & 8323072u) {
    ::memset(&transient_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&bytes_wasted_) -
        reinterpret_cast<char*>(&transient_)) + sizeof(bytes_wasted_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool InProgressInfo::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.InProgressInfo)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(16383u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated string url_chain = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_url_chain()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string referrer_url = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_referrer_url()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string site_url = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_site_url()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string tab_url = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_tab_url()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string tab_referrer_url = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_tab_referrer_url()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool fetch_error_body = 6;
      case 6: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(48u)) {
          set_has_fetch_error_body();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &fetch_error_body_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .download_pb.HttpRequestHeader request_headers = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_request_headers()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string etag = 8;
      case 8: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(66u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_etag()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string last_modified = 9;
      case 9: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(74u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_last_modified()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 total_bytes = 10;
      case 10: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(80u)) {
          set_has_total_bytes();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &total_bytes_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string mime_type = 11;
      case 11: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(90u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_mime_type()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string original_mime_type = 12;
      case 12: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(98u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_original_mime_type()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes current_path = 13;
      case 13: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(106u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_current_path()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bytes target_path = 14;
      case 14: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(114u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadBytes(
                input, this->mutable_target_path()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 received_bytes = 15;
      case 15: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(120u)) {
          set_has_received_bytes();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &received_bytes_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 start_time = 16;
      case 16: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(128u)) {
          set_has_start_time();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &start_time_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 end_time = 17;
      case 17: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(136u)) {
          set_has_end_time();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &end_time_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .download_pb.ReceivedSlice received_slices = 18;
      case 18: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(146u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                input, add_received_slices()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string hash = 19;
      case 19: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(154u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_hash()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool transient = 20;
      case 20: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(160u)) {
          set_has_transient();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &transient_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 state = 21;
      case 21: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(168u)) {
          set_has_state();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &state_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 danger_type = 22;
      case 22: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(176u)) {
          set_has_danger_type();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &danger_type_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 interrupt_reason = 23;
      case 23: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(184u)) {
          set_has_interrupt_reason();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &interrupt_reason_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool paused = 24;
      case 24: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(192u)) {
          set_has_paused();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &paused_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional bool metered = 25;
      case 25: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(200u)) {
          set_has_metered();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                 input, &metered_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 bytes_wasted = 26;
      case 26: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(208u)) {
          set_has_bytes_wasted();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &bytes_wasted_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.InProgressInfo)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.InProgressInfo)
  return false;
#undef DO_
}

void InProgressInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.InProgressInfo)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated string url_chain = 1;
  for (int i = 0, n = this->url_chain_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteString(
      1, this->url_chain(i), output);
  }

  cached_has_bits = _has_bits_[0];
  // optional string referrer_url = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->referrer_url(), output);
  }

  // optional string site_url = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->site_url(), output);
  }

  // optional string tab_url = 4;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      4, this->tab_url(), output);
  }

  // optional string tab_referrer_url = 5;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      5, this->tab_referrer_url(), output);
  }

  // optional bool fetch_error_body = 6;
  if (cached_has_bits & 0x00008000u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->fetch_error_body(), output);
  }

  // repeated .download_pb.HttpRequestHeader request_headers = 7;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->request_headers_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      7, this->request_headers(static_cast<int>(i)), output);
  }

  // optional string etag = 8;
  if (cached_has_bits & 0x00000010u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      8, this->etag(), output);
  }

  // optional string last_modified = 9;
  if (cached_has_bits & 0x00000020u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      9, this->last_modified(), output);
  }

  // optional int64 total_bytes = 10;
  if (cached_has_bits & 0x00000800u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(10, this->total_bytes(), output);
  }

  // optional string mime_type = 11;
  if (cached_has_bits & 0x00000040u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      11, this->mime_type(), output);
  }

  // optional string original_mime_type = 12;
  if (cached_has_bits & 0x00000080u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      12, this->original_mime_type(), output);
  }

  // optional bytes current_path = 13;
  if (cached_has_bits & 0x00000100u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      13, this->current_path(), output);
  }

  // optional bytes target_path = 14;
  if (cached_has_bits & 0x00000200u) {
    ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(
      14, this->target_path(), output);
  }

  // optional int64 received_bytes = 15;
  if (cached_has_bits & 0x00001000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(15, this->received_bytes(), output);
  }

  // optional int64 start_time = 16;
  if (cached_has_bits & 0x00002000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(16, this->start_time(), output);
  }

  // optional int64 end_time = 17;
  if (cached_has_bits & 0x00004000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(17, this->end_time(), output);
  }

  // repeated .download_pb.ReceivedSlice received_slices = 18;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->received_slices_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      18, this->received_slices(static_cast<int>(i)), output);
  }

  // optional string hash = 19;
  if (cached_has_bits & 0x00000400u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      19, this->hash(), output);
  }

  // optional bool transient = 20;
  if (cached_has_bits & 0x00010000u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(20, this->transient(), output);
  }

  // optional int32 state = 21;
  if (cached_has_bits & 0x00080000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(21, this->state(), output);
  }

  // optional int32 danger_type = 22;
  if (cached_has_bits & 0x00100000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(22, this->danger_type(), output);
  }

  // optional int32 interrupt_reason = 23;
  if (cached_has_bits & 0x00200000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(23, this->interrupt_reason(), output);
  }

  // optional bool paused = 24;
  if (cached_has_bits & 0x00020000u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(24, this->paused(), output);
  }

  // optional bool metered = 25;
  if (cached_has_bits & 0x00040000u) {
    ::google::protobuf::internal::WireFormatLite::WriteBool(25, this->metered(), output);
  }

  // optional int64 bytes_wasted = 26;
  if (cached_has_bits & 0x00400000u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(26, this->bytes_wasted(), output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.InProgressInfo)
}

size_t InProgressInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.InProgressInfo)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  // repeated string url_chain = 1;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->url_chain_size());
  for (int i = 0, n = this->url_chain_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->url_chain(i));
  }

  // repeated .download_pb.HttpRequestHeader request_headers = 7;
  {
    unsigned int count = static_cast<unsigned int>(this->request_headers_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->request_headers(static_cast<int>(i)));
    }
  }

  // repeated .download_pb.ReceivedSlice received_slices = 18;
  {
    unsigned int count = static_cast<unsigned int>(this->received_slices_size());
    total_size += 2UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          this->received_slices(static_cast<int>(i)));
    }
  }

  if (_has_bits_[0 / 32] & 255u) {
    // optional string referrer_url = 2;
    if (has_referrer_url()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->referrer_url());
    }

    // optional string site_url = 3;
    if (has_site_url()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->site_url());
    }

    // optional string tab_url = 4;
    if (has_tab_url()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->tab_url());
    }

    // optional string tab_referrer_url = 5;
    if (has_tab_referrer_url()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->tab_referrer_url());
    }

    // optional string etag = 8;
    if (has_etag()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->etag());
    }

    // optional string last_modified = 9;
    if (has_last_modified()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->last_modified());
    }

    // optional string mime_type = 11;
    if (has_mime_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->mime_type());
    }

    // optional string original_mime_type = 12;
    if (has_original_mime_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->original_mime_type());
    }

  }
  if (_has_bits_[8 / 32] & 65280u) {
    // optional bytes current_path = 13;
    if (has_current_path()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->current_path());
    }

    // optional bytes target_path = 14;
    if (has_target_path()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::BytesSize(
          this->target_path());
    }

    // optional string hash = 19;
    if (has_hash()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->hash());
    }

    // optional int64 total_bytes = 10;
    if (has_total_bytes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->total_bytes());
    }

    // optional int64 received_bytes = 15;
    if (has_received_bytes()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->received_bytes());
    }

    // optional int64 start_time = 16;
    if (has_start_time()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->start_time());
    }

    // optional int64 end_time = 17;
    if (has_end_time()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->end_time());
    }

    // optional bool fetch_error_body = 6;
    if (has_fetch_error_body()) {
      total_size += 1 + 1;
    }

  }
  if (_has_bits_[16 / 32] & 8323072u) {
    // optional bool transient = 20;
    if (has_transient()) {
      total_size += 2 + 1;
    }

    // optional bool paused = 24;
    if (has_paused()) {
      total_size += 2 + 1;
    }

    // optional bool metered = 25;
    if (has_metered()) {
      total_size += 2 + 1;
    }

    // optional int32 state = 21;
    if (has_state()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->state());
    }

    // optional int32 danger_type = 22;
    if (has_danger_type()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->danger_type());
    }

    // optional int32 interrupt_reason = 23;
    if (has_interrupt_reason()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->interrupt_reason());
    }

    // optional int64 bytes_wasted = 26;
    if (has_bytes_wasted()) {
      total_size += 2 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->bytes_wasted());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void InProgressInfo::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const InProgressInfo*>(&from));
}

void InProgressInfo::MergeFrom(const InProgressInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.InProgressInfo)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  url_chain_.MergeFrom(from.url_chain_);
  request_headers_.MergeFrom(from.request_headers_);
  received_slices_.MergeFrom(from.received_slices_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 255u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_referrer_url();
      referrer_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.referrer_url_);
    }
    if (cached_has_bits & 0x00000002u) {
      set_has_site_url();
      site_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.site_url_);
    }
    if (cached_has_bits & 0x00000004u) {
      set_has_tab_url();
      tab_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.tab_url_);
    }
    if (cached_has_bits & 0x00000008u) {
      set_has_tab_referrer_url();
      tab_referrer_url_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.tab_referrer_url_);
    }
    if (cached_has_bits & 0x00000010u) {
      set_has_etag();
      etag_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.etag_);
    }
    if (cached_has_bits & 0x00000020u) {
      set_has_last_modified();
      last_modified_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.last_modified_);
    }
    if (cached_has_bits & 0x00000040u) {
      set_has_mime_type();
      mime_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.mime_type_);
    }
    if (cached_has_bits & 0x00000080u) {
      set_has_original_mime_type();
      original_mime_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.original_mime_type_);
    }
  }
  if (cached_has_bits & 65280u) {
    if (cached_has_bits & 0x00000100u) {
      set_has_current_path();
      current_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.current_path_);
    }
    if (cached_has_bits & 0x00000200u) {
      set_has_target_path();
      target_path_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.target_path_);
    }
    if (cached_has_bits & 0x00000400u) {
      set_has_hash();
      hash_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.hash_);
    }
    if (cached_has_bits & 0x00000800u) {
      total_bytes_ = from.total_bytes_;
    }
    if (cached_has_bits & 0x00001000u) {
      received_bytes_ = from.received_bytes_;
    }
    if (cached_has_bits & 0x00002000u) {
      start_time_ = from.start_time_;
    }
    if (cached_has_bits & 0x00004000u) {
      end_time_ = from.end_time_;
    }
    if (cached_has_bits & 0x00008000u) {
      fetch_error_body_ = from.fetch_error_body_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
  if (cached_has_bits & 8323072u) {
    if (cached_has_bits & 0x00010000u) {
      transient_ = from.transient_;
    }
    if (cached_has_bits & 0x00020000u) {
      paused_ = from.paused_;
    }
    if (cached_has_bits & 0x00040000u) {
      metered_ = from.metered_;
    }
    if (cached_has_bits & 0x00080000u) {
      state_ = from.state_;
    }
    if (cached_has_bits & 0x00100000u) {
      danger_type_ = from.danger_type_;
    }
    if (cached_has_bits & 0x00200000u) {
      interrupt_reason_ = from.interrupt_reason_;
    }
    if (cached_has_bits & 0x00400000u) {
      bytes_wasted_ = from.bytes_wasted_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void InProgressInfo::CopyFrom(const InProgressInfo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.InProgressInfo)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool InProgressInfo::IsInitialized() const {
  return true;
}

void InProgressInfo::Swap(InProgressInfo* other) {
  if (other == this) return;
  InternalSwap(other);
}
void InProgressInfo::InternalSwap(InProgressInfo* other) {
  url_chain_.InternalSwap(&other->url_chain_);
  request_headers_.InternalSwap(&other->request_headers_);
  received_slices_.InternalSwap(&other->received_slices_);
  referrer_url_.Swap(&other->referrer_url_);
  site_url_.Swap(&other->site_url_);
  tab_url_.Swap(&other->tab_url_);
  tab_referrer_url_.Swap(&other->tab_referrer_url_);
  etag_.Swap(&other->etag_);
  last_modified_.Swap(&other->last_modified_);
  mime_type_.Swap(&other->mime_type_);
  original_mime_type_.Swap(&other->original_mime_type_);
  current_path_.Swap(&other->current_path_);
  target_path_.Swap(&other->target_path_);
  hash_.Swap(&other->hash_);
  std::swap(total_bytes_, other->total_bytes_);
  std::swap(received_bytes_, other->received_bytes_);
  std::swap(start_time_, other->start_time_);
  std::swap(end_time_, other->end_time_);
  std::swap(fetch_error_body_, other->fetch_error_body_);
  std::swap(transient_, other->transient_);
  std::swap(paused_, other->paused_);
  std::swap(metered_, other->metered_);
  std::swap(state_, other->state_);
  std::swap(danger_type_, other->danger_type_);
  std::swap(interrupt_reason_, other->interrupt_reason_);
  std::swap(bytes_wasted_, other->bytes_wasted_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string InProgressInfo::GetTypeName() const {
  return "download_pb.InProgressInfo";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// InProgressInfo

// repeated string url_chain = 1;
int InProgressInfo::url_chain_size() const {
  return url_chain_.size();
}
void InProgressInfo::clear_url_chain() {
  url_chain_.Clear();
}
const ::std::string& InProgressInfo::url_chain(int index) const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.url_chain)
  return url_chain_.Get(index);
}
::std::string* InProgressInfo::mutable_url_chain(int index) {
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.url_chain)
  return url_chain_.Mutable(index);
}
void InProgressInfo::set_url_chain(int index, const ::std::string& value) {
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.url_chain)
  url_chain_.Mutable(index)->assign(value);
}
#if LANG_CXX11
void InProgressInfo::set_url_chain(int index, ::std::string&& value) {
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.url_chain)
  url_chain_.Mutable(index)->assign(std::move(value));
}
#endif
void InProgressInfo::set_url_chain(int index, const char* value) {
  GOOGLE_DCHECK(value != NULL);
  url_chain_.Mutable(index)->assign(value);
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.url_chain)
}
void InProgressInfo::set_url_chain(int index, const char* value, size_t size) {
  url_chain_.Mutable(index)->assign(
    reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.url_chain)
}
::std::string* InProgressInfo::add_url_chain() {
  // @@protoc_insertion_point(field_add_mutable:download_pb.InProgressInfo.url_chain)
  return url_chain_.Add();
}
void InProgressInfo::add_url_chain(const ::std::string& value) {
  url_chain_.Add()->assign(value);
  // @@protoc_insertion_point(field_add:download_pb.InProgressInfo.url_chain)
}
#if LANG_CXX11
void InProgressInfo::add_url_chain(::std::string&& value) {
  url_chain_.Add(std::move(value));
  // @@protoc_insertion_point(field_add:download_pb.InProgressInfo.url_chain)
}
#endif
void InProgressInfo::add_url_chain(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  url_chain_.Add()->assign(value);
  // @@protoc_insertion_point(field_add_char:download_pb.InProgressInfo.url_chain)
}
void InProgressInfo::add_url_chain(const char* value, size_t size) {
  url_chain_.Add()->assign(reinterpret_cast<const char*>(value), size);
  // @@protoc_insertion_point(field_add_pointer:download_pb.InProgressInfo.url_chain)
}
const ::google::protobuf::RepeatedPtrField< ::std::string>&
InProgressInfo::url_chain() const {
  // @@protoc_insertion_point(field_list:download_pb.InProgressInfo.url_chain)
  return url_chain_;
}
::google::protobuf::RepeatedPtrField< ::std::string>*
InProgressInfo::mutable_url_chain() {
  // @@protoc_insertion_point(field_mutable_list:download_pb.InProgressInfo.url_chain)
  return &url_chain_;
}

// optional string referrer_url = 2;
bool InProgressInfo::has_referrer_url() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void InProgressInfo::set_has_referrer_url() {
  _has_bits_[0] |= 0x00000001u;
}
void InProgressInfo::clear_has_referrer_url() {
  _has_bits_[0] &= ~0x00000001u;
}
void InProgressInfo::clear_referrer_url() {
  referrer_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_referrer_url();
}
const ::std::string& InProgressInfo::referrer_url() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.referrer_url)
  return referrer_url_.GetNoArena();
}
void InProgressInfo::set_referrer_url(const ::std::string& value) {
  set_has_referrer_url();
  referrer_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.referrer_url)
}
#if LANG_CXX11
void InProgressInfo::set_referrer_url(::std::string&& value) {
  set_has_referrer_url();
  referrer_url_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.referrer_url)
}
#endif
void InProgressInfo::set_referrer_url(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_referrer_url();
  referrer_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.referrer_url)
}
void InProgressInfo::set_referrer_url(const char* value, size_t size) {
  set_has_referrer_url();
  referrer_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.referrer_url)
}
::std::string* InProgressInfo::mutable_referrer_url() {
  set_has_referrer_url();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.referrer_url)
  return referrer_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_referrer_url() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.referrer_url)
  clear_has_referrer_url();
  return referrer_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_referrer_url(::std::string* referrer_url) {
  if (referrer_url != NULL) {
    set_has_referrer_url();
  } else {
    clear_has_referrer_url();
  }
  referrer_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), referrer_url);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.referrer_url)
}

// optional string site_url = 3;
bool InProgressInfo::has_site_url() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void InProgressInfo::set_has_site_url() {
  _has_bits_[0] |= 0x00000002u;
}
void InProgressInfo::clear_has_site_url() {
  _has_bits_[0] &= ~0x00000002u;
}
void InProgressInfo::clear_site_url() {
  site_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_site_url();
}
const ::std::string& InProgressInfo::site_url() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.site_url)
  return site_url_.GetNoArena();
}
void InProgressInfo::set_site_url(const ::std::string& value) {
  set_has_site_url();
  site_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.site_url)
}
#if LANG_CXX11
void InProgressInfo::set_site_url(::std::string&& value) {
  set_has_site_url();
  site_url_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.site_url)
}
#endif
void InProgressInfo::set_site_url(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_site_url();
  site_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.site_url)
}
void InProgressInfo::set_site_url(const char* value, size_t size) {
  set_has_site_url();
  site_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.site_url)
}
::std::string* InProgressInfo::mutable_site_url() {
  set_has_site_url();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.site_url)
  return site_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_site_url() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.site_url)
  clear_has_site_url();
  return site_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_site_url(::std::string* site_url) {
  if (site_url != NULL) {
    set_has_site_url();
  } else {
    clear_has_site_url();
  }
  site_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), site_url);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.site_url)
}

// optional string tab_url = 4;
bool InProgressInfo::has_tab_url() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void InProgressInfo::set_has_tab_url() {
  _has_bits_[0] |= 0x00000004u;
}
void InProgressInfo::clear_has_tab_url() {
  _has_bits_[0] &= ~0x00000004u;
}
void InProgressInfo::clear_tab_url() {
  tab_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_tab_url();
}
const ::std::string& InProgressInfo::tab_url() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.tab_url)
  return tab_url_.GetNoArena();
}
void InProgressInfo::set_tab_url(const ::std::string& value) {
  set_has_tab_url();
  tab_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.tab_url)
}
#if LANG_CXX11
void InProgressInfo::set_tab_url(::std::string&& value) {
  set_has_tab_url();
  tab_url_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.tab_url)
}
#endif
void InProgressInfo::set_tab_url(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_tab_url();
  tab_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.tab_url)
}
void InProgressInfo::set_tab_url(const char* value, size_t size) {
  set_has_tab_url();
  tab_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.tab_url)
}
::std::string* InProgressInfo::mutable_tab_url() {
  set_has_tab_url();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.tab_url)
  return tab_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_tab_url() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.tab_url)
  clear_has_tab_url();
  return tab_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_tab_url(::std::string* tab_url) {
  if (tab_url != NULL) {
    set_has_tab_url();
  } else {
    clear_has_tab_url();
  }
  tab_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tab_url);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.tab_url)
}

// optional string tab_referrer_url = 5;
bool InProgressInfo::has_tab_referrer_url() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void InProgressInfo::set_has_tab_referrer_url() {
  _has_bits_[0] |= 0x00000008u;
}
void InProgressInfo::clear_has_tab_referrer_url() {
  _has_bits_[0] &= ~0x00000008u;
}
void InProgressInfo::clear_tab_referrer_url() {
  tab_referrer_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_tab_referrer_url();
}
const ::std::string& InProgressInfo::tab_referrer_url() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.tab_referrer_url)
  return tab_referrer_url_.GetNoArena();
}
void InProgressInfo::set_tab_referrer_url(const ::std::string& value) {
  set_has_tab_referrer_url();
  tab_referrer_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.tab_referrer_url)
}
#if LANG_CXX11
void InProgressInfo::set_tab_referrer_url(::std::string&& value) {
  set_has_tab_referrer_url();
  tab_referrer_url_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.tab_referrer_url)
}
#endif
void InProgressInfo::set_tab_referrer_url(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_tab_referrer_url();
  tab_referrer_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.tab_referrer_url)
}
void InProgressInfo::set_tab_referrer_url(const char* value, size_t size) {
  set_has_tab_referrer_url();
  tab_referrer_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.tab_referrer_url)
}
::std::string* InProgressInfo::mutable_tab_referrer_url() {
  set_has_tab_referrer_url();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.tab_referrer_url)
  return tab_referrer_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_tab_referrer_url() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.tab_referrer_url)
  clear_has_tab_referrer_url();
  return tab_referrer_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_tab_referrer_url(::std::string* tab_referrer_url) {
  if (tab_referrer_url != NULL) {
    set_has_tab_referrer_url();
  } else {
    clear_has_tab_referrer_url();
  }
  tab_referrer_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), tab_referrer_url);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.tab_referrer_url)
}

// optional bool fetch_error_body = 6;
bool InProgressInfo::has_fetch_error_body() const {
  return (_has_bits_[0] & 0x00008000u) != 0;
}
void InProgressInfo::set_has_fetch_error_body() {
  _has_bits_[0] |= 0x00008000u;
}
void InProgressInfo::clear_has_fetch_error_body() {
  _has_bits_[0] &= ~0x00008000u;
}
void InProgressInfo::clear_fetch_error_body() {
  fetch_error_body_ = false;
  clear_has_fetch_error_body();
}
bool InProgressInfo::fetch_error_body() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.fetch_error_body)
  return fetch_error_body_;
}
void InProgressInfo::set_fetch_error_body(bool value) {
  set_has_fetch_error_body();
  fetch_error_body_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.fetch_error_body)
}

// repeated .download_pb.HttpRequestHeader request_headers = 7;
int InProgressInfo::request_headers_size() const {
  return request_headers_.size();
}
void InProgressInfo::clear_request_headers() {
  request_headers_.Clear();
}
const ::download_pb::HttpRequestHeader& InProgressInfo::request_headers(int index) const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.request_headers)
  return request_headers_.Get(index);
}
::download_pb::HttpRequestHeader* InProgressInfo::mutable_request_headers(int index) {
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.request_headers)
  return request_headers_.Mutable(index);
}
::download_pb::HttpRequestHeader* InProgressInfo::add_request_headers() {
  // @@protoc_insertion_point(field_add:download_pb.InProgressInfo.request_headers)
  return request_headers_.Add();
}
::google::protobuf::RepeatedPtrField< ::download_pb::HttpRequestHeader >*
InProgressInfo::mutable_request_headers() {
  // @@protoc_insertion_point(field_mutable_list:download_pb.InProgressInfo.request_headers)
  return &request_headers_;
}
const ::google::protobuf::RepeatedPtrField< ::download_pb::HttpRequestHeader >&
InProgressInfo::request_headers() const {
  // @@protoc_insertion_point(field_list:download_pb.InProgressInfo.request_headers)
  return request_headers_;
}

// optional string etag = 8;
bool InProgressInfo::has_etag() const {
  return (_has_bits_[0] & 0x00000010u) != 0;
}
void InProgressInfo::set_has_etag() {
  _has_bits_[0] |= 0x00000010u;
}
void InProgressInfo::clear_has_etag() {
  _has_bits_[0] &= ~0x00000010u;
}
void InProgressInfo::clear_etag() {
  etag_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_etag();
}
const ::std::string& InProgressInfo::etag() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.etag)
  return etag_.GetNoArena();
}
void InProgressInfo::set_etag(const ::std::string& value) {
  set_has_etag();
  etag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.etag)
}
#if LANG_CXX11
void InProgressInfo::set_etag(::std::string&& value) {
  set_has_etag();
  etag_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.etag)
}
#endif
void InProgressInfo::set_etag(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_etag();
  etag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.etag)
}
void InProgressInfo::set_etag(const char* value, size_t size) {
  set_has_etag();
  etag_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.etag)
}
::std::string* InProgressInfo::mutable_etag() {
  set_has_etag();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.etag)
  return etag_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_etag() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.etag)
  clear_has_etag();
  return etag_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_etag(::std::string* etag) {
  if (etag != NULL) {
    set_has_etag();
  } else {
    clear_has_etag();
  }
  etag_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), etag);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.etag)
}

// optional string last_modified = 9;
bool InProgressInfo::has_last_modified() const {
  return (_has_bits_[0] & 0x00000020u) != 0;
}
void InProgressInfo::set_has_last_modified() {
  _has_bits_[0] |= 0x00000020u;
}
void InProgressInfo::clear_has_last_modified() {
  _has_bits_[0] &= ~0x00000020u;
}
void InProgressInfo::clear_last_modified() {
  last_modified_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_last_modified();
}
const ::std::string& InProgressInfo::last_modified() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.last_modified)
  return last_modified_.GetNoArena();
}
void InProgressInfo::set_last_modified(const ::std::string& value) {
  set_has_last_modified();
  last_modified_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.last_modified)
}
#if LANG_CXX11
void InProgressInfo::set_last_modified(::std::string&& value) {
  set_has_last_modified();
  last_modified_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.last_modified)
}
#endif
void InProgressInfo::set_last_modified(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_last_modified();
  last_modified_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.last_modified)
}
void InProgressInfo::set_last_modified(const char* value, size_t size) {
  set_has_last_modified();
  last_modified_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.last_modified)
}
::std::string* InProgressInfo::mutable_last_modified() {
  set_has_last_modified();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.last_modified)
  return last_modified_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_last_modified() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.last_modified)
  clear_has_last_modified();
  return last_modified_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_last_modified(::std::string* last_modified) {
  if (last_modified != NULL) {
    set_has_last_modified();
  } else {
    clear_has_last_modified();
  }
  last_modified_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), last_modified);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.last_modified)
}

// optional int64 total_bytes = 10;
bool InProgressInfo::has_total_bytes() const {
  return (_has_bits_[0] & 0x00000800u) != 0;
}
void InProgressInfo::set_has_total_bytes() {
  _has_bits_[0] |= 0x00000800u;
}
void InProgressInfo::clear_has_total_bytes() {
  _has_bits_[0] &= ~0x00000800u;
}
void InProgressInfo::clear_total_bytes() {
  total_bytes_ = GOOGLE_LONGLONG(0);
  clear_has_total_bytes();
}
::google::protobuf::int64 InProgressInfo::total_bytes() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.total_bytes)
  return total_bytes_;
}
void InProgressInfo::set_total_bytes(::google::protobuf::int64 value) {
  set_has_total_bytes();
  total_bytes_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.total_bytes)
}

// optional string mime_type = 11;
bool InProgressInfo::has_mime_type() const {
  return (_has_bits_[0] & 0x00000040u) != 0;
}
void InProgressInfo::set_has_mime_type() {
  _has_bits_[0] |= 0x00000040u;
}
void InProgressInfo::clear_has_mime_type() {
  _has_bits_[0] &= ~0x00000040u;
}
void InProgressInfo::clear_mime_type() {
  mime_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_mime_type();
}
const ::std::string& InProgressInfo::mime_type() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.mime_type)
  return mime_type_.GetNoArena();
}
void InProgressInfo::set_mime_type(const ::std::string& value) {
  set_has_mime_type();
  mime_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.mime_type)
}
#if LANG_CXX11
void InProgressInfo::set_mime_type(::std::string&& value) {
  set_has_mime_type();
  mime_type_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.mime_type)
}
#endif
void InProgressInfo::set_mime_type(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_mime_type();
  mime_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.mime_type)
}
void InProgressInfo::set_mime_type(const char* value, size_t size) {
  set_has_mime_type();
  mime_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.mime_type)
}
::std::string* InProgressInfo::mutable_mime_type() {
  set_has_mime_type();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.mime_type)
  return mime_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_mime_type() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.mime_type)
  clear_has_mime_type();
  return mime_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_mime_type(::std::string* mime_type) {
  if (mime_type != NULL) {
    set_has_mime_type();
  } else {
    clear_has_mime_type();
  }
  mime_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), mime_type);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.mime_type)
}

// optional string original_mime_type = 12;
bool InProgressInfo::has_original_mime_type() const {
  return (_has_bits_[0] & 0x00000080u) != 0;
}
void InProgressInfo::set_has_original_mime_type() {
  _has_bits_[0] |= 0x00000080u;
}
void InProgressInfo::clear_has_original_mime_type() {
  _has_bits_[0] &= ~0x00000080u;
}
void InProgressInfo::clear_original_mime_type() {
  original_mime_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_original_mime_type();
}
const ::std::string& InProgressInfo::original_mime_type() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.original_mime_type)
  return original_mime_type_.GetNoArena();
}
void InProgressInfo::set_original_mime_type(const ::std::string& value) {
  set_has_original_mime_type();
  original_mime_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.original_mime_type)
}
#if LANG_CXX11
void InProgressInfo::set_original_mime_type(::std::string&& value) {
  set_has_original_mime_type();
  original_mime_type_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.original_mime_type)
}
#endif
void InProgressInfo::set_original_mime_type(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_original_mime_type();
  original_mime_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.original_mime_type)
}
void InProgressInfo::set_original_mime_type(const char* value, size_t size) {
  set_has_original_mime_type();
  original_mime_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.original_mime_type)
}
::std::string* InProgressInfo::mutable_original_mime_type() {
  set_has_original_mime_type();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.original_mime_type)
  return original_mime_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_original_mime_type() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.original_mime_type)
  clear_has_original_mime_type();
  return original_mime_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_original_mime_type(::std::string* original_mime_type) {
  if (original_mime_type != NULL) {
    set_has_original_mime_type();
  } else {
    clear_has_original_mime_type();
  }
  original_mime_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), original_mime_type);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.original_mime_type)
}

// optional bytes current_path = 13;
bool InProgressInfo::has_current_path() const {
  return (_has_bits_[0] & 0x00000100u) != 0;
}
void InProgressInfo::set_has_current_path() {
  _has_bits_[0] |= 0x00000100u;
}
void InProgressInfo::clear_has_current_path() {
  _has_bits_[0] &= ~0x00000100u;
}
void InProgressInfo::clear_current_path() {
  current_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_current_path();
}
const ::std::string& InProgressInfo::current_path() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.current_path)
  return current_path_.GetNoArena();
}
void InProgressInfo::set_current_path(const ::std::string& value) {
  set_has_current_path();
  current_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.current_path)
}
#if LANG_CXX11
void InProgressInfo::set_current_path(::std::string&& value) {
  set_has_current_path();
  current_path_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.current_path)
}
#endif
void InProgressInfo::set_current_path(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_current_path();
  current_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.current_path)
}
void InProgressInfo::set_current_path(const void* value, size_t size) {
  set_has_current_path();
  current_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.current_path)
}
::std::string* InProgressInfo::mutable_current_path() {
  set_has_current_path();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.current_path)
  return current_path_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_current_path() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.current_path)
  clear_has_current_path();
  return current_path_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_current_path(::std::string* current_path) {
  if (current_path != NULL) {
    set_has_current_path();
  } else {
    clear_has_current_path();
  }
  current_path_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), current_path);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.current_path)
}

// optional bytes target_path = 14;
bool InProgressInfo::has_target_path() const {
  return (_has_bits_[0] & 0x00000200u) != 0;
}
void InProgressInfo::set_has_target_path() {
  _has_bits_[0] |= 0x00000200u;
}
void InProgressInfo::clear_has_target_path() {
  _has_bits_[0] &= ~0x00000200u;
}
void InProgressInfo::clear_target_path() {
  target_path_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_target_path();
}
const ::std::string& InProgressInfo::target_path() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.target_path)
  return target_path_.GetNoArena();
}
void InProgressInfo::set_target_path(const ::std::string& value) {
  set_has_target_path();
  target_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.target_path)
}
#if LANG_CXX11
void InProgressInfo::set_target_path(::std::string&& value) {
  set_has_target_path();
  target_path_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.target_path)
}
#endif
void InProgressInfo::set_target_path(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_target_path();
  target_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.target_path)
}
void InProgressInfo::set_target_path(const void* value, size_t size) {
  set_has_target_path();
  target_path_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.target_path)
}
::std::string* InProgressInfo::mutable_target_path() {
  set_has_target_path();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.target_path)
  return target_path_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_target_path() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.target_path)
  clear_has_target_path();
  return target_path_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_target_path(::std::string* target_path) {
  if (target_path != NULL) {
    set_has_target_path();
  } else {
    clear_has_target_path();
  }
  target_path_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), target_path);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.target_path)
}

// optional int64 received_bytes = 15;
bool InProgressInfo::has_received_bytes() const {
  return (_has_bits_[0] & 0x00001000u) != 0;
}
void InProgressInfo::set_has_received_bytes() {
  _has_bits_[0] |= 0x00001000u;
}
void InProgressInfo::clear_has_received_bytes() {
  _has_bits_[0] &= ~0x00001000u;
}
void InProgressInfo::clear_received_bytes() {
  received_bytes_ = GOOGLE_LONGLONG(0);
  clear_has_received_bytes();
}
::google::protobuf::int64 InProgressInfo::received_bytes() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.received_bytes)
  return received_bytes_;
}
void InProgressInfo::set_received_bytes(::google::protobuf::int64 value) {
  set_has_received_bytes();
  received_bytes_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.received_bytes)
}

// optional int64 start_time = 16;
bool InProgressInfo::has_start_time() const {
  return (_has_bits_[0] & 0x00002000u) != 0;
}
void InProgressInfo::set_has_start_time() {
  _has_bits_[0] |= 0x00002000u;
}
void InProgressInfo::clear_has_start_time() {
  _has_bits_[0] &= ~0x00002000u;
}
void InProgressInfo::clear_start_time() {
  start_time_ = GOOGLE_LONGLONG(0);
  clear_has_start_time();
}
::google::protobuf::int64 InProgressInfo::start_time() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.start_time)
  return start_time_;
}
void InProgressInfo::set_start_time(::google::protobuf::int64 value) {
  set_has_start_time();
  start_time_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.start_time)
}

// optional int64 end_time = 17;
bool InProgressInfo::has_end_time() const {
  return (_has_bits_[0] & 0x00004000u) != 0;
}
void InProgressInfo::set_has_end_time() {
  _has_bits_[0] |= 0x00004000u;
}
void InProgressInfo::clear_has_end_time() {
  _has_bits_[0] &= ~0x00004000u;
}
void InProgressInfo::clear_end_time() {
  end_time_ = GOOGLE_LONGLONG(0);
  clear_has_end_time();
}
::google::protobuf::int64 InProgressInfo::end_time() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.end_time)
  return end_time_;
}
void InProgressInfo::set_end_time(::google::protobuf::int64 value) {
  set_has_end_time();
  end_time_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.end_time)
}

// repeated .download_pb.ReceivedSlice received_slices = 18;
int InProgressInfo::received_slices_size() const {
  return received_slices_.size();
}
void InProgressInfo::clear_received_slices() {
  received_slices_.Clear();
}
const ::download_pb::ReceivedSlice& InProgressInfo::received_slices(int index) const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.received_slices)
  return received_slices_.Get(index);
}
::download_pb::ReceivedSlice* InProgressInfo::mutable_received_slices(int index) {
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.received_slices)
  return received_slices_.Mutable(index);
}
::download_pb::ReceivedSlice* InProgressInfo::add_received_slices() {
  // @@protoc_insertion_point(field_add:download_pb.InProgressInfo.received_slices)
  return received_slices_.Add();
}
::google::protobuf::RepeatedPtrField< ::download_pb::ReceivedSlice >*
InProgressInfo::mutable_received_slices() {
  // @@protoc_insertion_point(field_mutable_list:download_pb.InProgressInfo.received_slices)
  return &received_slices_;
}
const ::google::protobuf::RepeatedPtrField< ::download_pb::ReceivedSlice >&
InProgressInfo::received_slices() const {
  // @@protoc_insertion_point(field_list:download_pb.InProgressInfo.received_slices)
  return received_slices_;
}

// optional string hash = 19;
bool InProgressInfo::has_hash() const {
  return (_has_bits_[0] & 0x00000400u) != 0;
}
void InProgressInfo::set_has_hash() {
  _has_bits_[0] |= 0x00000400u;
}
void InProgressInfo::clear_has_hash() {
  _has_bits_[0] &= ~0x00000400u;
}
void InProgressInfo::clear_hash() {
  hash_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_hash();
}
const ::std::string& InProgressInfo::hash() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.hash)
  return hash_.GetNoArena();
}
void InProgressInfo::set_hash(const ::std::string& value) {
  set_has_hash();
  hash_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.hash)
}
#if LANG_CXX11
void InProgressInfo::set_hash(::std::string&& value) {
  set_has_hash();
  hash_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.InProgressInfo.hash)
}
#endif
void InProgressInfo::set_hash(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_hash();
  hash_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.InProgressInfo.hash)
}
void InProgressInfo::set_hash(const char* value, size_t size) {
  set_has_hash();
  hash_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.InProgressInfo.hash)
}
::std::string* InProgressInfo::mutable_hash() {
  set_has_hash();
  // @@protoc_insertion_point(field_mutable:download_pb.InProgressInfo.hash)
  return hash_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* InProgressInfo::release_hash() {
  // @@protoc_insertion_point(field_release:download_pb.InProgressInfo.hash)
  clear_has_hash();
  return hash_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void InProgressInfo::set_allocated_hash(::std::string* hash) {
  if (hash != NULL) {
    set_has_hash();
  } else {
    clear_has_hash();
  }
  hash_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), hash);
  // @@protoc_insertion_point(field_set_allocated:download_pb.InProgressInfo.hash)
}

// optional bool transient = 20;
bool InProgressInfo::has_transient() const {
  return (_has_bits_[0] & 0x00010000u) != 0;
}
void InProgressInfo::set_has_transient() {
  _has_bits_[0] |= 0x00010000u;
}
void InProgressInfo::clear_has_transient() {
  _has_bits_[0] &= ~0x00010000u;
}
void InProgressInfo::clear_transient() {
  transient_ = false;
  clear_has_transient();
}
bool InProgressInfo::transient() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.transient)
  return transient_;
}
void InProgressInfo::set_transient(bool value) {
  set_has_transient();
  transient_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.transient)
}

// optional int32 state = 21;
bool InProgressInfo::has_state() const {
  return (_has_bits_[0] & 0x00080000u) != 0;
}
void InProgressInfo::set_has_state() {
  _has_bits_[0] |= 0x00080000u;
}
void InProgressInfo::clear_has_state() {
  _has_bits_[0] &= ~0x00080000u;
}
void InProgressInfo::clear_state() {
  state_ = 0;
  clear_has_state();
}
::google::protobuf::int32 InProgressInfo::state() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.state)
  return state_;
}
void InProgressInfo::set_state(::google::protobuf::int32 value) {
  set_has_state();
  state_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.state)
}

// optional int32 danger_type = 22;
bool InProgressInfo::has_danger_type() const {
  return (_has_bits_[0] & 0x00100000u) != 0;
}
void InProgressInfo::set_has_danger_type() {
  _has_bits_[0] |= 0x00100000u;
}
void InProgressInfo::clear_has_danger_type() {
  _has_bits_[0] &= ~0x00100000u;
}
void InProgressInfo::clear_danger_type() {
  danger_type_ = 0;
  clear_has_danger_type();
}
::google::protobuf::int32 InProgressInfo::danger_type() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.danger_type)
  return danger_type_;
}
void InProgressInfo::set_danger_type(::google::protobuf::int32 value) {
  set_has_danger_type();
  danger_type_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.danger_type)
}

// optional int32 interrupt_reason = 23;
bool InProgressInfo::has_interrupt_reason() const {
  return (_has_bits_[0] & 0x00200000u) != 0;
}
void InProgressInfo::set_has_interrupt_reason() {
  _has_bits_[0] |= 0x00200000u;
}
void InProgressInfo::clear_has_interrupt_reason() {
  _has_bits_[0] &= ~0x00200000u;
}
void InProgressInfo::clear_interrupt_reason() {
  interrupt_reason_ = 0;
  clear_has_interrupt_reason();
}
::google::protobuf::int32 InProgressInfo::interrupt_reason() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.interrupt_reason)
  return interrupt_reason_;
}
void InProgressInfo::set_interrupt_reason(::google::protobuf::int32 value) {
  set_has_interrupt_reason();
  interrupt_reason_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.interrupt_reason)
}

// optional bool paused = 24;
bool InProgressInfo::has_paused() const {
  return (_has_bits_[0] & 0x00020000u) != 0;
}
void InProgressInfo::set_has_paused() {
  _has_bits_[0] |= 0x00020000u;
}
void InProgressInfo::clear_has_paused() {
  _has_bits_[0] &= ~0x00020000u;
}
void InProgressInfo::clear_paused() {
  paused_ = false;
  clear_has_paused();
}
bool InProgressInfo::paused() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.paused)
  return paused_;
}
void InProgressInfo::set_paused(bool value) {
  set_has_paused();
  paused_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.paused)
}

// optional bool metered = 25;
bool InProgressInfo::has_metered() const {
  return (_has_bits_[0] & 0x00040000u) != 0;
}
void InProgressInfo::set_has_metered() {
  _has_bits_[0] |= 0x00040000u;
}
void InProgressInfo::clear_has_metered() {
  _has_bits_[0] &= ~0x00040000u;
}
void InProgressInfo::clear_metered() {
  metered_ = false;
  clear_has_metered();
}
bool InProgressInfo::metered() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.metered)
  return metered_;
}
void InProgressInfo::set_metered(bool value) {
  set_has_metered();
  metered_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.metered)
}

// optional int64 bytes_wasted = 26;
bool InProgressInfo::has_bytes_wasted() const {
  return (_has_bits_[0] & 0x00400000u) != 0;
}
void InProgressInfo::set_has_bytes_wasted() {
  _has_bits_[0] |= 0x00400000u;
}
void InProgressInfo::clear_has_bytes_wasted() {
  _has_bits_[0] &= ~0x00400000u;
}
void InProgressInfo::clear_bytes_wasted() {
  bytes_wasted_ = GOOGLE_LONGLONG(0);
  clear_has_bytes_wasted();
}
::google::protobuf::int64 InProgressInfo::bytes_wasted() const {
  // @@protoc_insertion_point(field_get:download_pb.InProgressInfo.bytes_wasted)
  return bytes_wasted_;
}
void InProgressInfo::set_bytes_wasted(::google::protobuf::int64 value) {
  set_has_bytes_wasted();
  bytes_wasted_ = value;
  // @@protoc_insertion_point(field_set:download_pb.InProgressInfo.bytes_wasted)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DownloadInfo::kGuidFieldNumber;
const int DownloadInfo::kIdFieldNumber;
const int DownloadInfo::kUkmInfoFieldNumber;
const int DownloadInfo::kInProgressInfoFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DownloadInfo::DownloadInfo()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.DownloadInfo)
}
DownloadInfo::DownloadInfo(const DownloadInfo& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  guid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_guid()) {
    guid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.guid_);
  }
  if (from.has_ukm_info()) {
    ukm_info_ = new ::download_pb::UkmInfo(*from.ukm_info_);
  } else {
    ukm_info_ = NULL;
  }
  if (from.has_in_progress_info()) {
    in_progress_info_ = new ::download_pb::InProgressInfo(*from.in_progress_info_);
  } else {
    in_progress_info_ = NULL;
  }
  id_ = from.id_;
  // @@protoc_insertion_point(copy_constructor:download_pb.DownloadInfo)
}

void DownloadInfo::SharedCtor() {
  _cached_size_ = 0;
  guid_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&ukm_info_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&id_) -
      reinterpret_cast<char*>(&ukm_info_)) + sizeof(id_));
}

DownloadInfo::~DownloadInfo() {
  // @@protoc_insertion_point(destructor:download_pb.DownloadInfo)
  SharedDtor();
}

void DownloadInfo::SharedDtor() {
  guid_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) {
    delete ukm_info_;
  }
  if (this != internal_default_instance()) {
    delete in_progress_info_;
  }
}

void DownloadInfo::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const DownloadInfo& DownloadInfo::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

DownloadInfo* DownloadInfo::New(::google::protobuf::Arena* arena) const {
  DownloadInfo* n = new DownloadInfo;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DownloadInfo::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.DownloadInfo)
  if (_has_bits_[0 / 32] & 7u) {
    if (has_guid()) {
      GOOGLE_DCHECK(!guid_.IsDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()));
      (*guid_.UnsafeRawStringPointer())->clear();
    }
    if (has_ukm_info()) {
      GOOGLE_DCHECK(ukm_info_ != NULL);
      ukm_info_->::download_pb::UkmInfo::Clear();
    }
    if (has_in_progress_info()) {
      GOOGLE_DCHECK(in_progress_info_ != NULL);
      in_progress_info_->::download_pb::InProgressInfo::Clear();
    }
  }
  id_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool DownloadInfo::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.DownloadInfo)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string guid = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_guid()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int32 id = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(16u)) {
          set_has_id();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>(
                 input, &id_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .download_pb.UkmInfo ukm_info = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_ukm_info()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .download_pb.InProgressInfo in_progress_info = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_in_progress_info()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.DownloadInfo)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.DownloadInfo)
  return false;
#undef DO_
}

void DownloadInfo::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.DownloadInfo)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string guid = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->guid(), output);
  }

  // optional int32 id = 2;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->id(), output);
  }

  // optional .download_pb.UkmInfo ukm_info = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      3, *this->ukm_info_, output);
  }

  // optional .download_pb.InProgressInfo in_progress_info = 4;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      4, *this->in_progress_info_, output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.DownloadInfo)
}

size_t DownloadInfo::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.DownloadInfo)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  if (_has_bits_[0 / 32] & 15u) {
    // optional string guid = 1;
    if (has_guid()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->guid());
    }

    // optional .download_pb.UkmInfo ukm_info = 3;
    if (has_ukm_info()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->ukm_info_);
    }

    // optional .download_pb.InProgressInfo in_progress_info = 4;
    if (has_in_progress_info()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *this->in_progress_info_);
    }

    // optional int32 id = 2;
    if (has_id()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int32Size(
          this->id());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DownloadInfo::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const DownloadInfo*>(&from));
}

void DownloadInfo::MergeFrom(const DownloadInfo& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.DownloadInfo)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_guid();
      guid_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.guid_);
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_ukm_info()->::download_pb::UkmInfo::MergeFrom(from.ukm_info());
    }
    if (cached_has_bits & 0x00000004u) {
      mutable_in_progress_info()->::download_pb::InProgressInfo::MergeFrom(from.in_progress_info());
    }
    if (cached_has_bits & 0x00000008u) {
      id_ = from.id_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void DownloadInfo::CopyFrom(const DownloadInfo& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.DownloadInfo)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DownloadInfo::IsInitialized() const {
  return true;
}

void DownloadInfo::Swap(DownloadInfo* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DownloadInfo::InternalSwap(DownloadInfo* other) {
  guid_.Swap(&other->guid_);
  std::swap(ukm_info_, other->ukm_info_);
  std::swap(in_progress_info_, other->in_progress_info_);
  std::swap(id_, other->id_);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string DownloadInfo::GetTypeName() const {
  return "download_pb.DownloadInfo";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DownloadInfo

// optional string guid = 1;
bool DownloadInfo::has_guid() const {
  return (_has_bits_[0] & 0x00000001u) != 0;
}
void DownloadInfo::set_has_guid() {
  _has_bits_[0] |= 0x00000001u;
}
void DownloadInfo::clear_has_guid() {
  _has_bits_[0] &= ~0x00000001u;
}
void DownloadInfo::clear_guid() {
  guid_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  clear_has_guid();
}
const ::std::string& DownloadInfo::guid() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadInfo.guid)
  return guid_.GetNoArena();
}
void DownloadInfo::set_guid(const ::std::string& value) {
  set_has_guid();
  guid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
  // @@protoc_insertion_point(field_set:download_pb.DownloadInfo.guid)
}
#if LANG_CXX11
void DownloadInfo::set_guid(::std::string&& value) {
  set_has_guid();
  guid_.SetNoArena(
    &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  // @@protoc_insertion_point(field_set_rvalue:download_pb.DownloadInfo.guid)
}
#endif
void DownloadInfo::set_guid(const char* value) {
  GOOGLE_DCHECK(value != NULL);
  set_has_guid();
  guid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  // @@protoc_insertion_point(field_set_char:download_pb.DownloadInfo.guid)
}
void DownloadInfo::set_guid(const char* value, size_t size) {
  set_has_guid();
  guid_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
      ::std::string(reinterpret_cast<const char*>(value), size));
  // @@protoc_insertion_point(field_set_pointer:download_pb.DownloadInfo.guid)
}
::std::string* DownloadInfo::mutable_guid() {
  set_has_guid();
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadInfo.guid)
  return guid_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
::std::string* DownloadInfo::release_guid() {
  // @@protoc_insertion_point(field_release:download_pb.DownloadInfo.guid)
  clear_has_guid();
  return guid_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}
void DownloadInfo::set_allocated_guid(::std::string* guid) {
  if (guid != NULL) {
    set_has_guid();
  } else {
    clear_has_guid();
  }
  guid_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), guid);
  // @@protoc_insertion_point(field_set_allocated:download_pb.DownloadInfo.guid)
}

// optional int32 id = 2;
bool DownloadInfo::has_id() const {
  return (_has_bits_[0] & 0x00000008u) != 0;
}
void DownloadInfo::set_has_id() {
  _has_bits_[0] |= 0x00000008u;
}
void DownloadInfo::clear_has_id() {
  _has_bits_[0] &= ~0x00000008u;
}
void DownloadInfo::clear_id() {
  id_ = 0;
  clear_has_id();
}
::google::protobuf::int32 DownloadInfo::id() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadInfo.id)
  return id_;
}
void DownloadInfo::set_id(::google::protobuf::int32 value) {
  set_has_id();
  id_ = value;
  // @@protoc_insertion_point(field_set:download_pb.DownloadInfo.id)
}

// optional .download_pb.UkmInfo ukm_info = 3;
bool DownloadInfo::has_ukm_info() const {
  return (_has_bits_[0] & 0x00000002u) != 0;
}
void DownloadInfo::set_has_ukm_info() {
  _has_bits_[0] |= 0x00000002u;
}
void DownloadInfo::clear_has_ukm_info() {
  _has_bits_[0] &= ~0x00000002u;
}
void DownloadInfo::clear_ukm_info() {
  if (ukm_info_ != NULL) ukm_info_->::download_pb::UkmInfo::Clear();
  clear_has_ukm_info();
}
const ::download_pb::UkmInfo& DownloadInfo::ukm_info() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadInfo.ukm_info)
  return ukm_info_ != NULL ? *ukm_info_
                         : *::download_pb::UkmInfo::internal_default_instance();
}
::download_pb::UkmInfo* DownloadInfo::mutable_ukm_info() {
  set_has_ukm_info();
  if (ukm_info_ == NULL) {
    ukm_info_ = new ::download_pb::UkmInfo;
  }
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadInfo.ukm_info)
  return ukm_info_;
}
::download_pb::UkmInfo* DownloadInfo::release_ukm_info() {
  // @@protoc_insertion_point(field_release:download_pb.DownloadInfo.ukm_info)
  clear_has_ukm_info();
  ::download_pb::UkmInfo* temp = ukm_info_;
  ukm_info_ = NULL;
  return temp;
}
void DownloadInfo::set_allocated_ukm_info(::download_pb::UkmInfo* ukm_info) {
  delete ukm_info_;
  ukm_info_ = ukm_info;
  if (ukm_info) {
    set_has_ukm_info();
  } else {
    clear_has_ukm_info();
  }
  // @@protoc_insertion_point(field_set_allocated:download_pb.DownloadInfo.ukm_info)
}

// optional .download_pb.InProgressInfo in_progress_info = 4;
bool DownloadInfo::has_in_progress_info() const {
  return (_has_bits_[0] & 0x00000004u) != 0;
}
void DownloadInfo::set_has_in_progress_info() {
  _has_bits_[0] |= 0x00000004u;
}
void DownloadInfo::clear_has_in_progress_info() {
  _has_bits_[0] &= ~0x00000004u;
}
void DownloadInfo::clear_in_progress_info() {
  if (in_progress_info_ != NULL) in_progress_info_->::download_pb::InProgressInfo::Clear();
  clear_has_in_progress_info();
}
const ::download_pb::InProgressInfo& DownloadInfo::in_progress_info() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadInfo.in_progress_info)
  return in_progress_info_ != NULL ? *in_progress_info_
                         : *::download_pb::InProgressInfo::internal_default_instance();
}
::download_pb::InProgressInfo* DownloadInfo::mutable_in_progress_info() {
  set_has_in_progress_info();
  if (in_progress_info_ == NULL) {
    in_progress_info_ = new ::download_pb::InProgressInfo;
  }
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadInfo.in_progress_info)
  return in_progress_info_;
}
::download_pb::InProgressInfo* DownloadInfo::release_in_progress_info() {
  // @@protoc_insertion_point(field_release:download_pb.DownloadInfo.in_progress_info)
  clear_has_in_progress_info();
  ::download_pb::InProgressInfo* temp = in_progress_info_;
  in_progress_info_ = NULL;
  return temp;
}
void DownloadInfo::set_allocated_in_progress_info(::download_pb::InProgressInfo* in_progress_info) {
  delete in_progress_info_;
  in_progress_info_ = in_progress_info;
  if (in_progress_info) {
    set_has_in_progress_info();
  } else {
    clear_has_in_progress_info();
  }
  // @@protoc_insertion_point(field_set_allocated:download_pb.DownloadInfo.in_progress_info)
}

#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// ===================================================================

#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int DownloadDBEntry::kDownloadInfoFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

DownloadDBEntry::DownloadDBEntry()
  : ::google::protobuf::MessageLite(), _internal_metadata_(NULL) {
  if (GOOGLE_PREDICT_TRUE(this != internal_default_instance())) {
    protobuf_download_5fentry_2eproto::InitDefaults();
  }
  SharedCtor();
  // @@protoc_insertion_point(constructor:download_pb.DownloadDBEntry)
}
DownloadDBEntry::DownloadDBEntry(const DownloadDBEntry& from)
  : ::google::protobuf::MessageLite(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      _cached_size_(0) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  clear_has_entry();
  switch (from.entry_case()) {
    case kDownloadInfo: {
      mutable_download_info()->::download_pb::DownloadInfo::MergeFrom(from.download_info());
      break;
    }
    case ENTRY_NOT_SET: {
      break;
    }
  }
  // @@protoc_insertion_point(copy_constructor:download_pb.DownloadDBEntry)
}

void DownloadDBEntry::SharedCtor() {
  _cached_size_ = 0;
  clear_has_entry();
}

DownloadDBEntry::~DownloadDBEntry() {
  // @@protoc_insertion_point(destructor:download_pb.DownloadDBEntry)
  SharedDtor();
}

void DownloadDBEntry::SharedDtor() {
  if (has_entry()) {
    clear_entry();
  }
}

void DownloadDBEntry::SetCachedSize(int size) const {
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
}
const DownloadDBEntry& DownloadDBEntry::default_instance() {
  protobuf_download_5fentry_2eproto::InitDefaults();
  return *internal_default_instance();
}

DownloadDBEntry* DownloadDBEntry::New(::google::protobuf::Arena* arena) const {
  DownloadDBEntry* n = new DownloadDBEntry;
  if (arena != NULL) {
    arena->Own(n);
  }
  return n;
}

void DownloadDBEntry::clear_entry() {
// @@protoc_insertion_point(one_of_clear_start:download_pb.DownloadDBEntry)
  switch (entry_case()) {
    case kDownloadInfo: {
      delete entry_.download_info_;
      break;
    }
    case ENTRY_NOT_SET: {
      break;
    }
  }
  _oneof_case_[0] = ENTRY_NOT_SET;
}


void DownloadDBEntry::Clear() {
// @@protoc_insertion_point(message_clear_start:download_pb.DownloadDBEntry)
  clear_entry();
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool DownloadDBEntry::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  ::google::protobuf::io::LazyStringOutputStream unknown_fields_string(
      ::google::protobuf::NewPermanentCallback(&_internal_metadata_,
          &::google::protobuf::internal::InternalMetadataWithArenaLite::
              mutable_unknown_fields));
  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
      &unknown_fields_string, false);
  // @@protoc_insertion_point(parse_start:download_pb.DownloadDBEntry)
  for (;;) {
    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional .download_pb.DownloadInfo download_info = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
               input, mutable_download_info()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0 ||
            ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
            ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormatLite::SkipField(
            input, tag, &unknown_fields_stream));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:download_pb.DownloadDBEntry)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:download_pb.DownloadDBEntry)
  return false;
#undef DO_
}

void DownloadDBEntry::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:download_pb.DownloadDBEntry)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // optional .download_pb.DownloadInfo download_info = 1;
  if (has_download_info()) {
    ::google::protobuf::internal::WireFormatLite::WriteMessage(
      1, *entry_.download_info_, output);
  }

  output->WriteRaw(unknown_fields().data(),
                   static_cast<int>(unknown_fields().size()));
  // @@protoc_insertion_point(serialize_end:download_pb.DownloadDBEntry)
}

size_t DownloadDBEntry::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:download_pb.DownloadDBEntry)
  size_t total_size = 0;

  total_size += unknown_fields().size();

  switch (entry_case()) {
    // optional .download_pb.DownloadInfo download_info = 1;
    case kDownloadInfo: {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
          *entry_.download_info_);
      break;
    }
    case ENTRY_NOT_SET: {
      break;
    }
  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
  _cached_size_ = cached_size;
  GOOGLE_SAFE_CONCURRENT_WRITES_END();
  return total_size;
}

void DownloadDBEntry::CheckTypeAndMergeFrom(
    const ::google::protobuf::MessageLite& from) {
  MergeFrom(*::google::protobuf::down_cast<const DownloadDBEntry*>(&from));
}

void DownloadDBEntry::MergeFrom(const DownloadDBEntry& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:download_pb.DownloadDBEntry)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  switch (from.entry_case()) {
    case kDownloadInfo: {
      mutable_download_info()->::download_pb::DownloadInfo::MergeFrom(from.download_info());
      break;
    }
    case ENTRY_NOT_SET: {
      break;
    }
  }
}

void DownloadDBEntry::CopyFrom(const DownloadDBEntry& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:download_pb.DownloadDBEntry)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool DownloadDBEntry::IsInitialized() const {
  return true;
}

void DownloadDBEntry::Swap(DownloadDBEntry* other) {
  if (other == this) return;
  InternalSwap(other);
}
void DownloadDBEntry::InternalSwap(DownloadDBEntry* other) {
  std::swap(entry_, other->entry_);
  std::swap(_oneof_case_[0], other->_oneof_case_[0]);
  std::swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
  std::swap(_cached_size_, other->_cached_size_);
}

::std::string DownloadDBEntry::GetTypeName() const {
  return "download_pb.DownloadDBEntry";
}

#if PROTOBUF_INLINE_NOT_IN_HEADERS
// DownloadDBEntry

// optional .download_pb.DownloadInfo download_info = 1;
bool DownloadDBEntry::has_download_info() const {
  return entry_case() == kDownloadInfo;
}
void DownloadDBEntry::set_has_download_info() {
  _oneof_case_[0] = kDownloadInfo;
}
void DownloadDBEntry::clear_download_info() {
  if (has_download_info()) {
    delete entry_.download_info_;
    clear_has_entry();
  }
}
 const ::download_pb::DownloadInfo& DownloadDBEntry::download_info() const {
  // @@protoc_insertion_point(field_get:download_pb.DownloadDBEntry.download_info)
  return has_download_info()
      ? *entry_.download_info_
      : ::download_pb::DownloadInfo::default_instance();
}
::download_pb::DownloadInfo* DownloadDBEntry::mutable_download_info() {
  if (!has_download_info()) {
    clear_entry();
    set_has_download_info();
    entry_.download_info_ = new ::download_pb::DownloadInfo;
  }
  // @@protoc_insertion_point(field_mutable:download_pb.DownloadDBEntry.download_info)
  return entry_.download_info_;
}
::download_pb::DownloadInfo* DownloadDBEntry::release_download_info() {
  // @@protoc_insertion_point(field_release:download_pb.DownloadDBEntry.download_info)
  if (has_download_info()) {
    clear_has_entry();
    ::download_pb::DownloadInfo* temp = entry_.download_info_;
    entry_.download_info_ = NULL;
    return temp;
  } else {
    return NULL;
  }
}
void DownloadDBEntry::set_allocated_download_info(::download_pb::DownloadInfo* download_info) {
  clear_entry();
  if (download_info) {
    set_has_download_info();
    entry_.download_info_ = download_info;
  }
  // @@protoc_insertion_point(field_set_allocated:download_pb.DownloadDBEntry.download_info)
}

bool DownloadDBEntry::has_entry() const {
  return entry_case() != ENTRY_NOT_SET;
}
void DownloadDBEntry::clear_has_entry() {
  _oneof_case_[0] = ENTRY_NOT_SET;
}
DownloadDBEntry::EntryCase DownloadDBEntry::entry_case() const {
  return DownloadDBEntry::EntryCase(_oneof_case_[0]);
}
#endif  // PROTOBUF_INLINE_NOT_IN_HEADERS

// @@protoc_insertion_point(namespace_scope)

}  // namespace download_pb

// @@protoc_insertion_point(global_scope)
