Bug 1137901 - Remove param from refreshUpdateStatus. r=spohl

This commit is contained in:
Robert Strong 2015-03-02 11:09:13 -08:00
parent 2a114d89af
commit 120b2310e5
5 changed files with 10 additions and 11 deletions

View File

@ -477,7 +477,7 @@ interface nsIUpdateProcessor : nsISupports
* An interface describing a global application service that maintains a list
* of updates previously performed as well as the current active update.
*/
[scriptable, uuid(c5df56de-919d-406b-aaf9-106dfa9b685b)]
[scriptable, uuid(f8371237-10a6-46a5-b23f-f6f7684e9d71)]
interface nsIUpdateManager : nsISupports
{
/**
@ -506,7 +506,7 @@ interface nsIUpdateManager : nsISupports
/**
* Refresh the update status based on the information in update.status.
*/
void refreshUpdateStatus(in nsIUpdate update);
void refreshUpdateStatus();
};
/**

View File

@ -3565,8 +3565,11 @@ UpdateManager.prototype = {
/**
* See nsIUpdateService.idl
*/
refreshUpdateStatus: function UM_refreshUpdateStatus(aUpdate) {
var update = this._activeUpdate ? this._activeUpdate : aUpdate;
refreshUpdateStatus: function UM_refreshUpdateStatus() {
var update = this._activeUpdate;
if (!update) {
return;
}
var updateSucceeded = true;
var status = readStatusFile(getUpdatesDir());
var ary = status.split(":");

View File

@ -49,7 +49,7 @@ function runTest() {
"update's promptWaitTime attribute value was set from the " +
PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
gUpdateManager.refreshUpdateStatus(gUpdateManager.activeUpdate);
gUpdateManager.refreshUpdateStatus();
}
]]>

View File

@ -49,7 +49,7 @@ function runTest() {
"update's promptWaitTime attribute value was set from the " +
PREF_APP_UPDATE_PROMPTWAITTIME + " preference");
gUpdateManager.refreshUpdateStatus(gUpdateManager.activeUpdate);
gUpdateManager.refreshUpdateStatus();
}
]]>

View File

@ -1231,11 +1231,7 @@ nsUpdateProcessor::UpdateDone()
nsCOMPtr<nsIUpdateManager> um =
do_GetService("@mozilla.org/updates/update-manager;1");
if (um) {
nsCOMPtr<nsIUpdate> update;
um->GetActiveUpdate(getter_AddRefs(update));
if (update) {
um->RefreshUpdateStatus(update);
}
um->RefreshUpdateStatus();
}
ShutdownWatcherThread();