Bug 1596843 - Part 1: Remove the unused nsIPermissionManager.testPermissionFromWindow() method; r=baku

Differential Revision: https://phabricator.services.mozilla.com/D53237

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ehsan Akhgari 2019-11-17 22:22:21 +00:00
Родитель 975648e245
Коммит d793147c0c
2 изменённых файлов: 0 добавлений и 26 удалений

Просмотреть файл

@ -2249,21 +2249,6 @@ nsresult nsPermissionManager::LegacyTestPermissionFromURI(
false, true);
}
NS_IMETHODIMP
nsPermissionManager::TestPermissionFromWindow(mozIDOMWindow* aWindow,
const nsACString& aType,
uint32_t* aPermission) {
NS_ENSURE_ARG(aWindow);
nsCOMPtr<nsPIDOMWindowInner> window = nsPIDOMWindowInner::From(aWindow);
// Get the document for security check
RefPtr<Document> document = window->GetExtantDoc();
NS_ENSURE_TRUE(document, NS_NOINTERFACE);
nsCOMPtr<nsIPrincipal> principal = document->NodePrincipal();
return TestPermissionFromPrincipal(principal, aType, aPermission);
}
NS_IMETHODIMP
nsPermissionManager::TestPermissionFromPrincipal(nsIPrincipal* aPrincipal,
const nsACString& aType,

Просмотреть файл

@ -32,7 +32,6 @@
interface nsIObserver;
interface nsIPrincipal;
interface mozIDOMWindow;
interface nsIPermission;
interface nsIRunnable;
@ -152,16 +151,6 @@ interface nsIPermissionManager : nsISupports
uint32_t testPermissionFromPrincipal(in nsIPrincipal principal,
in ACString type);
/**
* Test whether the principal associated with the window's document has the
* permission to perform a given action. System principals will always
* have permissions granted.
* This function will perform a pref lookup to permissions.default.<type>
* if the specific permission type is part of the whitelist for that functionality.
*/
uint32_t testPermissionFromWindow(in mozIDOMWindow window,
in ACString type);
/**
* See testExactPermission() above.
* System principals will always have permissions granted.