From 64828b76978d106eacc353620fbac5c3ac5740c6 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Sun, 17 Nov 2019 22:22:24 +0000 Subject: [PATCH] Bug 1596843 - Part 2: Stop exposing nsIPermissionManager.removePermissionsWithAttributes(); r=baku Differential Revision: https://phabricator.services.mozilla.com/D53238 --HG-- extra : moz-landing-system : lando --- extensions/permissions/nsPermissionManager.cpp | 3 +-- extensions/permissions/nsPermissionManager.h | 7 ++++--- netwerk/base/nsIPermissionManager.idl | 5 ----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/extensions/permissions/nsPermissionManager.cpp b/extensions/permissions/nsPermissionManager.cpp index 0d7deb7bee5d..bfec5f71e623 100644 --- a/extensions/permissions/nsPermissionManager.cpp +++ b/extensions/permissions/nsPermissionManager.cpp @@ -2622,8 +2622,7 @@ nsresult nsPermissionManager::RemoveAllModifiedSince( }); } -NS_IMETHODIMP -nsPermissionManager::RemovePermissionsWithAttributes( +nsresult nsPermissionManager::RemovePermissionsWithAttributes( const nsAString& aPattern) { ENSURE_NOT_CHILD_PROCESS; mozilla::OriginAttributesPattern pattern; diff --git a/extensions/permissions/nsPermissionManager.h b/extensions/permissions/nsPermissionManager.h index f26e45a4fd41..0df12a2fe097 100644 --- a/extensions/permissions/nsPermissionManager.h +++ b/extensions/permissions/nsPermissionManager.h @@ -206,9 +206,6 @@ class nsPermissionManager final : public nsIPermissionManager, */ static void Startup(); - nsresult RemovePermissionsWithAttributes( - mozilla::OriginAttributesPattern& aAttrs); - /** * See `nsIPermissionManager::GetPermissionsWithKey` for more info on * permission keys. @@ -527,6 +524,10 @@ class nsPermissionManager final : public nsIPermissionManager, template nsresult RemovePermissionEntries(T aCondition); + nsresult RemovePermissionsWithAttributes(const nsAString& aPattern); + nsresult RemovePermissionsWithAttributes( + mozilla::OriginAttributesPattern& aAttrs); + nsRefPtrHashtable mPermissionKeyPromiseMap; diff --git a/netwerk/base/nsIPermissionManager.idl b/netwerk/base/nsIPermissionManager.idl index 0b863648df1a..cbba65afa7fd 100644 --- a/netwerk/base/nsIPermissionManager.idl +++ b/netwerk/base/nsIPermissionManager.idl @@ -198,11 +198,6 @@ interface nsIPermissionManager : nsISupports */ readonly attribute Array all; - /** - * Remove all permissions that will match the origin pattern. - */ - void removePermissionsWithAttributes(in AString patternAsJSON); - /** * If the current permission is set to expire, reset the expiration time. If * there is no permission or the current permission does not expire, this