Bug 1154864 - Fix getScopeByLocalId use in PushService.jsm r=nsm

This commit is contained in:
Fabrice Desré 2015-04-16 18:15:18 -07:00
parent 2914c497f5
commit 7a4838fd16
2 changed files with 16 additions and 1 deletions

View File

@ -147,6 +147,16 @@ AppsService.prototype = {
return null;
},
getScopeByLocalId: function(aLocalId) {
debug("getScopeByLocalId( " + aLocalId + " )");
if (this.isInvalidId(aLocalId)) {
return null;
}
// TODO : implement properly!
// We just return null for now to not break PushService.jsm
return null;
},
classID : APPS_SERVICE_CID,
QueryInterface : XPCOMUtils.generateQI([Ci.nsIAppsService])
}

View File

@ -16,7 +16,7 @@ interface nsIURI;
* This service allows accessing some DOMApplicationRegistry methods from
* non-javascript code.
*/
[scriptable, uuid(76ced447-6f92-48fb-b4e6-690e4859bc7f)]
[scriptable, uuid(03f1e30e-a1aa-4e18-ab3f-cd04b3b35a54)]
interface nsIAppsService : nsISupports
{
mozIApplication getAppByManifestURL(in DOMString manifestURL);
@ -78,4 +78,9 @@ interface nsIAppsService : nsISupports
* Returns the localId if the app was installed from a store
*/
DOMString getAppLocalIdByStoreId(in DOMString storeID);
/**
* Returns the scope for app to use with service workers.
*/
DOMString getScopeByLocalId(in unsigned long localId);
};