Bug 1089912: Part 1, move csp into dom/security (r=sstamm,jst)
authorChristoph Kerschbaumer <mozilla@christophkerschbaumer.com>
Mon, 27 Oct 2014 16:58:20 -0700
changeset 241547 9de623894ce3c185f8f15f4e53e28d59f137a9ce
parent 241546 4eab8ea8276e9814ede2f50e89db069bba91a591
child 241548 4111cfcf8636385a43f2f6032fa9332c8131fdde
push id660
push userraliiev@mozilla.com
push dateWed, 18 Feb 2015 20:30:48 +0000
treeherdermozilla-release@49e493494178 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssstamm, jst
bugs1089912
milestone36.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 1089912: Part 1, move csp into dom/security (r=sstamm,jst)
b2g/installer/package-manifest.in
browser/installer/package-manifest.in
dom/base/moz.build
dom/base/nsCSPContext.cpp
dom/base/nsCSPContext.h
dom/base/nsCSPParser.cpp
dom/base/nsCSPParser.h
dom/base/nsCSPService.cpp
dom/base/nsCSPService.h
dom/base/nsCSPUtils.cpp
dom/base/nsCSPUtils.h
dom/base/nsDocument.cpp
dom/base/nsIContentSecurityPolicy.idl
dom/base/test/TestCSPParser.cpp
dom/interfaces/security/moz.build
dom/interfaces/security/nsIContentSecurityPolicy.idl
dom/moz.build
dom/security/moz.build
dom/security/nsCSPContext.cpp
dom/security/nsCSPContext.h
dom/security/nsCSPParser.cpp
dom/security/nsCSPParser.h
dom/security/nsCSPService.cpp
dom/security/nsCSPService.h
dom/security/nsCSPUtils.cpp
dom/security/nsCSPUtils.h
layout/build/nsLayoutModule.cpp
mobile/android/installer/package-manifest.in
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -182,16 +182,17 @@
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_payment.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_messages.xpt
 @BINPATH@/components/dom_power.xpt
 @BINPATH@/components/dom_quota.xpt
 @BINPATH@/components/dom_range.xpt
+@BINPATH@/components/dom_security.xpt
 @BINPATH@/components/dom_settings.xpt
 @BINPATH@/components/dom_permissionsettings.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_cellbroadcast.xpt
 @BINPATH@/components/dom_mobilemessage.xpt
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_telephony.xpt
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -217,16 +217,17 @@
 @BINPATH@/components/dom_network.xpt
 @BINPATH@/components/dom_notification.xpt
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_power.xpt
 @BINPATH@/components/dom_quota.xpt
 @BINPATH@/components/dom_range.xpt
