Bug 1302211 - Import latest Safe Browsing CSD file from Chrome. r?gcp draft
authorFrancois Marier <francois@mozilla.com>
Mon, 12 Sep 2016 13:21:42 -0700
changeset 412799 300c5de8dc23f392834bb16cd441ac381abfa411
parent 412625 1851b78b5a9673ee422f189b92e5f1e86b82a01c
child 412800 698dad8094f7e99a20a15ec0aafc5baa70669b93
push id29271
push userfmarier@mozilla.com
push dateTue, 13 Sep 2016 00:07:00 +0000
reviewersgcp
bugs1302211
milestone51.0a1
Bug 1302211 - Import latest Safe Browsing CSD file from Chrome. r?gcp MozReview-Commit-ID: Ax6TICKsQjv
toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc
toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h
toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto
--- a/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc
+++ b/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.cc
@@ -31,16 +31,17 @@ void protobuf_ShutdownFile_chromium_2fch
   delete ClientDownloadRequest_ExtendedAttr::default_instance_;
   delete ClientDownloadRequest_SignatureInfo::default_instance_;
   delete ClientDownloadRequest_PEImageHeaders::default_instance_;
   delete ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_;
   delete ClientDownloadRequest_MachOHeaders::default_instance_;
   delete ClientDownloadRequest_MachOHeaders_LoadCommand::default_instance_;
   delete ClientDownloadRequest_ImageHeaders::default_instance_;
   delete ClientDownloadRequest_ArchivedBinary::default_instance_;
+  delete ClientDownloadRequest_URLChainEntry::default_instance_;
   delete ClientDownloadResponse::default_instance_;
   delete ClientDownloadResponse_MoreInfo::default_instance_;
   delete ClientDownloadReport::default_instance_;
   delete ClientDownloadReport_UserInformation::default_instance_;
   delete ClientUploadResponse::default_instance_;
   delete ClientIncidentReport::default_instance_;
   delete ClientIncidentReport_IncidentData::default_instance_;
   delete ClientIncidentReport_IncidentData_TrackedPreferenceIncident::default_instance_;
@@ -104,16 +105,17 @@ void protobuf_AddDesc_chromium_2fchrome_
   ClientDownloadRequest_ExtendedAttr::default_instance_ = new ClientDownloadRequest_ExtendedAttr();
   ClientDownloadRequest_SignatureInfo::default_instance_ = new ClientDownloadRequest_SignatureInfo();
   ClientDownloadRequest_PEImageHeaders::default_instance_ = new ClientDownloadRequest_PEImageHeaders();
   ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_ = new ClientDownloadRequest_PEImageHeaders_DebugData();
   ClientDownloadRequest_MachOHeaders::default_instance_ = new ClientDownloadRequest_MachOHeaders();
   ClientDownloadRequest_MachOHeaders_LoadCommand::default_instance_ = new ClientDownloadRequest_MachOHeaders_LoadCommand();
   ClientDownloadRequest_ImageHeaders::default_instance_ = new ClientDownloadRequest_ImageHeaders();
   ClientDownloadRequest_ArchivedBinary::default_instance_ = new ClientDownloadRequest_ArchivedBinary();
+  ClientDownloadRequest_URLChainEntry::default_instance_ = new ClientDownloadRequest_URLChainEntry();
   ClientDownloadResponse::default_instance_ = new ClientDownloadResponse();
   ClientDownloadResponse_MoreInfo::default_instance_ = new ClientDownloadResponse_MoreInfo();
   ClientDownloadReport::default_instance_ = new ClientDownloadReport();
   ClientDownloadReport_UserInformation::default_instance_ = new ClientDownloadReport_UserInformation();
   ClientUploadResponse::default_instance_ = new ClientUploadResponse();
   ClientIncidentReport::default_instance_ = new ClientIncidentReport();
   ClientIncidentReport_IncidentData::default_instance_ = new ClientIncidentReport_IncidentData();
   ClientIncidentReport_IncidentData_TrackedPreferenceIncident::default_instance_ = new ClientIncidentReport_IncidentData_TrackedPreferenceIncident();
@@ -163,16 +165,17 @@ void protobuf_AddDesc_chromium_2fchrome_
   ClientDownloadRequest_ExtendedAttr::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_SignatureInfo::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_PEImageHeaders::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_PEImageHeaders_DebugData::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_MachOHeaders::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_MachOHeaders_LoadCommand::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_ImageHeaders::default_instance_->InitAsDefaultInstance();
   ClientDownloadRequest_ArchivedBinary::default_instance_->InitAsDefaultInstance();
+  ClientDownloadRequest_URLChainEntry::default_instance_->InitAsDefaultInstance();
   ClientDownloadResponse::default_instance_->InitAsDefaultInstance();
   ClientDownloadResponse_MoreInfo::default_instance_->InitAsDefaultInstance();
   ClientDownloadReport::default_instance_->InitAsDefaultInstance();
   ClientDownloadReport_UserInformation::default_instance_->InitAsDefaultInstance();
   ClientUploadResponse::default_instance_->InitAsDefaultInstance();
   ClientIncidentReport::default_instance_->InitAsDefaultInstance();
   ClientIncidentReport_IncidentData::default_instance_->InitAsDefaultInstance();
   ClientIncidentReport_IncidentData_TrackedPreferenceIncident::default_instance_->InitAsDefaultInstance();
@@ -5773,16 +5776,509 @@ void ClientDownloadRequest_ArchivedBinar
 
 ::std::string ClientDownloadRequest_ArchivedBinary::GetTypeName() const {
   return "safe_browsing.ClientDownloadRequest.ArchivedBinary";
 }
 
 
 // -------------------------------------------------------------------
 
