Bug 778608 - Move SafeBrowsing.jsm to toolkit. r=gavin
authorJustin Dolske <dolske@mozilla.com>
Mon, 29 Oct 2012 17:26:41 -0700
changeset 111718 70d9ba6b84f885bb2a8aadce246b75e8f650fdc3
parent 111717 3e4d63da1bceda810d5e3e504bc43d9e6b48a35a
child 111719 c0e42b3b43e322a0f8f3f9951aeaf455c30ec40a
push id17219
push userjdolske@mozilla.com
push dateTue, 30 Oct 2012 00:26:49 +0000
treeherdermozilla-inbound@70d9ba6b84f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgavin
bugs778608
milestone19.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 778608 - Move SafeBrowsing.jsm to toolkit. r=gavin
browser/base/content/blockedSite.xhtml
browser/base/content/report-phishing-overlay.xul
browser/base/jar.mn
browser/components/about/AboutRedirector.cpp
browser/components/safebrowsing/Makefile.in
browser/components/safebrowsing/SafeBrowsing.jsm
browser/components/safebrowsing/content/blockedSite.xhtml
browser/components/safebrowsing/content/report-phishing-overlay.xul
browser/components/safebrowsing/jar.mn
toolkit/components/url-classifier/Makefile.in
toolkit/components/url-classifier/SafeBrowsing.jsm
rename from browser/components/safebrowsing/content/blockedSite.xhtml
rename to browser/base/content/blockedSite.xhtml
rename from browser/components/safebrowsing/content/report-phishing-overlay.xul
rename to browser/base/content/report-phishing-overlay.xul
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -117,8 +117,13 @@ browser.jar:
 #ifdef XP_WIN
         content/browser/win6BrowserOverlay.xul        (content/win6BrowserOverlay.xul)
 #endif
         content/browser/social-icon.png               (content/social-icon.png)
         content/browser/socialchat.xml                (content/socialchat.xml)
 # the following files are browser-specific overrides
 *       content/browser/license.html                  (/toolkit/content/license.html)
 % override chrome://global/content/license.html chrome://browser/content/license.html
+#ifdef MOZ_SAFE_BROWSING
+*       content/browser/report-phishing-overlay.xul     (content/report-phishing-overlay.xul)
+        content/browser/blockedSite.xhtml               (content/blockedSite.xhtml)
+% overlay chrome://browser/content/browser.xul chrome://browser/content/report-phishing-overlay.xul
+#endif
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -29,17 +29,17 @@ struct RedirEntry {
   unless your about: page really needs chrome privileges. Security review is
   required before adding new map entries without
   URI_SAFE_FOR_UNTRUSTED_CONTENT.  Also note, however, that adding
   URI_SAFE_FOR_UNTRUSTED_CONTENT will allow random web sites to link to that
   URI.  Perhaps we should separate the two concepts out...
  */
 static RedirEntry kRedirMap[] = {
 #ifdef MOZ_SAFE_BROWSING
-  { "blocked", "chrome://browser/content/safebrowsing/blockedSite.xhtml",
+  { "blocked", "chrome://browser/content/blockedSite.xhtml",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
     nsIAboutModule::ALLOW_SCRIPT |
     nsIAboutModule::HIDE_FROM_ABOUTABOUT },
 #endif
   { "certerror", "chrome://browser/content/certerror/aboutCertError.xhtml",
     nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
     nsIAboutModule::ALLOW_SCRIPT |
     nsIAboutModule::HIDE_FROM_ABOUTABOUT },
--- a/browser/components/safebrowsing/Makefile.in
+++ b/browser/components/safebrowsing/Makefile.in
@@ -7,21 +7,9 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 TEST_DIRS += content/test
 
-# Normally the "client ID" sent in updates is appinfo.name, but for
-# official Firefox releases from Mozilla we use a special identifier.
-ifdef MOZILLA_OFFICIAL
-ifdef MOZ_PHOENIX
-DEFINES += -DUSE_HISTORIC_SAFEBROWSING_ID=1
-endif
-endif
-
-EXTRA_PP_JS_MODULES = \
-  SafeBrowsing.jsm \
-  $(NULL)
-
 include $(topsrcdir)/config/rules.mk
deleted file mode 100644
--- a/browser/components/safebrowsing/jar.mn
+++ /dev/null
@@ -1,8 +0,0 @@
-# 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/.
-
-browser.jar:
-  content/browser/safebrowsing/report-phishing-overlay.xul     (content/report-phishing-overlay.xul)
-  content/browser/safebrowsing/blockedSite.xhtml               (content/blockedSite.xhtml)
-% overlay chrome://browser/content/browser.xul         chrome://browser/content/safebrowsing/report-phishing-overlay.xul
--- a/toolkit/components/url-classifier/Makefile.in
+++ b/toolkit/components/url-classifier/Makefile.in
@@ -12,16 +12,24 @@ VPATH     = @srcdir@
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = url-classifier
 LIBRARY_NAME = urlclassifier_s
 XPIDL_MODULE = url-classifier
 LIBXUL_LIBRARY = 1
 FORCE_STATIC_LIB = 1
 
+# Normally the "client ID" sent in updates is appinfo.name, but for
+# official Firefox releases from Mozilla we use a special identifier.
+ifdef MOZILLA_OFFICIAL
+ifdef MOZ_PHOENIX
+DEFINES += -DUSE_HISTORIC_SAFEBROWSING_ID=1
+endif
+endif
+
 XPIDLSRCS = \
   nsIUrlClassifierDBService.idl \
   nsIUrlClassifierHashCompleter.idl \
   nsIUrlClassifierStreamUpdater.idl \
   nsIUrlClassifierPrefixSet.idl \
   nsIUrlClassifierUtils.idl \
   nsIUrlListManager.idl \
   $(NULL)
@@ -51,13 +59,17 @@ EXTRA_COMPONENTS = \
   $(NULL)
 
 # Same as JS components that are run through the pre-processor.
 EXTRA_PP_COMPONENTS = \
   nsUrlClassifierLib.js \
   nsUrlClassifierListManager.js \
   $(NULL)
 
+EXTRA_PP_JS_MODULES = \
+  SafeBrowsing.jsm \
+  $(NULL)
+
 ifdef ENABLE_TESTS
 TOOL_DIRS += tests
 endif
 
 include $(topsrcdir)/config/rules.mk
rename from browser/components/safebrowsing/SafeBrowsing.jsm
rename to toolkit/components/url-classifier/SafeBrowsing.jsm