mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 06:45:33 +00:00
Bug 1264815 - Rename 'serviceWorkerRegistrationID' to 'serviceWorkerRegistrationScope'. r=kcambridge
This commit is contained in:
parent
372169ecdf
commit
bc7d6ef55c
@ -28,7 +28,7 @@ interface nsINotificationStorageCallback : nsISupports
|
||||
in DOMString icon,
|
||||
in DOMString data,
|
||||
in DOMString behavior,
|
||||
in DOMString serviceWorkerRegistrationID);
|
||||
in DOMString serviceWorkerRegistrationScope);
|
||||
|
||||
/**
|
||||
* Callback function used to notify C++ the we have returned
|
||||
@ -76,7 +76,7 @@ interface nsINotificationStorage : nsISupports
|
||||
in DOMString alertName,
|
||||
in DOMString data,
|
||||
in DOMString behavior,
|
||||
in DOMString serviceWorkerRegistrationID);
|
||||
in DOMString serviceWorkerRegistrationScope);
|
||||
|
||||
/**
|
||||
* Retrieve a list of notifications.
|
||||
|
@ -78,7 +78,7 @@ struct NotificationStrings
|
||||
const nsString mIcon;
|
||||
const nsString mData;
|
||||
const nsString mBehavior;
|
||||
const nsString mServiceWorkerRegistrationID;
|
||||
const nsString mServiceWorkerRegistrationScope;
|
||||
};
|
||||
|
||||
class ScopeCheckingGetCallback : public nsINotificationStorageCallback
|
||||
@ -98,13 +98,13 @@ public:
|
||||
const nsAString& aIcon,
|
||||
const nsAString& aData,
|
||||
const nsAString& aBehavior,
|
||||
const nsAString& aServiceWorkerRegistrationID) final
|
||||
const nsAString& aServiceWorkerRegistrationScope) final
|
||||
{
|
||||
AssertIsOnMainThread();
|
||||
MOZ_ASSERT(!aID.IsEmpty());
|
||||
|
||||
// Skip scopes that don't match when called from getNotifications().
|
||||
if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationID)) {
|
||||
if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationScope)) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ public:
|
||||
nsString(aIcon),
|
||||
nsString(aData),
|
||||
nsString(aBehavior),
|
||||
nsString(aServiceWorkerRegistrationID),
|
||||
nsString(aServiceWorkerRegistrationScope),
|
||||
};
|
||||
|
||||
mStrings.AppendElement(Move(strings));
|
||||
@ -169,7 +169,7 @@ public:
|
||||
mStrings[i].mData,
|
||||
/* mStrings[i].mBehavior, not
|
||||
* supported */
|
||||
mStrings[i].mServiceWorkerRegistrationID,
|
||||
mStrings[i].mServiceWorkerRegistrationScope,
|
||||
result);
|
||||
|
||||
n->SetStoredState(true);
|
||||
@ -1066,7 +1066,7 @@ Notification::ConstructFromFields(
|
||||
const nsAString& aTag,
|
||||
const nsAString& aIcon,
|
||||
const nsAString& aData,
|
||||
const nsAString& aServiceWorkerRegistrationID,
|
||||
const nsAString& aServiceWorkerRegistrationScope,
|
||||
ErrorResult& aRv)
|
||||
{
|
||||
MOZ_ASSERT(aGlobal);
|
||||
@ -1085,7 +1085,7 @@ Notification::ConstructFromFields(
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
notification->SetScope(aServiceWorkerRegistrationID);
|
||||
notification->SetScope(aServiceWorkerRegistrationScope);
|
||||
|
||||
return notification.forget();
|
||||
}
|
||||
@ -2112,7 +2112,7 @@ public:
|
||||
mStrings[i].mData,
|
||||
/* mStrings[i].mBehavior, not
|
||||
* supported */
|
||||
mStrings[i].mServiceWorkerRegistrationID,
|
||||
mStrings[i].mServiceWorkerRegistrationScope,
|
||||
result);
|
||||
|
||||
n->SetStoredState(true);
|
||||
|
@ -185,7 +185,7 @@ public:
|
||||
const nsAString& aTag,
|
||||
const nsAString& aIcon,
|
||||
const nsAString& aData,
|
||||
const nsAString& aServiceWorkerRegistrationID,
|
||||
const nsAString& aServiceWorkerRegistrationScope,
|
||||
ErrorResult& aRv);
|
||||
|
||||
void GetID(nsAString& aRetval) {
|
||||
|
@ -84,7 +84,7 @@ NotificationStorage.prototype = {
|
||||
},
|
||||
|
||||
put: function(origin, id, title, dir, lang, body, tag, icon, alertName,
|
||||
data, behavior, serviceWorkerRegistrationID) {
|
||||
data, behavior, serviceWorkerRegistrationScope) {
|
||||
if (DEBUG) { debug("PUT: " + origin + " " + id + ": " + title); }
|
||||
var notification = {
|
||||
id: id,
|
||||
@ -99,7 +99,7 @@ NotificationStorage.prototype = {
|
||||
origin: origin,
|
||||
data: data,
|
||||
mozbehavior: behavior,
|
||||
serviceWorkerRegistrationID: serviceWorkerRegistrationID,
|
||||
serviceWorkerRegistrationScope: serviceWorkerRegistrationScope,
|
||||
};
|
||||
|
||||
this._notifications[id] = notification;
|
||||
@ -141,9 +141,9 @@ NotificationStorage.prototype = {
|
||||
this.searchID = id;
|
||||
this.originalCallback = originalCallback;
|
||||
var self = this;
|
||||
this.handle = function(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationID) {
|
||||
this.handle = function(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationScope) {
|
||||
if (id == this.searchID) {
|
||||
self.originalCallback.handle(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationID);
|
||||
self.originalCallback.handle(id, title, dir, lang, body, tag, icon, data, behavior, serviceWorkerRegistrationScope);
|
||||
}
|
||||
};
|
||||
this.done = function() {
|
||||
@ -246,7 +246,7 @@ NotificationStorage.prototype = {
|
||||
notification.icon,
|
||||
notification.data,
|
||||
notification.mozbehavior,
|
||||
notification.serviceWorkerRegistrationID),
|
||||
notification.serviceWorkerRegistrationScope),
|
||||
Ci.nsIThread.DISPATCH_NORMAL);
|
||||
} catch (e) {
|
||||
if (DEBUG) { debug("Error calling callback handle: " + e); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user