Bug 1731994: part 4) Declare more methods around ContentPermissionRequestBase const. r=edgar

Differential Revision: https://phabricator.services.mozilla.com/D126350
This commit is contained in:
Mirko Brodesser 2021-09-23 08:48:18 +00:00
parent 5d0afe9005
commit b507a6325d
4 changed files with 4 additions and 4 deletions

View File

@ -492,7 +492,7 @@ ContentPermissionRequestBase::CheckPromptPrefs() const {
return PromptResult::Pending;
}
bool ContentPermissionRequestBase::CheckPermissionDelegate() {
bool ContentPermissionRequestBase::CheckPermissionDelegate() const {
// There is case that ContentPermissionRequestBase is constructed without
// window, then mPermissionHandler will be null. So we only check permission
// delegate if we have non-null mPermissionHandler

View File

@ -126,7 +126,7 @@ class ContentPermissionRequestBase : public nsIContentPermissionRequest {
PromptResult CheckPromptPrefs() const;
// Check if the permission has an opportunity to request.
bool CheckPermissionDelegate();
bool CheckPermissionDelegate() const;
enum class DelayedTaskType {
Allow,

View File

@ -187,7 +187,7 @@ bool PermissionDelegateHandler::HasFeaturePolicyAllowed(
}
bool PermissionDelegateHandler::HasPermissionDelegated(
const nsACString& aType) {
const nsACString& aType) const {
MOZ_ASSERT(mDocument);
// System principal should have right to make permission request

View File

@ -67,7 +67,7 @@ class PermissionDelegateHandler final : public nsIPermissionDelegateHandler {
/*
* Indicates if we has the right to make permission request with aType
*/
bool HasPermissionDelegated(const nsACString& aType);
bool HasPermissionDelegated(const nsACString& aType) const;
/*
* Get permission state, which applied permission delegate policy.