mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809165 - Add a updatedTime field to the application object [r=philikon,sr=sicking]
This commit is contained in:
parent
1c7c36362d
commit
9288e5ab1a
@ -41,6 +41,7 @@ this.AppsUtils = {
|
||||
readyToApplyDownload: aApp.readyToApplyDownload,
|
||||
downloadSize: aApp.downloadSize || 0,
|
||||
lastUpdateCheck: aApp.lastUpdateCheck,
|
||||
updateTime: aApp.updateTime,
|
||||
etag: aApp.etag
|
||||
};
|
||||
},
|
||||
|
@ -368,6 +368,8 @@ WebappsApplication.prototype = {
|
||||
this.removable = aApp.removable;
|
||||
this.lastUpdateCheck = aApp.lastUpdateCheck ? aApp.lastUpdateCheck
|
||||
: Date.now();
|
||||
this.updateTime = aApp.updateTime ? aApp.updateTime
|
||||
: aApp.installTime;
|
||||
this.progress = NaN;
|
||||
this.downloadAvailable = aApp.downloadAvailable;
|
||||
this.downloading = aApp.downloading;
|
||||
@ -599,6 +601,7 @@ WebappsApplication.prototype = {
|
||||
this.downloading = app.downloading;
|
||||
this.downloadAvailable = app.downloadAvailable;
|
||||
this.readyToApplyDownload = app.readyToApplyDownload;
|
||||
this.updateTime = app.updateTime;
|
||||
this._fireEvent("downloadsuccess", this._ondownloadsuccess);
|
||||
break;
|
||||
case "applied":
|
||||
|
@ -807,6 +807,7 @@ this.DOMApplicationRegistry = {
|
||||
app.downloading = false;
|
||||
app.downloadAvailable = false;
|
||||
app.readyToApplyDownload = true;
|
||||
app.updateTime = Date.now();
|
||||
DOMApplicationRegistry._saveApps(function() {
|
||||
debug("About to fire Webapps:PackageEvent");
|
||||
DOMApplicationRegistry.broadcastMessage("Webapps:PackageEvent",
|
||||
@ -967,6 +968,7 @@ this.DOMApplicationRegistry = {
|
||||
|
||||
app.name = aManifest.name;
|
||||
app.csp = aManifest.csp || "";
|
||||
app.updateTime = Date.now();
|
||||
|
||||
// Update the registry.
|
||||
this.webapps[id] = app;
|
||||
|
@ -8,7 +8,7 @@
|
||||
interface nsIDOMDOMRequest;
|
||||
interface nsIDOMDOMError;
|
||||
|
||||
[scriptable, uuid(b00a5908-1228-46bf-a42b-091dce3abde1)]
|
||||
[scriptable, uuid(84524e5f-c4ab-4dce-8364-4aac71851ff1)]
|
||||
interface mozIDOMApplication : nsISupports
|
||||
{
|
||||
readonly attribute jsval manifest;
|
||||
@ -41,10 +41,15 @@ interface mozIDOMApplication : nsISupports
|
||||
attribute nsIDOMEventListener onprogress;
|
||||
|
||||
/**
|
||||
* The date of the last update.
|
||||
* The date of the last update check.
|
||||
*/
|
||||
readonly attribute unsigned long long lastUpdateCheck;
|
||||
|
||||
/**
|
||||
* The date of the last updated manifest.
|
||||
*/
|
||||
readonly attribute unsigned long long updateTime;
|
||||
|
||||
/**
|
||||
* Starts the process of looking for an update.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user