Bug 1072751 - Switch SeaMonkey from xpinstall.whitelist.add to using a default permissions file r=IanN
authorPhilip Chee <philip.chee@gmail.com>
Fri, 06 Mar 2015 01:10:49 +0800
changeset 17611 509aed2cbd10ccf8dc9b281a2e0481a76eb1ac98
parent 17610 ff495d26d67ccb6d51cae0a2395d8d80184643d0
child 17612 a7bc583a6720fed0e8852baeeb6ebc3328209fa0
push id10840
push userphilip.chee@gmail.com
push dateThu, 05 Mar 2015 17:12:37 +0000
treeherdercomm-central@a7bc583a6720 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN
bugs1072751
Bug 1072751 - Switch SeaMonkey from xpinstall.whitelist.add to using a default permissions file r=IanN
suite/app/moz.build
suite/app/permissions
suite/browser/browser-prefs.js
suite/installer/package-manifest.in
--- a/suite/app/moz.build
+++ b/suite/app/moz.build
@@ -39,8 +39,10 @@ if not CONFIG['LIBXUL_SDK']:
         LDFLAGS += ['/HEAP:0x40000']
 
     if CONFIG['MOZ_LINKER']:
         OS_LIBS += CONFIG['MOZ_ZLIB_LIBS']
 
 DEFINES['APP_VERSION'] = CONFIG['MOZ_APP_VERSION']
 
 DISABLE_STL_WRAPPING = True
+
+FINAL_TARGET_FILES.defaults += ['permissions']
new file mode 100644
--- /dev/null
+++ b/suite/app/permissions
@@ -0,0 +1,16 @@
+# This file has default permissions for the permission manager.
+# The file-format is strict:
+# * matchtype \t type \t permission \t host
+# * Only "host" is supported for matchtype
+# * type is a string that identifies the type of permission (e.g. "cookie")
+# * permission is an integer between 1 and 15
+# See nsPermissionManager.cpp for more...
+
+# XPInstall
+host	install	1	addons.mozilla.org
+host	install	1	marketplace.firefox.com
+host	install	1	downloads.mozdev.org
+
+# Remote troubleshooting
+host	remote-troubleshooting	1	input.mozilla.org
+host	remote-troubleshooting	1	support.mozilla.org
--- a/suite/browser/browser-prefs.js
+++ b/suite/browser/browser-prefs.js
@@ -653,17 +653,18 @@ pref("extensions.dss.switchPending", fal
 
 pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.name", "chrome://navigator/locale/navigator.properties");
 pref("extensions.{972ce4c6-7e08-4474-a285-3208198ce6fd}.description", "chrome://navigator/locale/navigator.properties");
 
 pref("extensions.modern@themes.mozilla.org.name", "chrome://navigator/locale/navigator.properties");
 pref("extensions.modern@themes.mozilla.org.description", "chrome://navigator/locale/navigator.properties");
 
 pref("xpinstall.enabled", true);
-pref("xpinstall.whitelist.add", "addons.mozilla.org");
+// Built-in default permissions.
+pref("permissions.manager.defaultsUrl", "resource:///defaults/permissions");
 
 pref("lightweightThemes.update.enabled", true);
 
 // Customizable toolbar stuff
 pref("custtoolbar.personal_toolbar_folder", "");
 // Use a popup window for the customize toolbar UI
 pref("toolbar.customization.usesheet", false);
 
--- a/suite/installer/package-manifest.in
+++ b/suite/installer/package-manifest.in
@@ -607,16 +607,17 @@
 #endif
 #ifdef MOZ_SERVICES_SYNC
 @RESPATH@/@PREF_DIR@/services-sync.js
 #endif
 @RESPATH@/@PREF_DIR@/composer.js
 @RESPATH@/greprefs.js
 @RESPATH@/defaults/autoconfig/platform.js
 @RESPATH@/defaults/autoconfig/prefcalls.js
+@RESPATH@/defaults/permissions
 #ifndef LIBXUL_SDK
 ; Warning: changing the path to channel-prefs.js can cause bugs. (Bug 756325)
 @RESPATH@/defaults/pref/channel-prefs.js
 #endif
 
 ; [Layout Engine Resources]
 ; Layout debug extension.
 #ifdef ENABLE_TESTS