Bug 281130 rename NS_DOWNLOAD_CONTRACTID to NS_TRANSFER_CONTRACTID to better

reflects its purpose
r=bz sr=darin
This commit is contained in:
cbiesinger%web.de 2005-02-07 14:35:46 +00:00
parent 6b61696ec8
commit 40888bf15f
14 changed files with 14 additions and 14 deletions

View File

@ -304,7 +304,7 @@ function foundHeaderInfo(aSniffer, aData, aSkipPrompt)
persist.persistFlags &= ~nsIWBP.PERSIST_FLAGS_NO_CONVERSION;
// Create download and initiate it (below)
var tr = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsITransfer);
var tr = Components.classes["@mozilla.org/transfer;1"].createInstance(Components.interfaces.nsITransfer);
if (isDocument && saveAsType != kSaveAsType_URL) {
// Saving a Document, not a URI:

View File

@ -167,7 +167,7 @@ static const nsModuleComponentInfo gAppComponents[] = {
{
"Download",
NS_DOWNLOAD_CID,
NS_DOWNLOAD_CONTRACTID,
NS_TRANSFER_CONTRACTID,
nsDownloadListenerConstructor
},
{

View File

@ -365,7 +365,7 @@ nsresult nsHeaderSniffer::InitiateDownload(nsISupports* inSourceData, nsString&
PRInt64 timeNow = PR_Now();
nsCOMPtr<nsIDownload> downloader = do_CreateInstance(NS_DOWNLOAD_CONTRACTID);
nsCOMPtr<nsIDownload> downloader = do_CreateInstance(NS_TRANSFER_CONTRACTID);
// dlListener attaches to its progress dialog here, which gains ownership
rv = downloader->Init(inOriginalURI, destURI, inFileName.get(), nsnull, timeNow, webPersist);
if (NS_FAILED(rv)) return rv;

View File

@ -112,7 +112,7 @@ CHBrowserService::InitEmbedding()
if (NS_FAILED(rv)) return rv;
static NS_DEFINE_CID(kDownloadCID, NS_DOWNLOAD_CID);
rv = cr->RegisterFactory(kDownloadCID, "Download", NS_DOWNLOAD_CONTRACTID, downloadFactory);
rv = cr->RegisterFactory(kDownloadCID, "Download", NS_TRANSFER_CONTRACTID, downloadFactory);
return rv;
}

View File

@ -339,7 +339,7 @@ nsresult nsHeaderSniffer::InitiateDownload(nsISupports* inSourceData, nsString&
PRInt64 timeNow = PR_Now();
nsCOMPtr<nsIDownload> downloader = do_CreateInstance(NS_DOWNLOAD_CONTRACTID);
nsCOMPtr<nsIDownload> downloader = do_CreateInstance(NS_TRANSFER_CONTRACTID);
// dlListener attaches to its progress dialog here, which gains ownership
rv = downloader->Init(inOriginalURI, destFile, inFileName.get(), nsnull, timeNow, webPersist);
if (NS_FAILED(rv)) return rv;

View File

@ -60,7 +60,7 @@ static const nsModuleComponentInfo components[] = {
{
"Download",
NS_DOWNLOAD_CID,
NS_DOWNLOAD_CONTRACTID,
NS_TRANSFER_CONTRACTID,
CDownloadConstructor
},
{

View File

@ -393,7 +393,7 @@ nsresult CHeaderSniffer::InitiateDownload(nsISupports* inSourceData, nsILocalFil
nsAutoString fileDisplayName;
inDestFile->GetLeafName(fileDisplayName);
nsCOMPtr<nsIDownload> downloader = do_CreateInstance(NS_DOWNLOAD_CONTRACTID);
nsCOMPtr<nsIDownload> downloader = do_CreateInstance(NS_TRANSFER_CONTRACTID);
// dlListener attaches to its progress dialog here, which gains ownership
rv = downloader->Init(inOriginalURI, inDestFile, fileDisplayName.get(), nsnull, timeNow, webPersist);
if (NS_FAILED(rv)) return rv;

View File

@ -1793,7 +1793,7 @@ nsresult nsSaveMsgListener::InitializeDownload(nsIRequest * aRequest, PRInt32 aB
// so make an arbitrary decision based on the content length of the attachment
if (mContentLength != -1 && mContentLength > aBytesDownloaded * 2)
{
nsCOMPtr<nsITransfer> tr = do_CreateInstance("@mozilla.org/download;1", &rv);
nsCOMPtr<nsITransfer> tr = do_CreateInstance(NS_TRANSFER_CONTRACTID, &rv);
if (tr && outputFile)
{
PRTime timeDownloadStarted = PR_Now();

View File

@ -128,7 +128,7 @@ static const nsModuleComponentInfo components[] =
{ "Download",
NS_DOWNLOAD_CID,
NS_DOWNLOAD_CONTRACTID,
NS_TRANSFER_CONTRACTID,
nsDownloadProxyConstructor },
{ "HTML Form History",

View File

@ -108,5 +108,5 @@ interface nsITransfer : nsIWebProgressListener {
* INTERFACES THAT MAY BE IMPLEMENTED:
* nsIObserver
*/
#define NS_DOWNLOAD_CONTRACTID "@mozilla.org/download;1"
#define NS_TRANSFER_CONTRACTID "@mozilla.org/transfer;1"
%}

View File

@ -2121,7 +2121,7 @@ nsresult nsExternalAppHandler::CreateProgressListener()
mDialog = nsnull;
nsresult rv;
nsCOMPtr<nsITransfer> tr = do_CreateInstance("@mozilla.org/download;1", &rv);
nsCOMPtr<nsITransfer> tr = do_CreateInstance(NS_TRANSFER_CONTRACTID, &rv);
if (NS_SUCCEEDED(rv))
InitializeDownload(tr);

View File

@ -339,7 +339,7 @@ function internalSave(aURL, aDocument, aDefaultFileName, aShouldBypassCache,
persist.persistFlags |= nsIWBP.PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION;
// Create download and initiate it (below)
var tr = Components.classes["@mozilla.org/download;1"].createInstance(Components.interfaces.nsITransfer);
var tr = Components.classes["@mozilla.org/transfer;1"].createInstance(Components.interfaces.nsITransfer);
if (useSaveDocument) {
// Saving a Document, not a URI:

View File

@ -166,7 +166,7 @@ static const nsModuleComponentInfo components[] = {
nsBookmarksServiceConstructor },
{ "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID,
nsDownloadManagerConstructor },
{ "Download", NS_DOWNLOAD_CID, NS_DOWNLOAD_CONTRACTID,
{ "Download", NS_DOWNLOAD_CID, NS_TRANSFER_CONTRACTID,
nsDownloadProxyConstructor },
{ "AutoComplete Search Results", NS_AUTOCOMPLETERESULTS_CID, NS_AUTOCOMPLETERESULTS_CONTRACTID,
nsAutoCompleteResultsConstructor},

View File

@ -83,7 +83,7 @@ static const nsModuleComponentInfo components[] = {
{ "Download Manager", NS_DOWNLOADMANAGER_CID, NS_DOWNLOADMANAGER_CONTRACTID,
nsDownloadManagerConstructor },
{ "Download", NS_DOWNLOAD_CID, NS_DOWNLOAD_CONTRACTID,
{ "Download", NS_DOWNLOAD_CID, NS_TRANSFER_CONTRACTID,
nsDownloadProxyConstructor },
{ "AutoComplete Search Results", NS_AUTOCOMPLETERESULTS_CID, NS_AUTOCOMPLETERESULTS_CONTRACTID,
nsAutoCompleteResultsConstructor},