Bug 1385461 - Move URL Classifier protobuf files to match other components. r?dimi draft
authorFrancois Marier <francois@mozilla.com>
Thu, 12 Oct 2017 17:27:36 -0700
changeset 683516 f94476e3463e63096f5f91b13b7b49a46a2d860d
parent 683515 a4dbbdb5a40d3ba9862386b8fe73bb21cf869958
child 683517 1bf0d6e1ce4ca7ac1b91612eb5a1edb6aeb3f0dd
push id85402
push userfmarier@mozilla.com
push dateThu, 19 Oct 2017 21:21:03 +0000
reviewersdimi
bugs1385461
milestone58.0a1
Bug 1385461 - Move URL Classifier protobuf files to match other components. r?dimi MozReview-Commit-ID: 5N1iOpocVd8
toolkit/components/url-classifier/HashStore.h
toolkit/components/url-classifier/ProtocolParser.h
toolkit/components/url-classifier/chromium/safebrowsing.pb.cc
toolkit/components/url-classifier/chromium/safebrowsing.pb.h
toolkit/components/url-classifier/moz.build
toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
toolkit/components/url-classifier/protobuf/safebrowsing.pb.cc
toolkit/components/url-classifier/protobuf/safebrowsing.pb.h
--- a/toolkit/components/url-classifier/HashStore.h
+++ b/toolkit/components/url-classifier/HashStore.h
@@ -3,23 +3,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef HashStore_h__
 #define HashStore_h__
 
 #include "Entries.h"
 #include "ChunkSet.h"
 
+#include "chromium/safebrowsing.pb.h"
 #include "nsString.h"
 #include "nsTArray.h"
 #include "nsIFile.h"
 #include "nsIFileStreams.h"
 #include "nsCOMPtr.h"
 #include "nsClassHashtable.h"
-#include "safebrowsing.pb.h"
 #include <string>
 
 namespace mozilla {
 namespace safebrowsing {
 
 // The abstract class of TableUpdateV2 and TableUpdateV4. This
 // is convenient for passing the TableUpdate* around associated
 // with v2 and v4 instance.
--- a/toolkit/components/url-classifier/ProtocolParser.h
+++ b/toolkit/components/url-classifier/ProtocolParser.h
@@ -2,17 +2,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef ProtocolParser_h__
 #define ProtocolParser_h__
 
 #include "HashStore.h"
-#include "safebrowsing.pb.h"
+#include "chromium/safebrowsing.pb.h"
 
 namespace mozilla {
 namespace safebrowsing {
 
 /**
  * Abstract base class for parsing update data in multiple formats.
  */
 class ProtocolParser {
rename from toolkit/components/url-classifier/protobuf/safebrowsing.pb.cc
rename to toolkit/components/url-classifier/chromium/safebrowsing.pb.cc
rename from toolkit/components/url-classifier/protobuf/safebrowsing.pb.h
rename to toolkit/components/url-classifier/chromium/safebrowsing.pb.h
--- a/toolkit/components/url-classifier/moz.build
+++ b/toolkit/components/url-classifier/moz.build
@@ -21,26 +21,26 @@ XPIDL_SOURCES += [
 ]
 
 XPIDL_MODULE = 'url-classifier'
 
 # Disable RTTI in google protocol buffer
 DEFINES['GOOGLE_PROTOBUF_NO_RTTI'] = True
 
 UNIFIED_SOURCES += [
+    'chromium/safebrowsing.pb.cc',
     'ChunkSet.cpp',
     'Classifier.cpp',
     'LookupCache.cpp',
     'LookupCacheV4.cpp',
     'nsCheckSummedOutputStream.cpp',
     'nsUrlClassifierDBService.cpp',
     'nsUrlClassifierInfo.cpp',
     'nsUrlClassifierProxies.cpp',
     'nsUrlClassifierUtils.cpp',
-    'protobuf/safebrowsing.pb.cc',
     'ProtocolParser.cpp',
     'RiceDeltaDecoder.cpp',
     'UrlClassifierTelemetryUtils.cpp',
 ]
 
 # define conflicting LOG() macros
 SOURCES += [
     'nsUrlClassifierPrefixSet.cpp',
@@ -60,21 +60,21 @@ EXTRA_COMPONENTS += [
     'nsUrlClassifierListManager.js',
 ]
 
 EXTRA_JS_MODULES += [
     'SafeBrowsing.jsm',
 ]
 
 EXPORTS += [
+    'chromium/safebrowsing.pb.h',
     'Entries.h',
     'LookupCache.h',
     'LookupCacheV4.h',
     'nsUrlClassifierPrefixSet.h',
-    'protobuf/safebrowsing.pb.h',
     'VariableLengthPrefixSet.h',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 LOCAL_INCLUDES += [
     '../build',
 ]
--- a/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
+++ b/toolkit/components/url-classifier/nsUrlClassifierUtils.cpp
@@ -1,22 +1,22 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
+#include "chromium/safebrowsing.pb.h"
 #include "nsEscape.h"
 #include "nsString.h"
 #include "nsIURI.h"
 #include "nsIURL.h"
 #include "nsUrlClassifierUtils.h"
 #include "nsTArray.h"
 #include "nsReadableUtils.h"
 #include "plbase64.h"
 #include "nsPrintfCString.h"
-#include "safebrowsing.pb.h"
 #include "mozilla/Sprintf.h"
 #include "mozilla/Mutex.h"
 #include "nsIRedirectHistoryEntry.h"
 #include "nsIHttpChannelInternal.h"
 #include "mozIThirdPartyUtil.h"
 #include "nsIDocShell.h"
 
 #define DEFAULT_PROTOCOL_VERSION "2.2"