Back out 487f6dcb3d85 (Bug 805178) for browser-chrome failures
authorPhil Ringnalda <philringnalda@gmail.com>
Fri, 26 Oct 2012 14:21:21 -0700
changeset 111698 82ce45ddd3ead1f3b1bda5d61f8169f0d79cdbce
parent 111697 a889ac0633730ea6bb4d2856b7693dd8a4ea4bd8
child 111699 f9acc2e4d4e352e380a36ab0fc91f27b6d8fff0a
child 111703 829fcbcf708443d2e0e4ffc0d38675066ef81e65
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs805178
milestone19.0a1
backs out487f6dcb3d85c322852a86f9417ae2b1a2ce9676
Back out 487f6dcb3d85 (Bug 805178) for browser-chrome failures
dom/apps/src/PermissionsInstaller.jsm
--- a/dom/apps/src/PermissionsInstaller.jsm
+++ b/dom/apps/src/PermissionsInstaller.jsm
@@ -39,17 +39,16 @@ function debug(aMsg) {
  * @returns Array
  **/
 function mapSuffixes(aPermName, aSuffixes)
 {
   return aSuffixes.map(function(suf) { return aPermName + "-" + suf; });
 }
 
 // Permissions Matrix: https://docs.google.com/spreadsheet/ccc?key=0Akyz_Bqjgf5pdENVekxYRjBTX0dCXzItMnRyUU1RQ0E#gid=0
-// Also, keep in sync with https://mxr.mozilla.org/mozilla-central/source/extensions/cookie/Permission.txt
 
 // Permissions that are implicit:
 // battery-status, network-information, vibration,
 // device-capabilities
 
 const PermissionsTable = { "resource-lock": {
                              app: ALLOW_ACTION,
                              privileged: ALLOW_ACTION,
@@ -83,41 +82,34 @@ const PermissionsTable = { "resource-loc
                            contacts: {
                              app: DENY_ACTION,
                              privileged: PROMPT_ACTION,
                              certified: ALLOW_ACTION,
                              access: ["read", "write", "create"]
                            },
                            "device-storage:apps": {
                              app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
+                             privileged: ALLOW_ACTION,
+                             certified: ALLOW_ACTION
                            },
                            "device-storage:pictures": {
                              app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
+                             privileged: ALLOW_ACTION,
                              certified: ALLOW_ACTION,
                              access: ["read", "write", "create"]
                            },
                            "device-storage:videos": {
                              app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
+                             privileged: ALLOW_ACTION,
                              certified: ALLOW_ACTION,
                              access: ["read", "write", "create"]
                            },
                            "device-storage:music": {
                              app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
-                             certified: ALLOW_ACTION,
-                             access: ["read", "write", "create"]
-                           },
-                           "device-storage:sdcard": {
-                             app: DENY_ACTION,
-                             privileged: PROMPT_ACTION,
+                             privileged: ALLOW_ACTION,
                              certified: ALLOW_ACTION,
                              access: ["read", "write", "create"]
                            },
                            sms: {
                              app: DENY_ACTION,
                              privileged: DENY_ACTION,
                              certified: ALLOW_ACTION
                            },
@@ -276,17 +268,17 @@ for (let permName in PermissionsTable) {
  * @returns Array
  **/
 function expandPermissions(aPermName, aAccess) {
   if (!PermissionsTable[aPermName]) {
     Cu.reportError("PermissionsTable.jsm: expandPermissions: Unknown Permission: " + aPermName);
     throw new Error("PermissionsTable.jsm: expandPermissions: Unknown Permission: " + aPermName);
   }
 
-/*
+/* 
 Temporarily disabled in order to add access fields to gaia: See Bug 805646
   if (!aAccess && PermissionsTable[aPermName].access ||
       aAccess && !PermissionsTable[aPermName].access) {
     Cu.reportError("PermissionsTable.jsm: expandPermissions: Invalid Manifest : " +
                    aPermName + " " + aAccess + "\n");
     throw new Error("PermissionsTable.jsm: expandPermissions: Invalid Manifest");
   }
 */