зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1059907 - Include access type in permission setting; r=mfinkle
--HG-- extra : amend_source : 8ce0a0d1344d249aa567d4769cddde56bbaeec1c
This commit is contained in:
Родитель
5010b21bb7
Коммит
fa166a4078
|
@ -103,10 +103,10 @@ ContentPermissionPrompt.prototype = {
|
|||
callback: function(aChecked) {
|
||||
// If the user checked "Don't ask again", make a permanent exception
|
||||
if (aChecked) {
|
||||
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.ALLOW_ACTION);
|
||||
} else if (isApp || entityName == "desktopNotification") {
|
||||
// Otherwise allow the permission for the current session (if the request comes from an app or if it's a desktop-notification request)
|
||||
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.ALLOW_ACTION, Ci.nsIPermissionManager.EXPIRE_SESSION);
|
||||
Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.ALLOW_ACTION, Ci.nsIPermissionManager.EXPIRE_SESSION);
|
||||
}
|
||||
|
||||
request.allow();
|
||||
|
@ -117,7 +117,7 @@ ContentPermissionPrompt.prototype = {
|
|||
callback: function(aChecked) {
|
||||
// If the user checked "Don't ask again", make a permanent exception
|
||||
if (aChecked)
|
||||
Services.perms.addFromPrincipal(request.principal, perm.type, Ci.nsIPermissionManager.DENY_ACTION);
|
||||
Services.perms.addFromPrincipal(request.principal, access, Ci.nsIPermissionManager.DENY_ACTION);
|
||||
|
||||
request.cancel();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче