Bug 1931497 - Part 7: Remove parent process ping in PContent and PushService r=asuth

Differential Revision: https://phabricator.services.mozilla.com/D218626
This commit is contained in:
Kagami Sascha Rosylight 2024-11-19 15:32:19 +00:00
parent cea4a11e31
commit dacfc1c203
5 changed files with 1 additions and 55 deletions

View File

@ -4723,32 +4723,6 @@ mozilla::ipc::IPCResult ContentParent::RecvCloseAlert(const nsAString& aName,
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvDisableNotifications(
nsIPrincipal* aPrincipal) {
if (!aPrincipal) {
return IPC_FAIL(this, "No principal");
}
if (!ValidatePrincipal(aPrincipal)) {
LogAndAssertFailedPrincipalValidationInfo(aPrincipal, __func__);
}
Unused << notification::RemovePermission(aPrincipal);
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvOpenNotificationSettings(
nsIPrincipal* aPrincipal) {
if (!aPrincipal) {
return IPC_FAIL(this, "No principal");
}
if (!ValidatePrincipal(aPrincipal)) {
LogAndAssertFailedPrincipalValidationInfo(aPrincipal, __func__);
}
Unused << notification::OpenSettings(aPrincipal);
return IPC_OK();
}
mozilla::ipc::IPCResult ContentParent::RecvSyncMessage(
const nsAString& aMsg, const ClonedMessageData& aData,
nsTArray<StructuredCloneData>* aRetvals) {

View File

@ -1006,11 +1006,6 @@ class ContentParent final : public PContentParent,
mozilla::ipc::IPCResult RecvCloseAlert(const nsAString& aName,
bool aContextClosed);
mozilla::ipc::IPCResult RecvDisableNotifications(nsIPrincipal* aPrincipal);
mozilla::ipc::IPCResult RecvOpenNotificationSettings(
nsIPrincipal* aPrincipal);
mozilla::ipc::IPCResult RecvLoadURIExternal(
nsIURI* uri, nsIPrincipal* triggeringPrincipal,
nsIPrincipal* redirectPrincipal,

View File

@ -1143,10 +1143,6 @@ parent:
async CloseAlert(nsString name, bool contextClosed);
async DisableNotifications(nullable nsIPrincipal principal);
async OpenNotificationSettings(nullable nsIPrincipal principal);
async AddSecurityState(MaybeDiscardedWindowContext aContext, uint32_t aStateFlags);
// Creates a helper for forwarding data from an nsExternalAppHandler

View File

@ -267,6 +267,7 @@ nsresult OpenSettings(nsIPrincipal* aPrincipal) {
nsresult AdjustPushQuota(nsIPrincipal* aPrincipal,
NotificationStatusChange aChange) {
MOZ_ASSERT(XRE_IsParentProcess());
nsCOMPtr<nsIPushQuotaManager> pushQuotaManager =
do_GetService("@mozilla.org/push/Service;1");
if (!pushQuotaManager) {

View File

@ -130,8 +130,6 @@ Object.assign(PushServiceParent.prototype, {
"Push:Registration",
"Push:Unregister",
"Push:Clear",
"Push:NotificationForOriginShown",
"Push:NotificationForOriginClosed",
"Push:ReportError",
],
@ -239,14 +237,6 @@ Object.assign(PushServiceParent.prototype, {
return;
}
let { name, target, data } = message;
if (name === "Push:NotificationForOriginShown") {
this.notificationForOriginShown(data);
return;
}
if (name === "Push:NotificationForOriginClosed") {
this.notificationForOriginClosed(data);
return;
}
if (name === "Push:ReportError") {
this.reportDeliveryError(data.messageId, data.reason);
return;
@ -429,16 +419,6 @@ Object.assign(PushServiceContent.prototype, {
});
},
// nsIPushQuotaManager methods
notificationForOriginShown(origin) {
this._mm.sendAsyncMessage("Push:NotificationForOriginShown", origin);
},
notificationForOriginClosed(origin) {
this._mm.sendAsyncMessage("Push:NotificationForOriginClosed", origin);
},
// nsIPushErrorReporter methods
reportDeliveryError(messageId, reason) {