+bool ClientDownloadRequest_URLChainEntry_URLType_IsValid(int value) {
+  switch(value) {
+    case 1:
+    case 2:
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+      return true;
+    default:
+      return false;
+  }
+}
+
+#ifndef _MSC_VER
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::DOWNLOAD_URL;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::DOWNLOAD_REFERRER;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::LANDING_PAGE;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::LANDING_REFERRER;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::CLIENT_REDIRECT;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::SERVER_REDIRECT;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::URLType_MIN;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::URLType_MAX;
+const int ClientDownloadRequest_URLChainEntry::URLType_ARRAYSIZE;
+#endif  // _MSC_VER
+#ifndef _MSC_VER
+const int ClientDownloadRequest_URLChainEntry::kUrlFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kTypeFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kIpAddressFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kReferrerFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kMainFrameReferrerFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kIsRetargetingFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kIsUserInitiatedFieldNumber;
+const int ClientDownloadRequest_URLChainEntry::kTimestampInMillisecFieldNumber;
+#endif  // !_MSC_VER
+
+ClientDownloadRequest_URLChainEntry::ClientDownloadRequest_URLChainEntry()
+  : ::google::protobuf::MessageLite() {
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:safe_browsing.ClientDownloadRequest.URLChainEntry)
+}
+
+void ClientDownloadRequest_URLChainEntry::InitAsDefaultInstance() {
+}
+
+ClientDownloadRequest_URLChainEntry::ClientDownloadRequest_URLChainEntry(const ClientDownloadRequest_URLChainEntry& from)
+  : ::google::protobuf::MessageLite() {
+  SharedCtor();
+  MergeFrom(from);
+  // @@protoc_insertion_point(copy_constructor:safe_browsing.ClientDownloadRequest.URLChainEntry)
+}
+
+void ClientDownloadRequest_URLChainEntry::SharedCtor() {
+  ::google::protobuf::internal::GetEmptyString();
+  _cached_size_ = 0;
+  url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  type_ = 1;
+  ip_address_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  main_frame_referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  is_retargeting_ = false;
+  is_user_initiated_ = false;
+  timestamp_in_millisec_ = 0;
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+ClientDownloadRequest_URLChainEntry::~ClientDownloadRequest_URLChainEntry() {
+  // @@protoc_insertion_point(destructor:safe_browsing.ClientDownloadRequest.URLChainEntry)
+  SharedDtor();
+}
+
+void ClientDownloadRequest_URLChainEntry::SharedDtor() {
+  if (url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete url_;
+  }
+  if (ip_address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete ip_address_;
+  }
+  if (referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete referrer_;
+  }
+  if (main_frame_referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete main_frame_referrer_;
+  }
+  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  if (this != &default_instance()) {
+  #else
+  if (this != default_instance_) {
+  #endif
+  }
+}
+
+void ClientDownloadRequest_URLChainEntry::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ClientDownloadRequest_URLChainEntry& ClientDownloadRequest_URLChainEntry::default_instance() {
+#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  protobuf_AddDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
+#else
+  if (default_instance_ == NULL) protobuf_AddDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
+#endif
+  return *default_instance_;
+}
+
+ClientDownloadRequest_URLChainEntry* ClientDownloadRequest_URLChainEntry::default_instance_ = NULL;
+
+ClientDownloadRequest_URLChainEntry* ClientDownloadRequest_URLChainEntry::New() const {
+  return new ClientDownloadRequest_URLChainEntry;
+}
+
+void ClientDownloadRequest_URLChainEntry::Clear() {
+#define OFFSET_OF_FIELD_(f) (reinterpret_cast<char*>(      \
+  &reinterpret_cast<ClientDownloadRequest_URLChainEntry*>(16)->f) - \
+   reinterpret_cast<char*>(16))
+
+#define ZR_(first, last) do {                              \
+    size_t f = OFFSET_OF_FIELD_(first);                    \
+    size_t n = OFFSET_OF_FIELD_(last) - f + sizeof(last);  \
+    ::memset(&first, 0, n);                                \
+  } while (0)
+
+  if (_has_bits_[0 / 32] & 255) {
+    ZR_(is_retargeting_, timestamp_in_millisec_);
+    if (has_url()) {
+      if (url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+        url_->clear();
+      }
+    }
+    type_ = 1;
+    if (has_ip_address()) {
+      if (ip_address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+        ip_address_->clear();
+      }
+    }
+    if (has_referrer()) {
+      if (referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+        referrer_->clear();
+      }
+    }
+    if (has_main_frame_referrer()) {
+      if (main_frame_referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+        main_frame_referrer_->clear();
+      }
+    }
+  }
+
+#undef OFFSET_OF_FIELD_
+#undef ZR_
+
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->clear();
+}
+
+bool ClientDownloadRequest_URLChainEntry::MergePartialFromCodedStream(
+    ::google::protobuf::io::CodedInputStream* input) {
+#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
+  ::google::protobuf::uint32 tag;
+  ::google::protobuf::io::StringOutputStream unknown_fields_string(
+      mutable_unknown_fields());
+  ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
+      &unknown_fields_string);
+  // @@protoc_insertion_point(parse_start:safe_browsing.ClientDownloadRequest.URLChainEntry)
+  for (;;) {
+    ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
+    tag = p.first;
+    if (!p.second) goto handle_unusual;
+    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
+      // optional string url = 1;
+      case 1: {
+        if (tag == 10) {
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_url()));
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(16)) goto parse_type;
+        break;
+      }
+
+      // optional .safe_browsing.ClientDownloadRequest.URLChainEntry.URLType type = 2;
+      case 2: {
+        if (tag == 16) {
+         parse_type:
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType_IsValid(value)) {
+            set_type(static_cast< ::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType >(value));
+          } else {
+            unknown_fields_stream.WriteVarint32(tag);
+            unknown_fields_stream.WriteVarint32(value);
+          }
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(26)) goto parse_ip_address;
+        break;
+      }
+
+      // optional string ip_address = 3;
+      case 3: {
+        if (tag == 26) {
+         parse_ip_address:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_ip_address()));
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(34)) goto parse_referrer;
+        break;
+      }
+
+      // optional string referrer = 4;
+      case 4: {
+        if (tag == 34) {
+         parse_referrer:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_referrer()));
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(42)) goto parse_main_frame_referrer;
+        break;
+      }
+
+      // optional string main_frame_referrer = 5;
+      case 5: {
+        if (tag == 42) {
+         parse_main_frame_referrer:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
+                input, this->mutable_main_frame_referrer()));
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(48)) goto parse_is_retargeting;
+        break;
+      }
+
+      // optional bool is_retargeting = 6;
+      case 6: {
+        if (tag == 48) {
+         parse_is_retargeting:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &is_retargeting_)));
+          set_has_is_retargeting();
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(56)) goto parse_is_user_initiated;
+        break;
+      }
+
+      // optional bool is_user_initiated = 7;
+      case 7: {
+        if (tag == 56) {
+         parse_is_user_initiated:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
+                 input, &is_user_initiated_)));
+          set_has_is_user_initiated();
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(65)) goto parse_timestamp_in_millisec;
+        break;
+      }
+
+      // optional double timestamp_in_millisec = 8;
+      case 8: {
+        if (tag == 65) {
+         parse_timestamp_in_millisec:
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>(
+                 input, &timestamp_in_millisec_)));
+          set_has_timestamp_in_millisec();
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectAtEnd()) goto success;
+        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:safe_browsing.ClientDownloadRequest.URLChainEntry)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:safe_browsing.ClientDownloadRequest.URLChainEntry)
+  return false;
+#undef DO_
+}
+
+void ClientDownloadRequest_URLChainEntry::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:safe_browsing.ClientDownloadRequest.URLChainEntry)
+  // optional string url = 1;
+  if (has_url()) {
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      1, this->url(), output);
+  }
+
+  // optional .safe_browsing.ClientDownloadRequest.URLChainEntry.URLType type = 2;
+  if (has_type()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      2, this->type(), output);
+  }
+
+  // optional string ip_address = 3;
+  if (has_ip_address()) {
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      3, this->ip_address(), output);
+  }
+
+  // optional string referrer = 4;
+  if (has_referrer()) {
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      4, this->referrer(), output);
+  }
+
+  // optional string main_frame_referrer = 5;
+  if (has_main_frame_referrer()) {
+    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
+      5, this->main_frame_referrer(), output);
+  }
+
+  // optional bool is_retargeting = 6;
+  if (has_is_retargeting()) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->is_retargeting(), output);
+  }
+
+  // optional bool is_user_initiated = 7;
+  if (has_is_user_initiated()) {
+    ::google::protobuf::internal::WireFormatLite::WriteBool(7, this->is_user_initiated(), output);
+  }
+
+  // optional double timestamp_in_millisec = 8;
+  if (has_timestamp_in_millisec()) {
+    ::google::protobuf::internal::WireFormatLite::WriteDouble(8, this->timestamp_in_millisec(), output);
+  }
+
+  output->WriteRaw(unknown_fields().data(),
+                   unknown_fields().size());
+  // @@protoc_insertion_point(serialize_end:safe_browsing.ClientDownloadRequest.URLChainEntry)
+}
+
+int ClientDownloadRequest_URLChainEntry::ByteSize() const {
+  int total_size = 0;
+
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    // optional string url = 1;
+    if (has_url()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::StringSize(
+          this->url());
+    }
+
+    // optional .safe_browsing.ClientDownloadRequest.URLChainEntry.URLType type = 2;
+    if (has_type()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->type());
+    }
+
+    // optional string ip_address = 3;
+    if (has_ip_address()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::StringSize(
+          this->ip_address());
+    }
+
+    // optional string referrer = 4;
+    if (has_referrer()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::StringSize(
+          this->referrer());
+    }
+
+    // optional string main_frame_referrer = 5;
+    if (has_main_frame_referrer()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::StringSize(
+          this->main_frame_referrer());
+    }
+
+    // optional bool is_retargeting = 6;
+    if (has_is_retargeting()) {
+      total_size += 1 + 1;
+    }
+
+    // optional bool is_user_initiated = 7;
+    if (has_is_user_initiated()) {
+      total_size += 1 + 1;
+    }
+
+    // optional double timestamp_in_millisec = 8;
+    if (has_timestamp_in_millisec()) {
+      total_size += 1 + 8;
+    }
+
+  }
+  total_size += unknown_fields().size();
+
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = total_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void ClientDownloadRequest_URLChainEntry::CheckTypeAndMergeFrom(
+    const ::google::protobuf::MessageLite& from) {
+  MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest_URLChainEntry*>(&from));
+}
+
+void ClientDownloadRequest_URLChainEntry::MergeFrom(const ClientDownloadRequest_URLChainEntry& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    if (from.has_url()) {
+      set_url(from.url());
+    }
+    if (from.has_type()) {
+      set_type(from.type());
+    }
+    if (from.has_ip_address()) {
+      set_ip_address(from.ip_address());
+    }
+    if (from.has_referrer()) {
+      set_referrer(from.referrer());
+    }
+    if (from.has_main_frame_referrer()) {
+      set_main_frame_referrer(from.main_frame_referrer());
+    }
+    if (from.has_is_retargeting()) {
+      set_is_retargeting(from.is_retargeting());
+    }
+    if (from.has_is_user_initiated()) {
+      set_is_user_initiated(from.is_user_initiated());
+    }
+    if (from.has_timestamp_in_millisec()) {
+      set_timestamp_in_millisec(from.timestamp_in_millisec());
+    }
+  }
+  mutable_unknown_fields()->append(from.unknown_fields());
+}
+
+void ClientDownloadRequest_URLChainEntry::CopyFrom(const ClientDownloadRequest_URLChainEntry& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool ClientDownloadRequest_URLChainEntry::IsInitialized() const {
+
+  return true;
+}
+
+void ClientDownloadRequest_URLChainEntry::Swap(ClientDownloadRequest_URLChainEntry* other) {
+  if (other != this) {
+    std::swap(url_, other->url_);
+    std::swap(type_, other->type_);
+    std::swap(ip_address_, other->ip_address_);
+    std::swap(referrer_, other->referrer_);
+    std::swap(main_frame_referrer_, other->main_frame_referrer_);
+    std::swap(is_retargeting_, other->is_retargeting_);
+    std::swap(is_user_initiated_, other->is_user_initiated_);
+    std::swap(timestamp_in_millisec_, other->timestamp_in_millisec_);
+    std::swap(_has_bits_[0], other->_has_bits_[0]);
+    _unknown_fields_.swap(other->_unknown_fields_);
+    std::swap(_cached_size_, other->_cached_size_);
+  }
+}
+
+::std::string ClientDownloadRequest_URLChainEntry::GetTypeName() const {
+  return "safe_browsing.ClientDownloadRequest.URLChainEntry";
+}
+
+
+// -------------------------------------------------------------------
+
 #ifndef _MSC_VER
 const int ClientDownloadRequest::kUrlFieldNumber;
 const int ClientDownloadRequest::kDigestsFieldNumber;
 const int ClientDownloadRequest::kLengthFieldNumber;
 const int ClientDownloadRequest::kResourcesFieldNumber;
 const int ClientDownloadRequest::kSignatureFieldNumber;
 const int ClientDownloadRequest::kUserInitiatedFieldNumber;
 const int ClientDownloadRequest::kFileBasenameFieldNumber;
@@ -5790,16 +6286,17 @@ const int ClientDownloadRequest::kDownlo
 const int ClientDownloadRequest::kLocaleFieldNumber;
 const int ClientDownloadRequest::kImageHeadersFieldNumber;
 const int ClientDownloadRequest::kArchivedBinaryFieldNumber;
 const int ClientDownloadRequest::kPopulationFieldNumber;
 const int ClientDownloadRequest::kArchiveValidFieldNumber;
 const int ClientDownloadRequest::kSkippedUrlWhitelistFieldNumber;
 const int ClientDownloadRequest::kSkippedCertificateWhitelistFieldNumber;
 const int ClientDownloadRequest::kAlternateExtensionsFieldNumber;
+const int ClientDownloadRequest::kUrlChainFieldNumber;
 #endif  // !_MSC_VER
 
 ClientDownloadRequest::ClientDownloadRequest()
   : ::google::protobuf::MessageLite() {
   SharedCtor();
   // @@protoc_insertion_point(constructor:safe_browsing.ClientDownloadRequest)
 }
 
@@ -5950,16 +6447,17 @@ void ClientDownloadRequest::Clear() {
   }
 
 #undef OFFSET_OF_FIELD_
 #undef ZR_
 
   resources_.Clear();
   archived_binary_.Clear();
   alternate_extensions_.Clear();
+  url_chain_.Clear();
   ::memset(_has_bits_, 0, sizeof(_has_bits_));
   mutable_unknown_fields()->clear();
 }
 
 bool ClientDownloadRequest::MergePartialFromCodedStream(
     ::google::protobuf::io::CodedInputStream* input) {
 #define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure
   ::google::protobuf::uint32 tag;
@@ -6178,30 +6676,44 @@ bool ClientDownloadRequest::MergePartial
          parse_skipped_certificate_whitelist:
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>(
                  input, &skipped_certificate_whitelist_)));
           set_has_skipped_certificate_whitelist();
         } else {
           goto handle_unusual;
         }
