Bug 1331139 - Sync safebrowsing.proto from Chromium. r=francois
authorThomas Nguyen <tnguyen@mozilla.com>
Mon, 27 Feb 2017 12:18:50 +0800
changeset 394059 c2fbddc3469aeb1e47c33f37eeeea8352c01afd7
parent 394058 2bd28e8cf65f33cb52cd2ab46172669433339a7e
child 394060 370364bfc2b5a266e67b63fab5eb9f800220601b
push id1468
push userasasaki@mozilla.com
push dateMon, 05 Jun 2017 19:31:07 +0000
treeherdermozilla-release@0641fc6ee9d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfrancois
bugs1331139
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1331139 - Sync safebrowsing.proto from Chromium. r=francois MozReview-Commit-ID: KWi8wWhqCcr
toolkit/components/url-classifier/chromium/safebrowsing.proto
toolkit/components/url-classifier/protobuf/safebrowsing.pb.cc
toolkit/components/url-classifier/protobuf/safebrowsing.pb.h
--- a/toolkit/components/url-classifier/chromium/safebrowsing.proto
+++ b/toolkit/components/url-classifier/chromium/safebrowsing.proto
@@ -106,16 +106,19 @@ message FetchThreatListUpdatesRequest {
     }
 
     // The constraints associated with this request.
     optional Constraints constraints = 4;
   }
 
   // The requested threat list updates.
   repeated ListUpdateRequest list_update_requests = 3;
