Bug 236627 getReferrer should create uris using the io service

r=neil sr=darin
This commit is contained in:
cbiesinger%web.de 2006-07-29 05:42:36 +00:00
Родитель 04c853c95d
Коммит 8b8551ca0d
1 изменённых файлов: 1 добавлений и 14 удалений

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

@ -78,9 +78,7 @@ function getReferrer(doc)
var sourceURL = getContentFrameURI(focusedWindow);
try {
var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI);
uri.spec = sourceURL;
return uri;
return makeURL(sourceURL);
} catch (e) {
return null;
}
@ -718,17 +716,6 @@ function makeFilePicker()
return Components.classes[fpContractID].createInstance(fpIID);
}
function makeTempFile()
{
const mimeTypes = "TmpD";
const flContractID = "@mozilla.org/file/directory_service;1";
const flIID = Components.interfaces.nsIProperties;
var fileLocator = Components.classes[flContractID].getService(flIID);
var tempFile = fileLocator.get(mimeTypes, Components.interfaces.nsIFile);
tempFile.append("~sav" + Math.floor(Math.random() * 1000) + ".tmp");
return tempFile;
}
function getMIMEService()
{
const mimeSvcContractID = "@mozilla.org/mime;1";