-        if (input->ExpectTag(258)) goto parse_alternate_extensions;
-        break;
-      }
-
-      // repeated string alternate_extensions = 32;
-      case 32: {
-        if (tag == 258) {
+        if (input->ExpectTag(282)) goto parse_alternate_extensions;
+        break;
+      }
+
+      // repeated string alternate_extensions = 35;
+      case 35: {
+        if (tag == 282) {
          parse_alternate_extensions:
           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                 input, this->add_alternate_extensions()));
         } else {
           goto handle_unusual;
         }
-        if (input->ExpectTag(258)) goto parse_alternate_extensions;
+        if (input->ExpectTag(282)) goto parse_alternate_extensions;
+        if (input->ExpectTag(290)) goto parse_url_chain;
+        break;
+      }
+
+      // repeated .safe_browsing.ClientDownloadRequest.URLChainEntry url_chain = 36;
+      case 36: {
+        if (tag == 290) {
+         parse_url_chain:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+                input, add_url_chain()));
+        } else {
+          goto handle_unusual;
+        }
+        if (input->ExpectTag(290)) goto parse_url_chain;
         if (input->ExpectAtEnd()) goto success;
         break;
       }
 
       default: {
       handle_unusual:
         if (tag == 0 ||
             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -6306,20 +6818,26 @@ void ClientDownloadRequest::SerializeWit
     ::google::protobuf::internal::WireFormatLite::WriteBool(28, this->skipped_url_whitelist(), output);
   }
 
   // optional bool skipped_certificate_whitelist = 31;
   if (has_skipped_certificate_whitelist()) {
     ::google::protobuf::internal::WireFormatLite::WriteBool(31, this->skipped_certificate_whitelist(), output);
   }
 
-  // repeated string alternate_extensions = 32;
+  // repeated string alternate_extensions = 35;
   for (int i = 0; i < this->alternate_extensions_size(); i++) {
     ::google::protobuf::internal::WireFormatLite::WriteString(
-      32, this->alternate_extensions(i), output);
+      35, this->alternate_extensions(i), output);
+  }
+
+  // repeated .safe_browsing.ClientDownloadRequest.URLChainEntry url_chain = 36;
+  for (int i = 0; i < this->url_chain_size(); i++) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessage(
+      36, this->url_chain(i), output);
   }
 
   output->WriteRaw(unknown_fields().data(),
                    unknown_fields().size());
   // @@protoc_insertion_point(serialize_end:safe_browsing.ClientDownloadRequest)
 }
 
 int ClientDownloadRequest::ByteSize() const {
@@ -6422,23 +6940,31 @@ int ClientDownloadRequest::ByteSize() co
   // repeated .safe_browsing.ClientDownloadRequest.ArchivedBinary archived_binary = 22;
   total_size += 2 * this->archived_binary_size();
   for (int i = 0; i < this->archived_binary_size(); i++) {
     total_size +=
       ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
         this->archived_binary(i));
   }
 
-  // repeated string alternate_extensions = 32;
+  // repeated string alternate_extensions = 35;
   total_size += 2 * this->alternate_extensions_size();
   for (int i = 0; i < this->alternate_extensions_size(); i++) {
     total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
       this->alternate_extensions(i));
   }
 
+  // repeated .safe_browsing.ClientDownloadRequest.URLChainEntry url_chain = 36;
+  total_size += 2 * this->url_chain_size();
+  for (int i = 0; i < this->url_chain_size(); i++) {
+    total_size +=
+      ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+        this->url_chain(i));
+  }
+
   total_size += unknown_fields().size();
 
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
   _cached_size_ = total_size;
   GOOGLE_SAFE_CONCURRENT_WRITES_END();
   return total_size;
 }
 
