Bug 910391 - Remove offline cache observer parameter from confirmInstall. r=fabrice

This commit is contained in:
Marco Castelluccio 2013-08-29 10:00:33 -04:00
Родитель 01f4d9ec2b
Коммит d3da34b11a
4 изменённых файлов: 8 добавлений и 17 удалений

Просмотреть файл

@ -137,7 +137,7 @@ this.webappsUI = {
localDir = app.appProfile.localDir; localDir = app.appProfile.localDir;
} }
DOMApplicationRegistry.confirmInstall(aData, localDir, null, DOMApplicationRegistry.confirmInstall(aData, localDir,
(aManifest) => { (aManifest) => {
Task.spawn(function() { Task.spawn(function() {
try { try {

Просмотреть файл

@ -1130,7 +1130,7 @@ this.DOMApplicationRegistry = {
if (manifest.appcache_path) { if (manifest.appcache_path) {
debug("appcache found"); debug("appcache found");
this.startOfflineCacheDownload(manifest, app, null, null, isUpdate); this.startOfflineCacheDownload(manifest, app, null, isUpdate);
} else { } else {
// hosted app with no appcache, nothing to do, but we fire a // hosted app with no appcache, nothing to do, but we fire a
// downloaded event // downloaded event
@ -1280,10 +1280,7 @@ this.DOMApplicationRegistry = {
}).bind(this)); }).bind(this));
}, },
startOfflineCacheDownload: function startOfflineCacheDownload(aManifest, aApp, startOfflineCacheDownload: function(aManifest, aApp, aProfileDir, aIsUpdate) {
aProfileDir,
aOfflineCacheObserver,
aIsUpdate) {
if (!aManifest.appcache_path) { if (!aManifest.appcache_path) {
return; return;
} }
@ -1320,9 +1317,6 @@ this.DOMApplicationRegistry = {
AppDownloadManager.add(aApp.manifestURL, download); AppDownloadManager.add(aApp.manifestURL, download);
cacheUpdate.addObserver(new AppcacheObserver(aApp), false); cacheUpdate.addObserver(new AppcacheObserver(aApp), false);
if (aOfflineCacheObserver) {
cacheUpdate.addObserver(aOfflineCacheObserver, false);
}
}).bind(this)); }).bind(this));
}, },
@ -1928,8 +1922,7 @@ this.DOMApplicationRegistry = {
if (cacheDownload) { if (cacheDownload) {
this.startOfflineCacheDownload(cacheDownload.manifest, this.startOfflineCacheDownload(cacheDownload.manifest,
cacheDownload.app, cacheDownload.app,
cacheDownload.profileDir, cacheDownload.profileDir);
cacheDownload.offlineCacheObserver);
delete this.queuedDownload[aManifestURL]; delete this.queuedDownload[aManifestURL];
return; return;
@ -1987,8 +1980,7 @@ this.DOMApplicationRegistry = {
} }
}, },
confirmInstall: function(aData, aProfileDir, aOfflineCacheObserver, confirmInstall: function(aData, aProfileDir, aInstallSuccessCallback) {
aInstallSuccessCallback) {
let isReinstall = false; let isReinstall = false;
let app = aData.app; let app = aData.app;
app.removable = true; app.removable = true;
@ -2086,8 +2078,7 @@ this.DOMApplicationRegistry = {
this.queuedDownload[app.manifestURL] = { this.queuedDownload[app.manifestURL] = {
manifest: manifest, manifest: manifest,
app: appObject, app: appObject,
profileDir: aProfileDir, profileDir: aProfileDir
offlineCacheObserver: aOfflineCacheObserver
} }
} }

Просмотреть файл

@ -6807,7 +6807,7 @@ var WebappsUI = {
file.initWithPath(profilePath); file.initWithPath(profilePath);
let self = this; let self = this;
DOMApplicationRegistry.confirmInstall(aData, file, null, DOMApplicationRegistry.confirmInstall(aData, file,
function (aManifest) { function (aManifest) {
let localeManifest = new ManifestHelper(aManifest, aData.app.origin); let localeManifest = new ManifestHelper(aManifest, aData.app.origin);

Просмотреть файл

@ -67,7 +67,7 @@ this.WebappsHandler = {
localDir = shell.appProfile.localDir; localDir = shell.appProfile.localDir;
} }
DOMApplicationRegistry.confirmInstall(data, localDir, null, DOMApplicationRegistry.confirmInstall(data, localDir,
function (aManifest) { function (aManifest) {
WebappsInstaller.install(data, aManifest); WebappsInstaller.install(data, aManifest);
} }