+
+  // Chrome-specific client information.
+  optional ChromeClientInfo chrome_client_info = 4;
 }
 
 // Response type for threat list update requests.
 message FetchThreatListUpdatesResponse {
   // An update to an individual list.
   message ListUpdateResponse {
     // The threat type for which data is returned.
     optional ThreatType threat_type = 1;
@@ -144,18 +147,18 @@ message FetchThreatListUpdatesResponse {
     // client when the response is received.
     optional ResponseType response_type = 4;
 
     // A set of entries to add to a local threat type's list. Repeated to allow
     // for a combination of compressed and raw data to be sent in a single
     // response.
     repeated ThreatEntrySet additions = 5;
 
-    // A set of entries to remove from a local threat type's list. Repeated for
-    // the same reason as above.
+    // A set of entries to remove from a local threat type's list. In practice,
+    // this field is empty or contains exactly one ThreatEntrySet.
     repeated ThreatEntrySet removals = 6;
 
     // The new client state, in encrypted format. Opaque to clients.
     optional bytes new_client_state = 7;
 
     // The expected SHA256 hash of the client state; that is, of the sorted list
     // of all hashes present in the database after applying the provided update.
     // If the client state doesn't match the expected state, the client must
@@ -262,16 +265,32 @@ enum ThreatType {
   // Potentially harmful application threat type.
   POTENTIALLY_HARMFUL_APPLICATION = 4;
 
   // Social engineering threat type for internal use.
   SOCIAL_ENGINEERING = 5;
 
   // API abuse threat type.
   API_ABUSE = 6;
+
+  // Malicious binary threat type.
+  MALICIOUS_BINARY = 7;
+
+  // Client side detection whitelist threat type.
+  CSD_WHITELIST = 8;
+
+  // Client side download detection whitelist threat type.
+  CSD_DOWNLOAD_WHITELIST = 9;
+
+  // Client incident threat type.
+  CLIENT_INCIDENT = 10;
+
+  // Patterns to be used for activating the subresource filter. Interstitial
+  // will not be shown for patterns from this list.
+  SUBRESOURCE_FILTER = 13;
 }
 
 // Types of platforms.
 enum PlatformType {
   // Unknown platform.
   PLATFORM_TYPE_UNSPECIFIED = 0;
 
   // Threat posed to Windows.
@@ -306,16 +325,38 @@ message ClientInfo {
   // A client ID that (hopefully) uniquely identifies the client implementation
   // of the Safe Browsing API.
   optional string client_id = 1;
 
   // The version of the client implementation.
   optional string client_version = 2;
 }
 
+// The client metadata associated with Safe Browsing API requests specific to
+// users of Chrome.
+message ChromeClientInfo {
+  // Safe Browsing reporting populations in Chrome.
+  enum SafeBrowsingReportingPopulation {
+    // Unspecified reporting verbosity.
+    UNSPECIFIED = 0;
+
+    // Client is opted out of reporting.
+    OPT_OUT = 1;
+
+    // Legacy extended reporting population.
+    EXTENDED = 2;
+
+    // Scout reporting population.
+    SCOUT = 3;
+  }
+
+  // The reporting population of the user.
+  optional SafeBrowsingReportingPopulation reporting_population = 1;
+}
+
 // The expected state of a client's local database.
 message Checksum {
   // The SHA256 hash of the client state; that is, of the sorted list of all
   // hashes present in the database.
   optional bytes sha256 = 1;
 }
 
 // The ways in which threat entry sets can be compressed.
@@ -349,16 +390,25 @@ enum ThreatEntryType {
   // A host-suffix/path-prefix URL expression; for example, "foo.bar.com/baz/".
   URL = 1;
 
   // An executable program.
   EXECUTABLE = 2;
 
   // An IP range.
   IP_RANGE = 3;
+
+  // Chrome extension.
+  CHROME_EXTENSION = 4;
+
+  // Filename.
+  FILENAME = 5;
+
+  // CERT.
+  CERT = 6;
 }
 
 // A set of threats that should be added or removed from a client's local
 // database.
 message ThreatEntrySet {
   // The compression type for the entries in this set.
   optional CompressionType compression_type = 1;
 
--- a/toolkit/components/url-classifier/protobuf/safebrowsing.pb.cc
+++ b/toolkit/components/url-classifier/protobuf/safebrowsing.pb.cc
@@ -26,16 +26,17 @@ void protobuf_ShutdownFile_safebrowsing_
   delete FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::default_instance_;
   delete FetchThreatListUpdatesResponse::default_instance_;
   delete FetchThreatListUpdatesResponse_ListUpdateResponse::default_instance_;
   delete FindFullHashesRequest::default_instance_;
   delete FindFullHashesResponse::default_instance_;
   delete ThreatHit::default_instance_;
   delete ThreatHit_ThreatSource::default_instance_;
   delete ClientInfo::default_instance_;
+  delete ChromeClientInfo::default_instance_;
   delete Checksum::default_instance_;
   delete ThreatEntry::default_instance_;
   delete ThreatEntrySet::default_instance_;
   delete RawIndices::default_instance_;
   delete RawHashes::default_instance_;
   delete RiceDeltaEncoding::default_instance_;
   delete ThreatEntryMetadata::default_instance_;
   delete ThreatEntryMetadata_MetadataEntry::default_instance_;
@@ -65,16 +66,17 @@ void protobuf_AddDesc_safebrowsing_2epro
   FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::default_instance_ = new FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints();
   FetchThreatListUpdatesResponse::default_instance_ = new FetchThreatListUpdatesResponse();
   FetchThreatListUpdatesResponse_ListUpdateResponse::default_instance_ = new FetchThreatListUpdatesResponse_ListUpdateResponse();
   FindFullHashesRequest::default_instance_ = new FindFullHashesRequest();
   FindFullHashesResponse::default_instance_ = new FindFullHashesResponse();
   ThreatHit::default_instance_ = new ThreatHit();
   ThreatHit_ThreatSource::default_instance_ = new ThreatHit_ThreatSource();
   ClientInfo::default_instance_ = new ClientInfo();
+  ChromeClientInfo::default_instance_ = new ChromeClientInfo();
   Checksum::default_instance_ = new Checksum();
   ThreatEntry::default_instance_ = new ThreatEntry();
   ThreatEntrySet::default_instance_ = new ThreatEntrySet();
   RawIndices::default_instance_ = new RawIndices();
   RawHashes::default_instance_ = new RawHashes();
   RiceDeltaEncoding::default_instance_ = new RiceDeltaEncoding();
   ThreatEntryMetadata::default_instance_ = new ThreatEntryMetadata();
   ThreatEntryMetadata_MetadataEntry::default_instance_ = new ThreatEntryMetadata_MetadataEntry();
@@ -90,16 +92,17 @@ void protobuf_AddDesc_safebrowsing_2epro
   FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints::default_instance_->InitAsDefaultInstance();
   FetchThreatListUpdatesResponse::default_instance_->InitAsDefaultInstance();
   FetchThreatListUpdatesResponse_ListUpdateResponse::default_instance_->InitAsDefaultInstance();
   FindFullHashesRequest::default_instance_->InitAsDefaultInstance();
   FindFullHashesResponse::default_instance_->InitAsDefaultInstance();
   ThreatHit::default_instance_->InitAsDefaultInstance();
   ThreatHit_ThreatSource::default_instance_->InitAsDefaultInstance();
   ClientInfo::default_instance_->InitAsDefaultInstance();
+  ChromeClientInfo::default_instance_->InitAsDefaultInstance();
   Checksum::default_instance_->InitAsDefaultInstance();
   ThreatEntry::default_instance_->InitAsDefaultInstance();
   ThreatEntrySet::default_instance_->InitAsDefaultInstance();
   RawIndices::default_instance_->InitAsDefaultInstance();
   RawHashes::default_instance_->InitAsDefaultInstance();
   RiceDeltaEncoding::default_instance_->InitAsDefaultInstance();
   ThreatEntryMetadata::default_instance_->InitAsDefaultInstance();
   ThreatEntryMetadata_MetadataEntry::default_instance_->InitAsDefaultInstance();
@@ -127,16 +130,21 @@ bool ThreatType_IsValid(int value) {
   switch(value) {
     case 0:
     case 1:
     case 2:
     case 3:
     case 4:
     case 5:
     case 6:
+    case 7:
+    case 8:
+    case 9:
+    case 10:
+    case 13:
       return true;
     default:
       return false;
   }
 }
 
 bool PlatformType_IsValid(int value) {
   switch(value) {
@@ -167,16 +175,19 @@ bool CompressionType_IsValid(int value) 
 }
 
 bool ThreatEntryType_IsValid(int value) {
   switch(value) {
     case 0:
     case 1:
     case 2:
     case 3:
+    case 4:
+    case 5:
+    case 6:
       return true;
     default:
       return false;
   }
 }
 
 
 // ===================================================================
@@ -2056,58 +2067,67 @@ void FetchThreatListUpdatesRequest_ListU
 }
 
 
 // -------------------------------------------------------------------
 
 #ifndef _MSC_VER
 const int FetchThreatListUpdatesRequest::kClientFieldNumber;
 const int FetchThreatListUpdatesRequest::kListUpdateRequestsFieldNumber;
+const int FetchThreatListUpdatesRequest::kChromeClientInfoFieldNumber;
 #endif  // !_MSC_VER
 
 FetchThreatListUpdatesRequest::FetchThreatListUpdatesRequest()
   : ::google::protobuf::MessageLite() {
   SharedCtor();
   // @@protoc_insertion_point(constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest)
 }
 
 void FetchThreatListUpdatesRequest::InitAsDefaultInstance() {
 #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
   client_ = const_cast< ::mozilla::safebrowsing::ClientInfo*>(
       ::mozilla::safebrowsing::ClientInfo::internal_default_instance());
 #else
   client_ = const_cast< ::mozilla::safebrowsing::ClientInfo*>(&::mozilla::safebrowsing::ClientInfo::default_instance());
 #endif
+#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  chrome_client_info_ = const_cast< ::mozilla::safebrowsing::ChromeClientInfo*>(
+      ::mozilla::safebrowsing::ChromeClientInfo::internal_default_instance());
+#else
+  chrome_client_info_ = const_cast< ::mozilla::safebrowsing::ChromeClientInfo*>(&::mozilla::safebrowsing::ChromeClientInfo::default_instance());
+#endif
 }
 
 FetchThreatListUpdatesRequest::FetchThreatListUpdatesRequest(const FetchThreatListUpdatesRequest& from)
   : ::google::protobuf::MessageLite() {
   SharedCtor();
   MergeFrom(from);
   // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest)
 }
 
 void FetchThreatListUpdatesRequest::SharedCtor() {
   _cached_size_ = 0;
   client_ = NULL;
+  chrome_client_info_ = NULL;
   ::memset(_has_bits_, 0, sizeof(_has_bits_));
 }
 
 FetchThreatListUpdatesRequest::~FetchThreatListUpdatesRequest() {
   // @@protoc_insertion_point(destructor:mozilla.safebrowsing.FetchThreatListUpdatesRequest)
   SharedDtor();
 }
 
 void FetchThreatListUpdatesRequest::SharedDtor() {
   #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
   if (this != &default_instance()) {
   #else
   if (this != default_instance_) {
   #endif
     delete client_;
+    delete chrome_client_info_;
   }
 }
 
 void FetchThreatListUpdatesRequest::SetCachedSize(int size) const {
   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
   _cached_size_ = size;
   GOOGLE_SAFE_CONCURRENT_WRITES_END();
 }
@@ -2122,18 +2142,23 @@ const FetchThreatListUpdatesRequest& Fet
 
 FetchThreatListUpdatesRequest* FetchThreatListUpdatesRequest::default_instance_ = NULL;
 
 FetchThreatListUpdatesRequest* FetchThreatListUpdatesRequest::New() const {
   return new FetchThreatListUpdatesRequest;
 }
 
 void FetchThreatListUpdatesRequest::Clear() {
-  if (has_client()) {
-    if (client_ != NULL) client_->::mozilla::safebrowsing::ClientInfo::Clear();
+  if (_has_bits_[0 / 32] & 5) {
+    if (has_client()) {
+      if (client_ != NULL) client_->::mozilla::safebrowsing::ClientInfo::Clear();
+    }
+    if (has_chrome_client_info()) {
+      if (chrome_client_info_ != NULL) chrome_client_info_->::mozilla::safebrowsing::ChromeClientInfo::Clear();
+    }
   }
   list_update_requests_.Clear();
   ::memset(_has_bits_, 0, sizeof(_has_bits_));
   mutable_unknown_fields()->clear();
 }
 
 bool FetchThreatListUpdatesRequest::MergePartialFromCodedStream(
     ::google::protobuf::io::CodedInputStream* input) {
@@ -2166,16 +2191,29 @@ bool FetchThreatListUpdatesRequest::Merg
         if (tag == 26) {
          parse_list_update_requests:
           DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
                 input, add_list_update_requests()));
         } else {
           goto handle_unusual;
         }
         if (input->ExpectTag(26)) goto parse_list_update_requests;
+        if (input->ExpectTag(34)) goto parse_chrome_client_info;
+        break;
+      }
+
+      // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4;
+      case 4: {
+        if (tag == 34) {
+         parse_chrome_client_info:
+          DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual(
+               input, mutable_chrome_client_info()));
+        } else {
+          goto handle_unusual;
+        }
         if (input->ExpectAtEnd()) goto success;
         break;
       }
 
       default: {
       handle_unusual:
         if (tag == 0 ||
             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
@@ -2207,32 +2245,45 @@ void FetchThreatListUpdatesRequest::Seri
   }
 
   // repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3;
   for (int i = 0; i < this->list_update_requests_size(); i++) {
     ::google::protobuf::internal::WireFormatLite::WriteMessage(
       3, this->list_update_requests(i), output);
   }
 
+  // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4;
+  if (has_chrome_client_info()) {
+    ::google::protobuf::internal::WireFormatLite::WriteMessage(
+      4, this->chrome_client_info(), output);
+  }
+
   output->WriteRaw(unknown_fields().data(),
                    unknown_fields().size());
   // @@protoc_insertion_point(serialize_end:mozilla.safebrowsing.FetchThreatListUpdatesRequest)
 }
 
 int FetchThreatListUpdatesRequest::ByteSize() const {
   int total_size = 0;
 
   if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
     // optional .mozilla.safebrowsing.ClientInfo client = 1;
     if (has_client()) {
       total_size += 1 +
         ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
           this->client());
     }
 
+    // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4;
+    if (has_chrome_client_info()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
+          this->chrome_client_info());
+    }
+
   }
   // repeated .mozilla.safebrowsing.FetchThreatListUpdatesRequest.ListUpdateRequest list_update_requests = 3;
   total_size += 1 * this->list_update_requests_size();
   for (int i = 0; i < this->list_update_requests_size(); i++) {
     total_size +=
       ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual(
         this->list_update_requests(i));
   }
@@ -2252,16 +2303,19 @@ void FetchThreatListUpdatesRequest::Chec
 
 void FetchThreatListUpdatesRequest::MergeFrom(const FetchThreatListUpdatesRequest& from) {
   GOOGLE_CHECK_NE(&from, this);
   list_update_requests_.MergeFrom(from.list_update_requests_);
   if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
     if (from.has_client()) {
       mutable_client()->::mozilla::safebrowsing::ClientInfo::MergeFrom(from.client());
     }
+    if (from.has_chrome_client_info()) {
+      mutable_chrome_client_info()->::mozilla::safebrowsing::ChromeClientInfo::MergeFrom(from.chrome_client_info());
+    }
   }
   mutable_unknown_fields()->append(from.unknown_fields());
 }
 
 void FetchThreatListUpdatesRequest::CopyFrom(const FetchThreatListUpdatesRequest& from) {
   if (&from == this) return;
   Clear();
   MergeFrom(from);
@@ -2271,16 +2325,17 @@ bool FetchThreatListUpdatesRequest::IsIn
 
   return true;
 }
 
 void FetchThreatListUpdatesRequest::Swap(FetchThreatListUpdatesRequest* other) {
   if (other != this) {
     std::swap(client_, other->client_);
     list_update_requests_.Swap(&other->list_update_requests_);
+    std::swap(chrome_client_info_, other->chrome_client_info_);
     std::swap(_has_bits_[0], other->_has_bits_[0]);
     _unknown_fields_.swap(other->_unknown_fields_);
     std::swap(_cached_size_, other->_cached_size_);
   }
 }
 
 ::std::string FetchThreatListUpdatesRequest::GetTypeName() const {
   return "mozilla.safebrowsing.FetchThreatListUpdatesRequest";
@@ -4470,16 +4525,234 @@ void ClientInfo::Swap(ClientInfo* other)
 
 ::std::string ClientInfo::GetTypeName() const {
   return "mozilla.safebrowsing.ClientInfo";
 }
 
 
 // ===================================================================
 
+bool ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(int value) {
+  switch(value) {
+    case 0:
+    case 1:
+    case 2:
+    case 3:
+      return true;
+    default:
+      return false;
+  }
+}
+
+#ifndef _MSC_VER
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::UNSPECIFIED;
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::OPT_OUT;
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::EXTENDED;
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::SCOUT;
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::SafeBrowsingReportingPopulation_MIN;
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::SafeBrowsingReportingPopulation_MAX;
+const int ChromeClientInfo::SafeBrowsingReportingPopulation_ARRAYSIZE;
+#endif  // _MSC_VER
+#ifndef _MSC_VER
+const int ChromeClientInfo::kReportingPopulationFieldNumber;
+#endif  // !_MSC_VER
+
+ChromeClientInfo::ChromeClientInfo()
+  : ::google::protobuf::MessageLite() {
+  SharedCtor();
+  // @@protoc_insertion_point(constructor:mozilla.safebrowsing.ChromeClientInfo)
+}
+
+void ChromeClientInfo::InitAsDefaultInstance() {
+}
+
+ChromeClientInfo::ChromeClientInfo(const ChromeClientInfo& from)
+  : ::google::protobuf::MessageLite() {
+  SharedCtor();
+  MergeFrom(from);
+  // @@protoc_insertion_point(copy_constructor:mozilla.safebrowsing.ChromeClientInfo)
+}
+
+void ChromeClientInfo::SharedCtor() {
+  _cached_size_ = 0;
+  reporting_population_ = 0;
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+}
+
+ChromeClientInfo::~ChromeClientInfo() {
+  // @@protoc_insertion_point(destructor:mozilla.safebrowsing.ChromeClientInfo)
+  SharedDtor();
+}
+
+void ChromeClientInfo::SharedDtor() {
+  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  if (this != &default_instance()) {
+  #else
+  if (this != default_instance_) {
+  #endif
+  }
+}
+
+void ChromeClientInfo::SetCachedSize(int size) const {
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+}
+const ChromeClientInfo& ChromeClientInfo::default_instance() {
+#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  protobuf_AddDesc_safebrowsing_2eproto();
+#else
+  if (default_instance_ == NULL) protobuf_AddDesc_safebrowsing_2eproto();
+#endif
+  return *default_instance_;
+}
+
+ChromeClientInfo* ChromeClientInfo::default_instance_ = NULL;
+
+ChromeClientInfo* ChromeClientInfo::New() const {
+  return new ChromeClientInfo;
+}
+
+void ChromeClientInfo::Clear() {
+  reporting_population_ = 0;
+  ::memset(_has_bits_, 0, sizeof(_has_bits_));
+  mutable_unknown_fields()->clear();
+}
+
+bool ChromeClientInfo::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:mozilla.safebrowsing.ChromeClientInfo)
+  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 .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1;
+      case 1: {
+        if (tag == 8) {
+          int value;
+          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
+                   int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>(
+                 input, &value)));
+          if (::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(value)) {
+            set_reporting_population(static_cast< ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation >(value));
+          } else {
+            unknown_fields_stream.WriteVarint32(tag);
+            unknown_fields_stream.WriteVarint32(value);
+          }
+        } 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:mozilla.safebrowsing.ChromeClientInfo)
+  return true;
+failure:
+  // @@protoc_insertion_point(parse_failure:mozilla.safebrowsing.ChromeClientInfo)
+  return false;
+#undef DO_
+}
+
+void ChromeClientInfo::SerializeWithCachedSizes(
+    ::google::protobuf::io::CodedOutputStream* output) const {
+  // @@protoc_insertion_point(serialize_start:mozilla.safebrowsing.ChromeClientInfo)
+  // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1;
+  if (has_reporting_population()) {
+    ::google::protobuf::internal::WireFormatLite::WriteEnum(
+      1, this->reporting_population(), output);
+  }
+
+  output->WriteRaw(unknown_fields().data(),
+                   unknown_fields().size());
+  // @@protoc_insertion_point(serialize_end:mozilla.safebrowsing.ChromeClientInfo)
+}
+
+int ChromeClientInfo::ByteSize() const {
+  int total_size = 0;
+
+  if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1;
+    if (has_reporting_population()) {
+      total_size += 1 +
+        ::google::protobuf::internal::WireFormatLite::EnumSize(this->reporting_population());
+    }
+
+  }
+  total_size += unknown_fields().size();
+
+  GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
+  _cached_size_ = total_size;
+  GOOGLE_SAFE_CONCURRENT_WRITES_END();
+  return total_size;
+}
+
+void ChromeClientInfo::CheckTypeAndMergeFrom(
+    const ::google::protobuf::MessageLite& from) {
+  MergeFrom(*::google::protobuf::down_cast<const ChromeClientInfo*>(&from));
+}
+
+void ChromeClientInfo::MergeFrom(const ChromeClientInfo& from) {
+  GOOGLE_CHECK_NE(&from, this);
+  if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) {
+    if (from.has_reporting_population()) {
+      set_reporting_population(from.reporting_population());
+    }
+  }
+  mutable_unknown_fields()->append(from.unknown_fields());
+}
+
+void ChromeClientInfo::CopyFrom(const ChromeClientInfo& from) {
+  if (&from == this) return;
+  Clear();
+  MergeFrom(from);
+}
+
+bool ChromeClientInfo::IsInitialized() const {
+
+  return true;
+}
+
+void ChromeClientInfo::Swap(ChromeClientInfo* other) {
+  if (other != this) {
+    std::swap(reporting_population_, other->reporting_population_);
+    std::swap(_has_bits_[0], other->_has_bits_[0]);
+    _unknown_fields_.swap(other->_unknown_fields_);
+    std::swap(_cached_size_, other->_cached_size_);
+  }
+}
+
+::std::string ChromeClientInfo::GetTypeName() const {
+  return "mozilla.safebrowsing.ChromeClientInfo";
+}
+
+
+// ===================================================================
+
 #ifndef _MSC_VER
 const int Checksum::kSha256FieldNumber;
 #endif  // !_MSC_VER
 
 Checksum::Checksum()
   : ::google::protobuf::MessageLite() {
   SharedCtor();
   // @@protoc_insertion_point(constructor:mozilla.safebrowsing.Checksum)
--- a/toolkit/components/url-classifier/protobuf/safebrowsing.pb.h
+++ b/toolkit/components/url-classifier/protobuf/safebrowsing.pb.h
@@ -42,16 +42,17 @@ class FetchThreatListUpdatesRequest_List
 class FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints;
 class FetchThreatListUpdatesResponse;
 class FetchThreatListUpdatesResponse_ListUpdateResponse;
 class FindFullHashesRequest;
 class FindFullHashesResponse;
 class ThreatHit;
 class ThreatHit_ThreatSource;
 class ClientInfo;
+class ChromeClientInfo;
 class Checksum;
 class ThreatEntry;
 class ThreatEntrySet;
 class RawIndices;
 class RawHashes;
 class RiceDeltaEncoding;
 class ThreatEntryMetadata;
 class ThreatEntryMetadata_MetadataEntry;
@@ -75,28 +76,44 @@ enum ThreatHit_ThreatSourceType {
   ThreatHit_ThreatSourceType_TAB_URL = 2,
   ThreatHit_ThreatSourceType_TAB_REDIRECT = 3
 };
 bool ThreatHit_ThreatSourceType_IsValid(int value);
 const ThreatHit_ThreatSourceType ThreatHit_ThreatSourceType_ThreatSourceType_MIN = ThreatHit_ThreatSourceType_THREAT_SOURCE_TYPE_UNSPECIFIED;
 const ThreatHit_ThreatSourceType ThreatHit_ThreatSourceType_ThreatSourceType_MAX = ThreatHit_ThreatSourceType_TAB_REDIRECT;
 const int ThreatHit_ThreatSourceType_ThreatSourceType_ARRAYSIZE = ThreatHit_ThreatSourceType_ThreatSourceType_MAX + 1;
 
+enum ChromeClientInfo_SafeBrowsingReportingPopulation {
+  ChromeClientInfo_SafeBrowsingReportingPopulation_UNSPECIFIED = 0,
+  ChromeClientInfo_SafeBrowsingReportingPopulation_OPT_OUT = 1,
+  ChromeClientInfo_SafeBrowsingReportingPopulation_EXTENDED = 2,
+  ChromeClientInfo_SafeBrowsingReportingPopulation_SCOUT = 3
+};
+bool ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(int value);
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MIN = ChromeClientInfo_SafeBrowsingReportingPopulation_UNSPECIFIED;
+const ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MAX = ChromeClientInfo_SafeBrowsingReportingPopulation_SCOUT;
+const int ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_ARRAYSIZE = ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MAX + 1;
+
 enum ThreatType {
   THREAT_TYPE_UNSPECIFIED = 0,
   MALWARE_THREAT = 1,
   SOCIAL_ENGINEERING_PUBLIC = 2,
   UNWANTED_SOFTWARE = 3,
   POTENTIALLY_HARMFUL_APPLICATION = 4,
   SOCIAL_ENGINEERING = 5,
-  API_ABUSE = 6
+  API_ABUSE = 6,
+  MALICIOUS_BINARY = 7,
+  CSD_WHITELIST = 8,
+  CSD_DOWNLOAD_WHITELIST = 9,
+  CLIENT_INCIDENT = 10,
+  SUBRESOURCE_FILTER = 13
 };
 bool ThreatType_IsValid(int value);
 const ThreatType ThreatType_MIN = THREAT_TYPE_UNSPECIFIED;
-const ThreatType ThreatType_MAX = API_ABUSE;
+const ThreatType ThreatType_MAX = SUBRESOURCE_FILTER;
 const int ThreatType_ARRAYSIZE = ThreatType_MAX + 1;
 
 enum PlatformType {
   PLATFORM_TYPE_UNSPECIFIED = 0,
   WINDOWS_PLATFORM = 1,
   LINUX_PLATFORM = 2,
   ANDROID_PLATFORM = 3,
   OSX_PLATFORM = 4,
@@ -119,21 +136,24 @@ bool CompressionType_IsValid(int value);
 const CompressionType CompressionType_MIN = COMPRESSION_TYPE_UNSPECIFIED;
 const CompressionType CompressionType_MAX = RICE;
 const int CompressionType_ARRAYSIZE = CompressionType_MAX + 1;
 
 enum ThreatEntryType {
   THREAT_ENTRY_TYPE_UNSPECIFIED = 0,
   URL = 1,
   EXECUTABLE = 2,
-  IP_RANGE = 3
+  IP_RANGE = 3,
+  CHROME_EXTENSION = 4,
+  FILENAME = 5,
+  CERT = 6
 };
 bool ThreatEntryType_IsValid(int value);
 const ThreatEntryType ThreatEntryType_MIN = THREAT_ENTRY_TYPE_UNSPECIFIED;
-const ThreatEntryType ThreatEntryType_MAX = IP_RANGE;
+const ThreatEntryType ThreatEntryType_MAX = CERT;
 const int ThreatEntryType_ARRAYSIZE = ThreatEntryType_MAX + 1;
 
 // ===================================================================
 
 class ThreatInfo : public ::google::protobuf::MessageLite {
  public:
   ThreatInfo();
   virtual ~ThreatInfo();
@@ -952,27 +972,39 @@ class FetchThreatListUpdatesRequest : pu
   inline const ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest& list_update_requests(int index) const;
   inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* mutable_list_update_requests(int index);
   inline ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest* add_list_update_requests();
   inline const ::google::protobuf::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >&
       list_update_requests() const;
   inline ::google::protobuf::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >*
       mutable_list_update_requests();
 
+  // optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4;
+  inline bool has_chrome_client_info() const;
+  inline void clear_chrome_client_info();
+  static const int kChromeClientInfoFieldNumber = 4;
+  inline const ::mozilla::safebrowsing::ChromeClientInfo& chrome_client_info() const;
+  inline ::mozilla::safebrowsing::ChromeClientInfo* mutable_chrome_client_info();
+  inline ::mozilla::safebrowsing::ChromeClientInfo* release_chrome_client_info();
+  inline void set_allocated_chrome_client_info(::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info);
+
   // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.FetchThreatListUpdatesRequest)
  private:
   inline void set_has_client();
   inline void clear_has_client();
+  inline void set_has_chrome_client_info();
+  inline void clear_has_chrome_client_info();
 
   ::std::string _unknown_fields_;
 
   ::google::protobuf::uint32 _has_bits_[1];
   mutable int _cached_size_;
   ::mozilla::safebrowsing::ClientInfo* client_;
   ::google::protobuf::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest > list_update_requests_;
+  ::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info_;
   #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
   friend void  protobuf_AddDesc_safebrowsing_2eproto_impl();
   #else
   friend void  protobuf_AddDesc_safebrowsing_2eproto();
   #endif
   friend void protobuf_AssignDesc_safebrowsing_2eproto();
   friend void protobuf_ShutdownFile_safebrowsing_2eproto();
 
@@ -1902,16 +1934,122 @@ class ClientInfo : public ::google::prot
   friend void protobuf_AssignDesc_safebrowsing_2eproto();
   friend void protobuf_ShutdownFile_safebrowsing_2eproto();
 
   void InitAsDefaultInstance();
   static ClientInfo* default_instance_;
 };
 // -------------------------------------------------------------------
 
+class ChromeClientInfo : public ::google::protobuf::MessageLite {
+ public:
+  ChromeClientInfo();
+  virtual ~ChromeClientInfo();
+
+  ChromeClientInfo(const ChromeClientInfo& from);
+
+  inline ChromeClientInfo& operator=(const ChromeClientInfo& 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 ChromeClientInfo& 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 ChromeClientInfo* internal_default_instance() {
+    return default_instance_;
+  }
+  #endif
+
+  void Swap(ChromeClientInfo* other);
+
+  // implements Message ----------------------------------------------
+
+  ChromeClientInfo* New() const;
+  void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from);
+  void CopyFrom(const ChromeClientInfo& from);
+  void MergeFrom(const ChromeClientInfo& 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 ChromeClientInfo_SafeBrowsingReportingPopulation SafeBrowsingReportingPopulation;
+  static const SafeBrowsingReportingPopulation UNSPECIFIED = ChromeClientInfo_SafeBrowsingReportingPopulation_UNSPECIFIED;
+  static const SafeBrowsingReportingPopulation OPT_OUT = ChromeClientInfo_SafeBrowsingReportingPopulation_OPT_OUT;
+  static const SafeBrowsingReportingPopulation EXTENDED = ChromeClientInfo_SafeBrowsingReportingPopulation_EXTENDED;
+  static const SafeBrowsingReportingPopulation SCOUT = ChromeClientInfo_SafeBrowsingReportingPopulation_SCOUT;
+  static inline bool SafeBrowsingReportingPopulation_IsValid(int value) {
+    return ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(value);
+  }
+  static const SafeBrowsingReportingPopulation SafeBrowsingReportingPopulation_MIN =
+    ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MIN;
+  static const SafeBrowsingReportingPopulation SafeBrowsingReportingPopulation_MAX =
+    ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_MAX;
+  static const int SafeBrowsingReportingPopulation_ARRAYSIZE =
+    ChromeClientInfo_SafeBrowsingReportingPopulation_SafeBrowsingReportingPopulation_ARRAYSIZE;
+
+  // accessors -------------------------------------------------------
+
+  // optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1;
+  inline bool has_reporting_population() const;
+  inline void clear_reporting_population();
+  static const int kReportingPopulationFieldNumber = 1;
+  inline ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation reporting_population() const;
+  inline void set_reporting_population(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation value);
+
+  // @@protoc_insertion_point(class_scope:mozilla.safebrowsing.ChromeClientInfo)
+ private:
+  inline void set_has_reporting_population();
+  inline void clear_has_reporting_population();
+
+  ::std::string _unknown_fields_;
+
+  ::google::protobuf::uint32 _has_bits_[1];
+  mutable int _cached_size_;
+  int reporting_population_;
+  #ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  friend void  protobuf_AddDesc_safebrowsing_2eproto_impl();
+  #else
+  friend void  protobuf_AddDesc_safebrowsing_2eproto();
+  #endif
+  friend void protobuf_AssignDesc_safebrowsing_2eproto();
+  friend void protobuf_ShutdownFile_safebrowsing_2eproto();
+
+  void InitAsDefaultInstance();
+  static ChromeClientInfo* default_instance_;
+};
+// -------------------------------------------------------------------
+
 class Checksum : public ::google::protobuf::MessageLite {
  public:
   Checksum();
   virtual ~Checksum();
 
   Checksum(const Checksum& from);
 
   inline Checksum& operator=(const Checksum& from) {
@@ -3999,16 +4137,61 @@ FetchThreatListUpdatesRequest::list_upda
   return list_update_requests_;
 }
 inline ::google::protobuf::RepeatedPtrField< ::mozilla::safebrowsing::FetchThreatListUpdatesRequest_ListUpdateRequest >*
 FetchThreatListUpdatesRequest::mutable_list_update_requests() {
   // @@protoc_insertion_point(field_mutable_list:mozilla.safebrowsing.FetchThreatListUpdatesRequest.list_update_requests)
   return &list_update_requests_;
 }
 
+// optional .mozilla.safebrowsing.ChromeClientInfo chrome_client_info = 4;
+inline bool FetchThreatListUpdatesRequest::has_chrome_client_info() const {
+  return (_has_bits_[0] & 0x00000004u) != 0;
+}
+inline void FetchThreatListUpdatesRequest::set_has_chrome_client_info() {
+  _has_bits_[0] |= 0x00000004u;
+}
+inline void FetchThreatListUpdatesRequest::clear_has_chrome_client_info() {
+  _has_bits_[0] &= ~0x00000004u;
+}
+inline void FetchThreatListUpdatesRequest::clear_chrome_client_info() {
+  if (chrome_client_info_ != NULL) chrome_client_info_->::mozilla::safebrowsing::ChromeClientInfo::Clear();
+  clear_has_chrome_client_info();
+}
+inline const ::mozilla::safebrowsing::ChromeClientInfo& FetchThreatListUpdatesRequest::chrome_client_info() const {
+  // @@protoc_insertion_point(field_get:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info)
+#ifdef GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER
+  return chrome_client_info_ != NULL ? *chrome_client_info_ : *default_instance().chrome_client_info_;
+#else
+  return chrome_client_info_ != NULL ? *chrome_client_info_ : *default_instance_->chrome_client_info_;
+#endif
+}
+inline ::mozilla::safebrowsing::ChromeClientInfo* FetchThreatListUpdatesRequest::mutable_chrome_client_info() {
+  set_has_chrome_client_info();
+  if (chrome_client_info_ == NULL) chrome_client_info_ = new ::mozilla::safebrowsing::ChromeClientInfo;
+  // @@protoc_insertion_point(field_mutable:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info)
+  return chrome_client_info_;
+}
+inline ::mozilla::safebrowsing::ChromeClientInfo* FetchThreatListUpdatesRequest::release_chrome_client_info() {
+  clear_has_chrome_client_info();
+  ::mozilla::safebrowsing::ChromeClientInfo* temp = chrome_client_info_;
+  chrome_client_info_ = NULL;
+  return temp;
+}
+inline void FetchThreatListUpdatesRequest::set_allocated_chrome_client_info(::mozilla::safebrowsing::ChromeClientInfo* chrome_client_info) {
+  delete chrome_client_info_;
+  chrome_client_info_ = chrome_client_info;
+  if (chrome_client_info) {
+    set_has_chrome_client_info();
+  } else {
+    clear_has_chrome_client_info();
+  }
+  // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.FetchThreatListUpdatesRequest.chrome_client_info)
+}
+
 // -------------------------------------------------------------------
 
 // FetchThreatListUpdatesResponse_ListUpdateResponse
 
 // optional .mozilla.safebrowsing.ThreatType threat_type = 1;
 inline bool FetchThreatListUpdatesResponse_ListUpdateResponse::has_threat_type() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
@@ -5179,16 +5362,45 @@ inline void ClientInfo::set_allocated_cl
     clear_has_client_version();
     client_version_ = const_cast< ::std::string*>(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
   }
   // @@protoc_insertion_point(field_set_allocated:mozilla.safebrowsing.ClientInfo.client_version)
 }
 
 // -------------------------------------------------------------------
 
+// ChromeClientInfo
+
+// optional .mozilla.safebrowsing.ChromeClientInfo.SafeBrowsingReportingPopulation reporting_population = 1;
+inline bool ChromeClientInfo::has_reporting_population() const {
+  return (_has_bits_[0] & 0x00000001u) != 0;
+}
+inline void ChromeClientInfo::set_has_reporting_population() {
+  _has_bits_[0] |= 0x00000001u;
+}
+inline void ChromeClientInfo::clear_has_reporting_population() {
+  _has_bits_[0] &= ~0x00000001u;
+}
+inline void ChromeClientInfo::clear_reporting_population() {
+  reporting_population_ = 0;
+  clear_has_reporting_population();
+}
+inline ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation ChromeClientInfo::reporting_population() const {
+  // @@protoc_insertion_point(field_get:mozilla.safebrowsing.ChromeClientInfo.reporting_population)
+  return static_cast< ::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation >(reporting_population_);
+}
+inline void ChromeClientInfo::set_reporting_population(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation value) {
+  assert(::mozilla::safebrowsing::ChromeClientInfo_SafeBrowsingReportingPopulation_IsValid(value));
+  set_has_reporting_population();
+  reporting_population_ = value;
+  // @@protoc_insertion_point(field_set:mozilla.safebrowsing.ChromeClientInfo.reporting_population)
+}
+
+// -------------------------------------------------------------------
+
 // Checksum
 
 // optional bytes sha256 = 1;
 inline bool Checksum::has_sha256() const {
   return (_has_bits_[0] & 0x00000001u) != 0;
 }
 inline void Checksum::set_has_sha256() {
   _has_bits_[0] |= 0x00000001u;