@@ -6447,16 +6973,17 @@ void ClientDownloadRequest::CheckTypeAnd
   MergeFrom(*::google::protobuf::down_cast<const ClientDownloadRequest*>(&from));
 }
 
 void ClientDownloadRequest::MergeFrom(const ClientDownloadRequest& from) {
   GOOGLE_CHECK_NE(&from, this);
   resources_.MergeFrom(from.resources_);
   archived_binary_.MergeFrom(from.archived_binary_);
   alternate_extensions_.MergeFrom(from.alternate_extensions_);
+  url_chain_.MergeFrom(from.url_chain_);
   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
     if (from.has_url()) {
       set_url(from.url());
     }
     if (from.has_digests()) {
       mutable_digests()->::safe_browsing::ClientDownloadRequest_Digests::MergeFrom(from.digests());
     }
     if (from.has_length()) {
@@ -6531,16 +7058,17 @@ void ClientDownloadRequest::Swap(ClientD
     std::swap(locale_, other->locale_);
     std::swap(image_headers_, other->image_headers_);
     archived_binary_.Swap(&other->archived_binary_);
     std::swap(population_, other->population_);
     std::swap(archive_valid_, other->archive_valid_);
     std::swap(skipped_url_whitelist_, other->skipped_url_whitelist_);
     std::swap(skipped_certificate_whitelist_, other->skipped_certificate_whitelist_);
     alternate_extensions_.Swap(&other->alternate_extensions_);
+    url_chain_.Swap(&other->url_chain_);
     std::swap(_has_bits_[0], other->_has_bits_[0]);
     _unknown_fields_.swap(other->_unknown_fields_);
     std::swap(_cached_size_, other->_cached_size_);
   }
 }
 
 ::std::string ClientDownloadRequest::GetTypeName() const {
   return "safe_browsing.ClientDownloadRequest";
@@ -6914,17 +7442,17 @@ bool ClientDownloadResponse::MergePartia
   ::google::protobuf::io::CodedOutputStream unknown_fields_stream(
       &unknown_fields_string);
   // @@protoc_insertion_point(parse_start:safe_browsing.ClientDownloadResponse)
   for (;;) {
     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
     tag = p.first;
     if (!p.second) goto handle_unusual;
     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
-      // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
+      // optional .safe_browsing.ClientDownloadResponse.Verdict verdict = 1 [default = SAFE];
       case 1: {
         if (tag == 8) {
           int value;
           DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                    int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
                  input, &value)));
           if (::safe_browsing::ClientDownloadResponse_Verdict_IsValid(value)) {
             set_verdict(static_cast< ::safe_browsing::ClientDownloadResponse_Verdict >(value));
@@ -6985,17 +7513,17 @@ failure:
   // @@protoc_insertion_point(parse_failure:safe_browsing.ClientDownloadResponse)
   return false;
 #undef DO_
 }
 
 void ClientDownloadResponse::SerializeWithCachedSizes(
     ::google::protobuf::io::CodedOutputStream* output) const {
   // @@protoc_insertion_point(serialize_start:safe_browsing.ClientDownloadResponse)
-  // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
+  // optional .safe_browsing.ClientDownloadResponse.Verdict verdict = 1 [default = SAFE];
   if (has_verdict()) {
     ::google::protobuf::internal::WireFormatLite::WriteEnum(
       1, this->verdict(), output);
   }
 
   // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
   if (has_more_info()) {
     ::google::protobuf::internal::WireFormatLite::WriteMessage(
@@ -7012,17 +7540,17 @@ void ClientDownloadResponse::SerializeWi
                    unknown_fields().size());
   // @@protoc_insertion_point(serialize_end:safe_browsing.ClientDownloadResponse)
 }
 
 int ClientDownloadResponse::ByteSize() const {
   int total_size = 0;
 
   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
-    // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
+    // optional .safe_browsing.ClientDownloadResponse.Verdict verdict = 1 [default = SAFE];
     if (has_verdict()) {
       total_size += 1 +
         ::google::protobuf::internal::WireFormatLite::EnumSize(this->verdict());
     }
 
     // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
     if (has_more_info()) {
       total_size += 1 +
@@ -7069,17 +7597,16 @@ void ClientDownloadResponse::MergeFrom(c
 
 void ClientDownloadResponse::CopyFrom(const ClientDownloadResponse& from) {
   if (&from == this) return;
   Clear();
   MergeFrom(from);
 }
 
 bool ClientDownloadResponse::IsInitialized() const {
-  if ((_has_bits_[0] & 0x00000001) != 0x00000001) return false;
 
   return true;
 }
 
 void ClientDownloadResponse::Swap(ClientDownloadResponse* other) {
   if (other != this) {
     std::swap(verdict_, other->verdict_);
     std::swap(more_info_, other->more_info_);
@@ -7655,19 +8182,16 @@ void ClientDownloadReport::CopyFrom(cons
   MergeFrom(from);
 }
 
 bool ClientDownloadReport::IsInitialized() const {
 
   if (has_download_request()) {
     if (!this->download_request().IsInitialized()) return false;
   }
-  if (has_download_response()) {
-    if (!this->download_response().IsInitialized()) return false;
-  }
   return true;
 }
 
 void ClientDownloadReport::Swap(ClientDownloadReport* other) {
   if (other != this) {
     std::swap(reason_, other->reason_);
     std::swap(download_request_, other->download_request_);
     std::swap(user_information_, other->user_information_);
--- a/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h
+++ b/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.pb.h
@@ -47,16 +47,17 @@ class ClientDownloadRequest_CertificateC
 class ClientDownloadRequest_ExtendedAttr;
 class ClientDownloadRequest_SignatureInfo;
 class ClientDownloadRequest_PEImageHeaders;
 class ClientDownloadRequest_PEImageHeaders_DebugData;
 class ClientDownloadRequest_MachOHeaders;
 class ClientDownloadRequest_MachOHeaders_LoadCommand;
 class ClientDownloadRequest_ImageHeaders;
 class ClientDownloadRequest_ArchivedBinary;
+class ClientDownloadRequest_URLChainEntry;
 class ClientDownloadResponse;
 class ClientDownloadResponse_MoreInfo;
 class ClientDownloadReport;
 class ClientDownloadReport_UserInformation;
 class ClientUploadResponse;
 class ClientIncidentReport;
 class ClientIncidentReport_IncidentData;
 class ClientIncidentReport_IncidentData_TrackedPreferenceIncident;
@@ -97,16 +98,29 @@ enum ChromeUserPopulation_UserPopulation
   ChromeUserPopulation_UserPopulation_SAFE_BROWSING = 1,
   ChromeUserPopulation_UserPopulation_EXTENDED_REPORTING = 2
 };
 bool ChromeUserPopulation_UserPopulation_IsValid(int value);
 const ChromeUserPopulation_UserPopulation ChromeUserPopulation_UserPopulation_UserPopulation_MIN = ChromeUserPopulation_UserPopulation_UNKNOWN_USER_POPULATION;
 const ChromeUserPopulation_UserPopulation ChromeUserPopulation_UserPopulation_UserPopulation_MAX = ChromeUserPopulation_UserPopulation_EXTENDED_REPORTING;
 const int ChromeUserPopulation_UserPopulation_UserPopulation_ARRAYSIZE = ChromeUserPopulation_UserPopulation_UserPopulation_MAX + 1;
 
+enum ClientDownloadRequest_URLChainEntry_URLType {
+  ClientDownloadRequest_URLChainEntry_URLType_DOWNLOAD_URL = 1,
+  ClientDownloadRequest_URLChainEntry_URLType_DOWNLOAD_REFERRER = 2,
+  ClientDownloadRequest_URLChainEntry_URLType_LANDING_PAGE = 3,
+  ClientDownloadRequest_URLChainEntry_URLType_LANDING_REFERRER = 4,
+  ClientDownloadRequest_URLChainEntry_URLType_CLIENT_REDIRECT = 5,
+  ClientDownloadRequest_URLChainEntry_URLType_SERVER_REDIRECT = 6
+};
+bool ClientDownloadRequest_URLChainEntry_URLType_IsValid(int value);
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry_URLType_URLType_MIN = ClientDownloadRequest_URLChainEntry_URLType_DOWNLOAD_URL;
+const ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry_URLType_URLType_MAX = ClientDownloadRequest_URLChainEntry_URLType_SERVER_REDIRECT;
+const int ClientDownloadRequest_URLChainEntry_URLType_URLType_ARRAYSIZE = ClientDownloadRequest_URLChainEntry_URLType_URLType_MAX + 1;
+
 enum ClientDownloadRequest_ResourceType {
   ClientDownloadRequest_ResourceType_DOWNLOAD_URL = 0,
   ClientDownloadRequest_ResourceType_DOWNLOAD_REDIRECT = 1,
   ClientDownloadRequest_ResourceType_TAB_URL = 2,
   ClientDownloadRequest_ResourceType_TAB_REDIRECT = 3,
   ClientDownloadRequest_ResourceType_PPAPI_DOCUMENT = 4,
   ClientDownloadRequest_ResourceType_PPAPI_PLUGIN = 5
 };
@@ -2671,16 +2685,214 @@ class ClientDownloadRequest_ArchivedBina
   friend void protobuf_AssignDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
   friend void protobuf_ShutdownFile_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
 
   void InitAsDefaultInstance();
   static ClientDownloadRequest_ArchivedBinary* default_instance_;
 };
 // -------------------------------------------------------------------
 
+class ClientDownloadRequest_URLChainEntry : public ::google::protobuf::MessageLite {
+ public:
+  ClientDownloadRequest_URLChainEntry();
+  virtual ~ClientDownloadRequest_URLChainEntry();
+
+  ClientDownloadRequest_URLChainEntry(const ClientDownloadRequest_URLChainEntry& from);
+
+  inline ClientDownloadRequest_URLChainEntry& operator=(const ClientDownloadRequest_URLChainEntry& from) {
+    CopyFrom(from);
+    return *this;
+  }
+
+  inline const ::std::string& unknown_fields() const {
+    return _unknown_fields_;
+  }
+
+  inline ::std::string* mutable_unknown_fields() {
+    return &_unknown_fields_;
+  }
+
+  static const ClientDownloadRequest_URLChainEntry& default_instance();
+
+  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  // Returns the internal default instance pointer. This function can
+  // return NULL thus should not be used by the user. This is intended
+  // for Protobuf internal code. Please use default_instance() declared
+  // above instead.
+  static inline const ClientDownloadRequest_URLChainEntry* internal_default_instance() {
+    return default_instance_;
+  }
+  #endif
+
+  void Swap(ClientDownloadRequest_URLChainEntry* other);
+
+  // implements Message ----------------------------------------------
+
+  ClientDownloadRequest_URLChainEntry* New() const;
+  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
+  void CopyFrom(const ClientDownloadRequest_URLChainEntry& from);
+  void MergeFrom(const ClientDownloadRequest_URLChainEntry& from);
+  void Clear();
+  bool IsInitialized() const;
+
+  int ByteSize() const;
+  bool MergePartialFromCodedStream(
+      ::google::protobuf::io::CodedInputStream* input);
+  void SerializeWithCachedSizes(
+      ::google::protobuf::io::CodedOutputStream* output) const;
+  void DiscardUnknownFields();
+  int GetCachedSize() const { return _cached_size_; }
+  private:
+  void SharedCtor();
+  void SharedDtor();
+  void SetCachedSize(int size) const;
+  public:
+  ::std::string GetTypeName() const;
+
+  // nested types ----------------------------------------------------
+
+  typedef ClientDownloadRequest_URLChainEntry_URLType URLType;
+  static const URLType DOWNLOAD_URL = ClientDownloadRequest_URLChainEntry_URLType_DOWNLOAD_URL;
+  static const URLType DOWNLOAD_REFERRER = ClientDownloadRequest_URLChainEntry_URLType_DOWNLOAD_REFERRER;
+  static const URLType LANDING_PAGE = ClientDownloadRequest_URLChainEntry_URLType_LANDING_PAGE;
+  static const URLType LANDING_REFERRER = ClientDownloadRequest_URLChainEntry_URLType_LANDING_REFERRER;
+  static const URLType CLIENT_REDIRECT = ClientDownloadRequest_URLChainEntry_URLType_CLIENT_REDIRECT;
+  static const URLType SERVER_REDIRECT = ClientDownloadRequest_URLChainEntry_URLType_SERVER_REDIRECT;
+  static inline bool URLType_IsValid(int value) {
+    return ClientDownloadRequest_URLChainEntry_URLType_IsValid(value);
+  }
+  static const URLType URLType_MIN =
+    ClientDownloadRequest_URLChainEntry_URLType_URLType_MIN;
+  static const URLType URLType_MAX =
+    ClientDownloadRequest_URLChainEntry_URLType_URLType_MAX;
+  static const int URLType_ARRAYSIZE =
+    ClientDownloadRequest_URLChainEntry_URLType_URLType_ARRAYSIZE;
+
+  // accessors -------------------------------------------------------
+
+  // optional string url = 1;
+  inline bool has_url() const;
+  inline void clear_url();
+  static const int kUrlFieldNumber = 1;
+  inline const ::std::string& url() const;
+  inline void set_url(const ::std::string& value);
+  inline void set_url(const char* value);
+  inline void set_url(const char* value, size_t size);
+  inline ::std::string* mutable_url();
+  inline ::std::string* release_url();
+  inline void set_allocated_url(::std::string* url);
+
+  // optional .safe_browsing.ClientDownloadRequest.URLChainEntry.URLType type = 2;
+  inline bool has_type() const;
+  inline void clear_type();
+  static const int kTypeFieldNumber = 2;
+  inline ::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType type() const;
+  inline void set_type(::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType value);
+
+  // optional string ip_address = 3;
+  inline bool has_ip_address() const;
+  inline void clear_ip_address();
+  static const int kIpAddressFieldNumber = 3;
+  inline const ::std::string& ip_address() const;
+  inline void set_ip_address(const ::std::string& value);
+  inline void set_ip_address(const char* value);
+  inline void set_ip_address(const char* value, size_t size);
+  inline ::std::string* mutable_ip_address();
+  inline ::std::string* release_ip_address();
+  inline void set_allocated_ip_address(::std::string* ip_address);
+
+  // optional string referrer = 4;
+  inline bool has_referrer() const;
+  inline void clear_referrer();
+  static const int kReferrerFieldNumber = 4;
+  inline const ::std::string& referrer() const;
+  inline void set_referrer(const ::std::string& value);
+  inline void set_referrer(const char* value);
+  inline void set_referrer(const char* value, size_t size);
+  inline ::std::string* mutable_referrer();
+  inline ::std::string* release_referrer();
+  inline void set_allocated_referrer(::std::string* referrer);
+
+  // optional string main_frame_referrer = 5;
+  inline bool has_main_frame_referrer() const;
+  inline void clear_main_frame_referrer();
+  static const int kMainFrameReferrerFieldNumber = 5;
+  inline const ::std::string& main_frame_referrer() const;
+  inline void set_main_frame_referrer(const ::std::string& value);
+  inline void set_main_frame_referrer(const char* value);
+  inline void set_main_frame_referrer(const char* value, size_t size);
+  inline ::std::string* mutable_main_frame_referrer();
+  inline ::std::string* release_main_frame_referrer();
+  inline void set_allocated_main_frame_referrer(::std::string* main_frame_referrer);
+
+  // optional bool is_retargeting = 6;
+  inline bool has_is_retargeting() const;
+  inline void clear_is_retargeting();
+  static const int kIsRetargetingFieldNumber = 6;
+  inline bool is_retargeting() const;
+  inline void set_is_retargeting(bool value);
+
+  // optional bool is_user_initiated = 7;
+  inline bool has_is_user_initiated() const;
+  inline void clear_is_user_initiated();
+  static const int kIsUserInitiatedFieldNumber = 7;
+  inline bool is_user_initiated() const;
+  inline void set_is_user_initiated(bool value);
+
+  // optional double timestamp_in_millisec = 8;
+  inline bool has_timestamp_in_millisec() const;
+  inline void clear_timestamp_in_millisec();
+  static const int kTimestampInMillisecFieldNumber = 8;
+  inline double timestamp_in_millisec() const;
+  inline void set_timestamp_in_millisec(double value);
+
+  // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadRequest.URLChainEntry)
+ private:
+  inline void set_has_url();
+  inline void clear_has_url();
+  inline void set_has_type();
+  inline void clear_has_type();
+  inline void set_has_ip_address();
+  inline void clear_has_ip_address();
+  inline void set_has_referrer();
+  inline void clear_has_referrer();
+  inline void set_has_main_frame_referrer();
+  inline void clear_has_main_frame_referrer();
+  inline void set_has_is_retargeting();
+  inline void clear_has_is_retargeting();
+  inline void set_has_is_user_initiated();
+  inline void clear_has_is_user_initiated();
+  inline void set_has_timestamp_in_millisec();
+  inline void clear_has_timestamp_in_millisec();
+
+  ::std::string _unknown_fields_;
+
+  ::google::protobuf::uint32 _has_bits_[1];
+  mutable int _cached_size_;
+  ::std::string* url_;
+  ::std::string* ip_address_;
+  ::std::string* referrer_;
+  ::std::string* main_frame_referrer_;
+  int type_;
+  bool is_retargeting_;
+  bool is_user_initiated_;
+  double timestamp_in_millisec_;
+  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  friend void  protobuf_AddDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto_impl();
+  #else
+  friend void  protobuf_AddDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
+  #endif
+  friend void protobuf_AssignDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
+  friend void protobuf_ShutdownFile_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
+
+  void InitAsDefaultInstance();
+  static ClientDownloadRequest_URLChainEntry* default_instance_;
+};
+// -------------------------------------------------------------------
+
 class ClientDownloadRequest : public ::google::protobuf::MessageLite {
  public:
   ClientDownloadRequest();
   virtual ~ClientDownloadRequest();
 
   ClientDownloadRequest(const ClientDownloadRequest& from);
 
   inline ClientDownloadRequest& operator=(const ClientDownloadRequest& from) {
@@ -2739,16 +2951,17 @@ class ClientDownloadRequest : public ::g
   typedef ClientDownloadRequest_Resource Resource;
   typedef ClientDownloadRequest_CertificateChain CertificateChain;
   typedef ClientDownloadRequest_ExtendedAttr ExtendedAttr;
   typedef ClientDownloadRequest_SignatureInfo SignatureInfo;
   typedef ClientDownloadRequest_PEImageHeaders PEImageHeaders;
   typedef ClientDownloadRequest_MachOHeaders MachOHeaders;
   typedef ClientDownloadRequest_ImageHeaders ImageHeaders;
   typedef ClientDownloadRequest_ArchivedBinary ArchivedBinary;
+  typedef ClientDownloadRequest_URLChainEntry URLChainEntry;
 
   typedef ClientDownloadRequest_ResourceType ResourceType;
   static const ResourceType DOWNLOAD_URL = ClientDownloadRequest_ResourceType_DOWNLOAD_URL;
   static const ResourceType DOWNLOAD_REDIRECT = ClientDownloadRequest_ResourceType_DOWNLOAD_REDIRECT;
   static const ResourceType TAB_URL = ClientDownloadRequest_ResourceType_TAB_URL;
   static const ResourceType TAB_REDIRECT = ClientDownloadRequest_ResourceType_TAB_REDIRECT;
   static const ResourceType PPAPI_DOCUMENT = ClientDownloadRequest_ResourceType_PPAPI_DOCUMENT;
   static const ResourceType PPAPI_PLUGIN = ClientDownloadRequest_ResourceType_PPAPI_PLUGIN;
@@ -2919,32 +3132,44 @@ class ClientDownloadRequest : public ::g
 
   // optional bool skipped_certificate_whitelist = 31;
   inline bool has_skipped_certificate_whitelist() const;
   inline void clear_skipped_certificate_whitelist();
   static const int kSkippedCertificateWhitelistFieldNumber = 31;
   inline bool skipped_certificate_whitelist() const;
   inline void set_skipped_certificate_whitelist(bool value);
 
-  // repeated string alternate_extensions = 32;
+  // repeated string alternate_extensions = 35;
   inline int alternate_extensions_size() const;
   inline void clear_alternate_extensions();
-  static const int kAlternateExtensionsFieldNumber = 32;
+  static const int kAlternateExtensionsFieldNumber = 35;
   inline const ::std::string& alternate_extensions(int index) const;
   inline ::std::string* mutable_alternate_extensions(int index);
   inline void set_alternate_extensions(int index, const ::std::string& value);
   inline void set_alternate_extensions(int index, const char* value);
   inline void set_alternate_extensions(int index, const char* value, size_t size);
   inline ::std::string* add_alternate_extensions();
   inline void add_alternate_extensions(const ::std::string& value);
   inline void add_alternate_extensions(const char* value);
   inline void add_alternate_extensions(const char* value, size_t size);
   inline const ::google::protobuf::RepeatedPtrField< ::std::string>& alternate_extensions() const;
   inline ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_alternate_extensions();
 
+  // repeated .safe_browsing.ClientDownloadRequest.URLChainEntry url_chain = 36;
+  inline int url_chain_size() const;
+  inline void clear_url_chain();
+  static const int kUrlChainFieldNumber = 36;
+  inline const ::safe_browsing::ClientDownloadRequest_URLChainEntry& url_chain(int index) const;
+  inline ::safe_browsing::ClientDownloadRequest_URLChainEntry* mutable_url_chain(int index);
+  inline ::safe_browsing::ClientDownloadRequest_URLChainEntry* add_url_chain();
+  inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_URLChainEntry >&
+      url_chain() const;
+  inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_URLChainEntry >*
+      mutable_url_chain();
+
   // @@protoc_insertion_point(class_scope:safe_browsing.ClientDownloadRequest)
  private:
   inline void set_has_url();
   inline void clear_has_url();
   inline void set_has_digests();
   inline void clear_has_digests();
   inline void set_has_length();
   inline void clear_has_length();
@@ -2984,16 +3209,17 @@ class ClientDownloadRequest : public ::g
   ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_ArchivedBinary > archived_binary_;
   int download_type_;
   bool user_initiated_;
   bool archive_valid_;
   bool skipped_url_whitelist_;
   bool skipped_certificate_whitelist_;
   ::safe_browsing::ChromeUserPopulation* population_;
   ::google::protobuf::RepeatedPtrField< ::std::string> alternate_extensions_;
+  ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_URLChainEntry > url_chain_;
   #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
   friend void  protobuf_AddDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto_impl();
   #else
   friend void  protobuf_AddDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
   #endif
   friend void protobuf_AssignDesc_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
   friend void protobuf_ShutdownFile_chromium_2fchrome_2fcommon_2fsafe_5fbrowsing_2fcsd_2eproto();
 
@@ -3188,17 +3414,17 @@ class ClientDownloadResponse : public ::
     ClientDownloadResponse_Verdict_Verdict_MIN;
   static const Verdict Verdict_MAX =
     ClientDownloadResponse_Verdict_Verdict_MAX;
   static const int Verdict_ARRAYSIZE =
     ClientDownloadResponse_Verdict_Verdict_ARRAYSIZE;
 
   // accessors -------------------------------------------------------
 
-  // required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
+  // optional .safe_browsing.ClientDownloadResponse.Verdict verdict = 1 [default = SAFE];
   inline bool has_verdict() const;
   inline void clear_verdict();
   static const int kVerdictFieldNumber = 1;
   inline ::safe_browsing::ClientDownloadResponse_Verdict verdict() const;
   inline void set_verdict(::safe_browsing::ClientDownloadResponse_Verdict value);
 
   // optional .safe_browsing.ClientDownloadResponse.MoreInfo more_info = 2;
   inline bool has_more_info() const;
@@ -12052,16 +12278,421 @@ inline void ClientDownloadRequest_Archiv
   } else {
     clear_has_image_headers();
   }
   // @@protoc_insertion_point(field_set_allocated:safe_browsing.ClientDownloadRequest.ArchivedBinary.image_headers)
 }
 
 // -------------------------------------------------------------------
 
+// ClientDownloadRequest_URLChainEntry
+
+// optional string url = 1;
+inline bool ClientDownloadRequest_URLChainEntry::has_url() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_url() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_url() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_url() {
+  if (url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    url_->clear();
+  }
+  clear_has_url();
+}
+inline const ::std::string& ClientDownloadRequest_URLChainEntry::url() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.url)
+  return *url_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_url(const ::std::string& value) {
+  set_has_url();
+  if (url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    url_ = new ::std::string;
+  }
+  url_->assign(value);
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.url)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_url(const char* value) {
+  set_has_url();
+  if (url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    url_ = new ::std::string;
+  }
+  url_->assign(value);
+  // @@protoc_insertion_point(field_set_char:safe_browsing.ClientDownloadRequest.URLChainEntry.url)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_url(const char* value, size_t size) {
+  set_has_url();
+  if (url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    url_ = new ::std::string;
+  }
+  url_->assign(reinterpret_cast<const char*>(value), size);
+  // @@protoc_insertion_point(field_set_pointer:safe_browsing.ClientDownloadRequest.URLChainEntry.url)
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::mutable_url() {
+  set_has_url();
+  if (url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    url_ = new ::std::string;
+  }
+  // @@protoc_insertion_point(field_mutable:safe_browsing.ClientDownloadRequest.URLChainEntry.url)
+  return url_;
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::release_url() {
+  clear_has_url();
+  if (url_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    return NULL;
+  } else {
+    ::std::string* temp = url_;
+    url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+    return temp;
+  }
+}
+inline void ClientDownloadRequest_URLChainEntry::set_allocated_url(::std::string* url) {
+  if (url_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete url_;
+  }
+  if (url) {
+    set_has_url();
+    url_ = url;
+  } else {
+    clear_has_url();
+    url_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  }
+  // @@protoc_insertion_point(field_set_allocated:safe_browsing.ClientDownloadRequest.URLChainEntry.url)
+}
+
+// optional .safe_browsing.ClientDownloadRequest.URLChainEntry.URLType type = 2;
+inline bool ClientDownloadRequest_URLChainEntry::has_type() const {
+  return (_has_bits_[0] & 0x00000002u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_type() {
+  _has_bits_[0] |= 0x00000002u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_type() {
+  _has_bits_[0] &= ~0x00000002u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_type() {
+  type_ = 1;
+  clear_has_type();
+}
+inline ::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType ClientDownloadRequest_URLChainEntry::type() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.type)
+  return static_cast< ::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType >(type_);
+}
+inline void ClientDownloadRequest_URLChainEntry::set_type(::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType value) {
+  assert(::safe_browsing::ClientDownloadRequest_URLChainEntry_URLType_IsValid(value));
+  set_has_type();
+  type_ = value;
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.type)
+}
+
+// optional string ip_address = 3;
+inline bool ClientDownloadRequest_URLChainEntry::has_ip_address() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_ip_address() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_ip_address() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_ip_address() {
+  if (ip_address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    ip_address_->clear();
+  }
+  clear_has_ip_address();
+}
+inline const ::std::string& ClientDownloadRequest_URLChainEntry::ip_address() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.ip_address)
+  return *ip_address_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_ip_address(const ::std::string& value) {
+  set_has_ip_address();
+  if (ip_address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    ip_address_ = new ::std::string;
+  }
+  ip_address_->assign(value);
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.ip_address)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_ip_address(const char* value) {
+  set_has_ip_address();
+  if (ip_address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    ip_address_ = new ::std::string;
+  }
+  ip_address_->assign(value);
+  // @@protoc_insertion_point(field_set_char:safe_browsing.ClientDownloadRequest.URLChainEntry.ip_address)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_ip_address(const char* value, size_t size) {
+  set_has_ip_address();
+  if (ip_address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    ip_address_ = new ::std::string;
+  }
+  ip_address_->assign(reinterpret_cast<const char*>(value), size);
+  // @@protoc_insertion_point(field_set_pointer:safe_browsing.ClientDownloadRequest.URLChainEntry.ip_address)
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::mutable_ip_address() {
+  set_has_ip_address();
+  if (ip_address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    ip_address_ = new ::std::string;
+  }
+  // @@protoc_insertion_point(field_mutable:safe_browsing.ClientDownloadRequest.URLChainEntry.ip_address)
+  return ip_address_;
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::release_ip_address() {
+  clear_has_ip_address();
+  if (ip_address_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    return NULL;
+  } else {
+    ::std::string* temp = ip_address_;
+    ip_address_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+    return temp;
+  }
+}
+inline void ClientDownloadRequest_URLChainEntry::set_allocated_ip_address(::std::string* ip_address) {
+  if (ip_address_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete ip_address_;
+  }
+  if (ip_address) {
+    set_has_ip_address();
+    ip_address_ = ip_address;
+  } else {
+    clear_has_ip_address();
+    ip_address_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  }
+  // @@protoc_insertion_point(field_set_allocated:safe_browsing.ClientDownloadRequest.URLChainEntry.ip_address)
+}
+
+// optional string referrer = 4;
+inline bool ClientDownloadRequest_URLChainEntry::has_referrer() const {
+  return (_has_bits_[0] & 0x00000008u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_referrer() {
+  _has_bits_[0] |= 0x00000008u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_referrer() {
+  _has_bits_[0] &= ~0x00000008u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_referrer() {
+  if (referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    referrer_->clear();
+  }
+  clear_has_referrer();
+}
+inline const ::std::string& ClientDownloadRequest_URLChainEntry::referrer() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.referrer)
+  return *referrer_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_referrer(const ::std::string& value) {
+  set_has_referrer();
+  if (referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    referrer_ = new ::std::string;
+  }
+  referrer_->assign(value);
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.referrer)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_referrer(const char* value) {
+  set_has_referrer();
+  if (referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    referrer_ = new ::std::string;
+  }
+  referrer_->assign(value);
+  // @@protoc_insertion_point(field_set_char:safe_browsing.ClientDownloadRequest.URLChainEntry.referrer)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_referrer(const char* value, size_t size) {
+  set_has_referrer();
+  if (referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    referrer_ = new ::std::string;
+  }
+  referrer_->assign(reinterpret_cast<const char*>(value), size);
+  // @@protoc_insertion_point(field_set_pointer:safe_browsing.ClientDownloadRequest.URLChainEntry.referrer)
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::mutable_referrer() {
+  set_has_referrer();
+  if (referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    referrer_ = new ::std::string;
+  }
+  // @@protoc_insertion_point(field_mutable:safe_browsing.ClientDownloadRequest.URLChainEntry.referrer)
+  return referrer_;
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::release_referrer() {
+  clear_has_referrer();
+  if (referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    return NULL;
+  } else {
+    ::std::string* temp = referrer_;
+    referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+    return temp;
+  }
+}
+inline void ClientDownloadRequest_URLChainEntry::set_allocated_referrer(::std::string* referrer) {
+  if (referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete referrer_;
+  }
+  if (referrer) {
+    set_has_referrer();
+    referrer_ = referrer;
+  } else {
+    clear_has_referrer();
+    referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  }
+  // @@protoc_insertion_point(field_set_allocated:safe_browsing.ClientDownloadRequest.URLChainEntry.referrer)
+}
+
+// optional string main_frame_referrer = 5;
+inline bool ClientDownloadRequest_URLChainEntry::has_main_frame_referrer() const {
+  return (_has_bits_[0] & 0x00000010u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_main_frame_referrer() {
+  _has_bits_[0] |= 0x00000010u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_main_frame_referrer() {
+  _has_bits_[0] &= ~0x00000010u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_main_frame_referrer() {
+  if (main_frame_referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    main_frame_referrer_->clear();
+  }
+  clear_has_main_frame_referrer();
+}
+inline const ::std::string& ClientDownloadRequest_URLChainEntry::main_frame_referrer() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.main_frame_referrer)
+  return *main_frame_referrer_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_main_frame_referrer(const ::std::string& value) {
+  set_has_main_frame_referrer();
+  if (main_frame_referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    main_frame_referrer_ = new ::std::string;
+  }
+  main_frame_referrer_->assign(value);
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.main_frame_referrer)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_main_frame_referrer(const char* value) {
+  set_has_main_frame_referrer();
+  if (main_frame_referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    main_frame_referrer_ = new ::std::string;
+  }
+  main_frame_referrer_->assign(value);
+  // @@protoc_insertion_point(field_set_char:safe_browsing.ClientDownloadRequest.URLChainEntry.main_frame_referrer)
+}
+inline void ClientDownloadRequest_URLChainEntry::set_main_frame_referrer(const char* value, size_t size) {
+  set_has_main_frame_referrer();
+  if (main_frame_referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    main_frame_referrer_ = new ::std::string;
+  }
+  main_frame_referrer_->assign(reinterpret_cast<const char*>(value), size);
+  // @@protoc_insertion_point(field_set_pointer:safe_browsing.ClientDownloadRequest.URLChainEntry.main_frame_referrer)
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::mutable_main_frame_referrer() {
+  set_has_main_frame_referrer();
+  if (main_frame_referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    main_frame_referrer_ = new ::std::string;
+  }
+  // @@protoc_insertion_point(field_mutable:safe_browsing.ClientDownloadRequest.URLChainEntry.main_frame_referrer)
+  return main_frame_referrer_;
+}
+inline ::std::string* ClientDownloadRequest_URLChainEntry::release_main_frame_referrer() {
+  clear_has_main_frame_referrer();
+  if (main_frame_referrer_ == &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    return NULL;
+  } else {
+    ::std::string* temp = main_frame_referrer_;
+    main_frame_referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+    return temp;
+  }
+}
+inline void ClientDownloadRequest_URLChainEntry::set_allocated_main_frame_referrer(::std::string* main_frame_referrer) {
+  if (main_frame_referrer_ != &::google::protobuf::internal::GetEmptyStringAlreadyInited()) {
+    delete main_frame_referrer_;
+  }
+  if (main_frame_referrer) {
+    set_has_main_frame_referrer();
+    main_frame_referrer_ = main_frame_referrer;
+  } else {
+    clear_has_main_frame_referrer();
+    main_frame_referrer_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
+  }
+  // @@protoc_insertion_point(field_set_allocated:safe_browsing.ClientDownloadRequest.URLChainEntry.main_frame_referrer)
+}
+
+// optional bool is_retargeting = 6;
+inline bool ClientDownloadRequest_URLChainEntry::has_is_retargeting() const {
+  return (_has_bits_[0] & 0x00000020u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_is_retargeting() {
+  _has_bits_[0] |= 0x00000020u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_is_retargeting() {
+  _has_bits_[0] &= ~0x00000020u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_is_retargeting() {
+  is_retargeting_ = false;
+  clear_has_is_retargeting();
+}
+inline bool ClientDownloadRequest_URLChainEntry::is_retargeting() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.is_retargeting)
+  return is_retargeting_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_is_retargeting(bool value) {
+  set_has_is_retargeting();
+  is_retargeting_ = value;
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.is_retargeting)
+}
+
+// optional bool is_user_initiated = 7;
+inline bool ClientDownloadRequest_URLChainEntry::has_is_user_initiated() const {
+  return (_has_bits_[0] & 0x00000040u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_is_user_initiated() {
+  _has_bits_[0] |= 0x00000040u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_is_user_initiated() {
+  _has_bits_[0] &= ~0x00000040u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_is_user_initiated() {
+  is_user_initiated_ = false;
+  clear_has_is_user_initiated();
+}
+inline bool ClientDownloadRequest_URLChainEntry::is_user_initiated() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.is_user_initiated)
+  return is_user_initiated_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_is_user_initiated(bool value) {
+  set_has_is_user_initiated();
+  is_user_initiated_ = value;
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.is_user_initiated)
+}
+
+// optional double timestamp_in_millisec = 8;
+inline bool ClientDownloadRequest_URLChainEntry::has_timestamp_in_millisec() const {
+  return (_has_bits_[0] & 0x00000080u) != 0;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_has_timestamp_in_millisec() {
+  _has_bits_[0] |= 0x00000080u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_has_timestamp_in_millisec() {
+  _has_bits_[0] &= ~0x00000080u;
+}
+inline void ClientDownloadRequest_URLChainEntry::clear_timestamp_in_millisec() {
+  timestamp_in_millisec_ = 0;
+  clear_has_timestamp_in_millisec();
+}
+inline double ClientDownloadRequest_URLChainEntry::timestamp_in_millisec() const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.URLChainEntry.timestamp_in_millisec)
+  return timestamp_in_millisec_;
+}
+inline void ClientDownloadRequest_URLChainEntry::set_timestamp_in_millisec(double value) {
+  set_has_timestamp_in_millisec();
+  timestamp_in_millisec_ = value;
+  // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.URLChainEntry.timestamp_in_millisec)
+}
+
+// -------------------------------------------------------------------
+
 // ClientDownloadRequest
 
 // required string url = 1;
 inline bool ClientDownloadRequest::has_url() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
 inline void ClientDownloadRequest::set_has_url() {
   _has_bits_[0] |= 0x00000001u;
@@ -12667,17 +13298,17 @@ inline bool ClientDownloadRequest::skipp
   return skipped_certificate_whitelist_;
 }
 inline void ClientDownloadRequest::set_skipped_certificate_whitelist(bool value) {
   set_has_skipped_certificate_whitelist();
   skipped_certificate_whitelist_ = value;
   // @@protoc_insertion_point(field_set:safe_browsing.ClientDownloadRequest.skipped_certificate_whitelist)
 }
 
-// repeated string alternate_extensions = 32;
+// repeated string alternate_extensions = 35;
 inline int ClientDownloadRequest::alternate_extensions_size() const {
   return alternate_extensions_.size();
 }
 inline void ClientDownloadRequest::clear_alternate_extensions() {
   alternate_extensions_.Clear();
 }
 inline const ::std::string& ClientDownloadRequest::alternate_extensions(int index) const {
   // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.alternate_extensions)
@@ -12721,16 +13352,46 @@ ClientDownloadRequest::alternate_extensi
   return alternate_extensions_;
 }
 inline ::google::protobuf::RepeatedPtrField< ::std::string>*
 ClientDownloadRequest::mutable_alternate_extensions() {
   // @@protoc_insertion_point(field_mutable_list:safe_browsing.ClientDownloadRequest.alternate_extensions)
   return &alternate_extensions_;
 }
 
+// repeated .safe_browsing.ClientDownloadRequest.URLChainEntry url_chain = 36;
+inline int ClientDownloadRequest::url_chain_size() const {
+  return url_chain_.size();
+}
+inline void ClientDownloadRequest::clear_url_chain() {
+  url_chain_.Clear();
+}
+inline const ::safe_browsing::ClientDownloadRequest_URLChainEntry& ClientDownloadRequest::url_chain(int index) const {
+  // @@protoc_insertion_point(field_get:safe_browsing.ClientDownloadRequest.url_chain)
+  return url_chain_.Get(index);
+}
+inline ::safe_browsing::ClientDownloadRequest_URLChainEntry* ClientDownloadRequest::mutable_url_chain(int index) {
+  // @@protoc_insertion_point(field_mutable:safe_browsing.ClientDownloadRequest.url_chain)
+  return url_chain_.Mutable(index);
+}
+inline ::safe_browsing::ClientDownloadRequest_URLChainEntry* ClientDownloadRequest::add_url_chain() {
+  // @@protoc_insertion_point(field_add:safe_browsing.ClientDownloadRequest.url_chain)
+  return url_chain_.Add();
+}
+inline const ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_URLChainEntry >&
+ClientDownloadRequest::url_chain() const {
+  // @@protoc_insertion_point(field_list:safe_browsing.ClientDownloadRequest.url_chain)
+  return url_chain_;
+}
+inline ::google::protobuf::RepeatedPtrField< ::safe_browsing::ClientDownloadRequest_URLChainEntry >*
+ClientDownloadRequest::mutable_url_chain() {
+  // @@protoc_insertion_point(field_mutable_list:safe_browsing.ClientDownloadRequest.url_chain)
+  return &url_chain_;
+}
+
 // -------------------------------------------------------------------
 
 // ClientDownloadResponse_MoreInfo
 
 // optional string description = 1;
 inline bool ClientDownloadResponse_MoreInfo::has_description() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -12881,17 +13542,17 @@ inline void ClientDownloadResponse_MoreI
   }
   // @@protoc_insertion_point(field_set_allocated:safe_browsing.ClientDownloadResponse.MoreInfo.url)
 }
 
 // -------------------------------------------------------------------
 
 // ClientDownloadResponse
 
-// required .safe_browsing.ClientDownloadResponse.Verdict verdict = 1;
+// optional .safe_browsing.ClientDownloadResponse.Verdict verdict = 1 [default = SAFE];
 inline bool ClientDownloadResponse::has_verdict() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
 inline void ClientDownloadResponse::set_has_verdict() {
   _has_bits_[0] |= 0x00000001u;
 }
 inline void ClientDownloadResponse::clear_has_verdict() {
   _has_bits_[0] &= ~0x00000001u;
--- a/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto
+++ b/toolkit/components/downloads/chromium/chrome/common/safe_browsing/csd.proto
@@ -375,17 +375,56 @@ message ClientDownloadRequest {
   optional bool skipped_url_whitelist = 28;
 
   // True if this ClientDownloadRequest contains a whitelisted certificate.
   optional bool skipped_certificate_whitelist = 31;
 
   // PPAPI_SAVE_REQUEST type messages may have more than one suggested filetype.
   // Each element in this collection indicates an alternate extension including
   // the leading extension separator.
-  repeated string alternate_extensions = 32;
+  repeated string alternate_extensions = 35;
+
+  message URLChainEntry {
+    enum URLType {
+      DOWNLOAD_URL = 1;
+      DOWNLOAD_REFERRER = 2;
+      LANDING_PAGE = 3;
+      LANDING_REFERRER = 4;
+      CLIENT_REDIRECT = 5;
+      SERVER_REDIRECT = 6;
+    }
+
+    // [required] The url of this Entry.
+    optional string url = 1;
+
+    // Type of URLs, such as download url, download referrer, etc.
+    optional URLType type = 2;
+
+    // IP address corresponding to url.
+    optional string ip_address = 3;
+
+    // Referrer url of this entry.
+    optional string referrer = 4;
+
+    // Main frame URL of referrer.
+    optional string main_frame_referrer = 5;
+
+    // If this URL loads in a different tab/frame from previous one.
+    optional bool is_retargeting = 6;
+
+    // If there is a user gesture attached to this transition.
+    optional bool is_user_initiated = 7;
+
+    optional double timestamp_in_millisec = 8;
+  }  // End of URLChainEntry
+
+  // URLs transitions from landing referrer to download in reverse chronological
+  // order, i.e. download url comes first in this list, and landing referrer
+  // comes last.
+  repeated URLChainEntry url_chain = 36;
 }
 
 message ClientDownloadResponse {
   enum Verdict {
     // Download is considered safe.
     SAFE = 0;
     // Download is considered dangerous.  Chrome should show a warning to the
     // user.
@@ -395,17 +434,17 @@ message ClientDownloadResponse {
     // The download is potentially unwanted.
     POTENTIALLY_UNWANTED = 3;
     // The download is from a dangerous host.
     DANGEROUS_HOST = 4;
     // The backend doesn't have confidence in its verdict of this file.
     // Chrome should show the default warning if configured for this file type.
     UNKNOWN = 5;
   }
-  required Verdict verdict = 1;
+  optional Verdict verdict = 1 [default = SAFE];
 
   message MoreInfo {
     // A human-readable string describing the nature of the warning.
     // Only if verdict != SAFE. Localized based on request.locale.
     optional string description = 1;
 
     // A URL to get more information about this warning, if available.
     optional string url = 2;