+@BINPATH@/components/dom_security.xpt
 @BINPATH@/components/dom_settings.xpt
 @BINPATH@/components/dom_permissionsettings.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_cellbroadcast.xpt
 @BINPATH@/components/dom_mobilemessage.xpt
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_telephony.xpt
--- a/dom/base/moz.build
+++ b/dom/base/moz.build
@@ -4,17 +4,16 @@
 # 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/.
 
 TEST_DIRS += ['test']
 
 XPIDL_SOURCES += [
     'nsIConsoleAPIStorage.idl',
     'nsIContentPolicy.idl',
-    'nsIContentSecurityPolicy.idl',
     'nsIDocumentEncoder.idl',
     'nsIDOMDataChannel.idl',
     'nsIDOMDOMCursor.idl',
     'nsIDOMDOMRequest.idl',
     'nsIDOMFile.idl',
     'nsIDOMFileList.idl',
     'nsIDOMFileReader.idl',
     'nsIDOMFormData.idl',
@@ -241,20 +240,16 @@ UNIFIED_SOURCES += [
     'nsContentAreaDragDrop.cpp',
     'nsContentIterator.cpp',
     'nsContentList.cpp',
     'nsContentPermissionHelper.cpp',
     'nsContentPolicy.cpp',
     'nsContentSink.cpp',
     'nsCopySupport.cpp',
     'nsCrossSiteListenerProxy.cpp',
-    'nsCSPContext.cpp',
-    'nsCSPParser.cpp',
-    'nsCSPService.cpp',
-    'nsCSPUtils.cpp',
     'nsDataDocumentContentPolicy.cpp',
     'nsDocument.cpp',
     'nsDocumentEncoder.cpp',
     'nsDOMAttributeMap.cpp',
     'nsDOMCaretPosition.cpp',
     'nsDOMClassInfo.cpp',
     'nsDOMFileReader.cpp',
     'nsDOMMutationObserver.cpp',
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -156,17 +156,17 @@
 #include "imgIContainer.h"
 #include "nsSVGUtils.h"
 #include "SVGElementFactory.h"
 
 #include "nsRefreshDriver.h"
 
 // FOR CSP (autogenerated by xpidl)
 #include "nsIContentSecurityPolicy.h"
-#include "nsCSPService.h"
+#include "mozilla/dom/nsCSPService.h"
 #include "nsHTMLStyleSheet.h"
 #include "nsHTMLCSSStyleSheet.h"
 #include "SVGAttrAnimationRuleProcessor.h"
 #include "mozilla/dom/DOMImplementation.h"
 #include "mozilla/dom/ShadowRoot.h"
 #include "mozilla/dom/Comment.h"
 #include "nsTextNode.h"
 #include "mozilla/dom/Link.h"
--- a/dom/base/test/TestCSPParser.cpp
+++ b/dom/base/test/TestCSPParser.cpp
@@ -20,17 +20,17 @@ class nsAdoptingCString;
 class nsXPIDLString;
 template<class T> class nsReadingIterator;
 #endif
 
 #include "nsIContentSecurityPolicy.h"
 #include "nsNetUtil.h"
 #include "TestHarness.h"
 #include "nsIScriptSecurityManager.h"
-#include "../nsCSPContext.h"
+#include "mozilla/dom/nsCSPContext.h"
 
 #ifndef MOZILLA_INTERNAL_API
 #undef nsString_h___
 #undef nsAString_h___
 #undef nsReadableUtils_h___
 #endif
 
 /*
new file mode 100644
--- /dev/null
+++ b/dom/interfaces/security/moz.build
@@ -0,0 +1,12 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+XPIDL_SOURCES += [
+    'nsIContentSecurityPolicy.idl'
+]
+
+XPIDL_MODULE = 'dom_security'
+
rename from dom/base/nsIContentSecurityPolicy.idl
rename to dom/interfaces/security/nsIContentSecurityPolicy.idl
--- a/dom/moz.build
+++ b/dom/moz.build
@@ -17,16 +17,17 @@ interfaces = [
     'stylesheets',
     'sidebar',
     'css',
     'traversal',
     'range',
     'xbl',
     'xpath',
     'xul',
+    'security',
     'storage',
     'json',
     'offline',
     'geolocation',
     'notification',
     'permission',
     'svg',
     'smil',
@@ -68,16 +69,17 @@ DIRS += [
     'media',
     'messages',
     'mobileconnection',
     'notification',
     'offline',
     'power',
     'push',
     'quota',
+    'security',
     'settings',
     'storage',
     'svg',
     'mobilemessage',
     'time',
     'locales',
     'network',
     'permission',
new file mode 100644
--- /dev/null
+++ b/dom/security/moz.build
@@ -0,0 +1,25 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# 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/.
+
+EXPORTS.mozilla.dom += [
+    'nsCSPContext.h',
+    'nsCSPService.h',
+    'nsCSPUtils.h',
+]
+
+UNIFIED_SOURCES += [
+    'nsCSPContext.cpp',
+    'nsCSPParser.cpp',
+    'nsCSPService.cpp',
+    'nsCSPUtils.cpp',
+]
+
+FAIL_ON_WARNINGS = True
+
+FINAL_LIBRARY = 'xul'
+LOCAL_INCLUDES += [
+    '/caps',
+]
rename from dom/base/nsCSPContext.cpp
rename to dom/security/nsCSPContext.cpp
rename from dom/base/nsCSPContext.h
rename to dom/security/nsCSPContext.h
--- a/dom/base/nsCSPContext.h
+++ b/dom/security/nsCSPContext.h
@@ -1,17 +1,17 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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 nsCSPContext_h___
 #define nsCSPContext_h___
 
-#include "nsCSPUtils.h"
+#include "mozilla/dom/nsCSPUtils.h"
 #include "nsDataHashtable.h"
 #include "nsIChannel.h"
 #include "nsIChannelEventSink.h"
 #include "nsIClassInfo.h"
 #include "nsIContentSecurityPolicy.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsISerializable.h"
 #include "nsIStreamListener.h"
rename from dom/base/nsCSPParser.cpp
rename to dom/security/nsCSPParser.cpp
rename from dom/base/nsCSPParser.h
rename to dom/security/nsCSPParser.h
rename from dom/base/nsCSPService.cpp
rename to dom/security/nsCSPService.cpp
rename from dom/base/nsCSPService.h
rename to dom/security/nsCSPService.h
rename from dom/base/nsCSPUtils.cpp
rename to dom/security/nsCSPUtils.cpp
rename from dom/base/nsCSPUtils.h
rename to dom/security/nsCSPUtils.h
--- a/layout/build/nsLayoutModule.cpp
+++ b/layout/build/nsLayoutModule.cpp
@@ -206,18 +206,18 @@ NS_NewXULTreeBuilder(nsISupports* aOuter
 
 static void Shutdown();
 
 #include "nsGeolocation.h"
 #include "nsDeviceSensors.h"
 #ifdef MOZ_GAMEPAD
 #include "mozilla/dom/GamepadService.h"
 #endif
-#include "nsCSPService.h"
-#include "nsCSPContext.h"
+#include "mozilla/dom/nsCSPService.h"
+#include "mozilla/dom/nsCSPContext.h"
 #include "nsICellBroadcastService.h"
 #include "nsISmsService.h"
 #include "nsIMmsService.h"
 #include "nsIMobileConnectionService.h"
 #include "nsIMobileMessageService.h"
 #include "nsIMobileMessageDatabaseService.h"
 #include "nsIPowerManagerService.h"
 #include "nsIAlarmHalService.h"
--- a/mobile/android/installer/package-manifest.in
+++ b/mobile/android/installer/package-manifest.in
@@ -147,16 +147,17 @@
 @BINPATH@/components/dom_notification.xpt
 @BINPATH@/components/dom_html.xpt
 @BINPATH@/components/dom_offline.xpt
 @BINPATH@/components/dom_json.xpt
 @BINPATH@/components/dom_payment.xpt
 @BINPATH@/components/dom_power.xpt
 @BINPATH@/components/dom_quota.xpt
 @BINPATH@/components/dom_range.xpt
+@BINPATH@/components/dom_security.xpt
 @BINPATH@/components/dom_settings.xpt
 @BINPATH@/components/dom_permissionsettings.xpt
 @BINPATH@/components/dom_sidebar.xpt
 @BINPATH@/components/dom_mobilemessage.xpt
 @BINPATH@/components/dom_storage.xpt
 @BINPATH@/components/dom_stylesheets.xpt
 @BINPATH@/components/dom_system.xpt
 @BINPATH@/components/dom_threads.xpt