Bug 236627 getReferrer should create uris using the io service

r=neil sr=darin
This commit is contained in:
cbiesinger%web.de 2004-03-09 16:45:05 +00:00
Родитель d72de54a43
Коммит efaa40fdef
1 изменённых файлов: 1 добавлений и 14 удалений

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

@ -78,9 +78,7 @@ function getReferrer(doc)
var sourceURL = getContentFrameURI(focusedWindow); var sourceURL = getContentFrameURI(focusedWindow);
try { try {
var uri = Components.classes["@mozilla.org/network/standard-url;1"].createInstance(Components.interfaces.nsIURI); return makeURL(sourceURL);
uri.spec = sourceURL;
return uri;
} catch (e) { } catch (e) {
return null; return null;
} }
@ -718,17 +716,6 @@ function makeFilePicker()
return Components.classes[fpContractID].createInstance(fpIID); 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() function getMIMEService()
{ {
const mimeSvcContractID = "@mozilla.org/mime;1"; const mimeSvcContractID = "@mozilla.org/mime;1";