Bug 394272 - Mingw build error in nsDownloadManager.cpp, r=tellrob, a=mconnor

This commit is contained in:
martijn.martijn@gmail.com 2008-01-09 04:20:18 -08:00
Родитель 1ac4712270
Коммит a2b38dba89
3 изменённых файлов: 10 добавлений и 6 удалений

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

@ -74,9 +74,11 @@ CPPSRCS = \
nsDownloadManager.cpp \
$(NULL)
ifndef GNU_CXX
ifeq ($(OS_ARCH),WINNT)
CPPSRCS += nsDownloadScanner.cpp
endif
endif
EXTRA_COMPONENTS = \
nsDownloadManagerUI.js \

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

@ -82,8 +82,10 @@
#ifdef XP_WIN
#include <shlobj.h>
#ifndef __MINGW32__
#include "nsDownloadScanner.h"
#endif
#endif
#define DOWNLOAD_MANAGER_BUNDLE "chrome://mozapps/locale/downloads/downloads.properties"
#define DOWNLOAD_MANAGER_ALERT_ICON "chrome://mozapps/skin/downloads/downloadIcon.png"
@ -127,7 +129,7 @@ nsDownloadManager::GetSingleton()
nsDownloadManager::~nsDownloadManager()
{
#ifdef XP_WIN
#if defined(XP_WIN) and !defined(__MINGW32__)
delete mScanner;
#endif
gDownloadManagerService = nsnull;
@ -836,7 +838,7 @@ nsDownloadManager::Init()
getter_AddRefs(mBundle));
NS_ENSURE_SUCCESS(rv, rv);
#ifdef XP_WIN
#if defined(XP_WIN) and !defined(__MINGW32__)
mScanner = new nsDownloadScanner();
if (!mScanner)
return NS_ERROR_OUT_OF_MEMORY;
@ -1779,7 +1781,7 @@ nsDownload::SetState(DownloadState aState)
// Transfers are finished, so break the reference cycle
Finalize();
break;
#ifdef XP_WIN
#if defined(XP_WIN) and !defined(__MINGW32__)
case nsIDownloadManager::DOWNLOAD_SCANNING:
{
nsresult rv = mDownloadManager->mScanner ? mDownloadManager->mScanner->ScanDownload(this) : NS_ERROR_NOT_INITIALIZED;
@ -2083,7 +2085,7 @@ nsDownload::OnStateChange(nsIWebProgress *aWebProgress,
mPercentComplete = 100;
mLastUpdate = PR_Now();
#ifdef XP_WIN
#if defined(XP_WIN) and !defined(__MINGW32__)
(void)SetState(nsIDownloadManager::DOWNLOAD_SCANNING);
#else
(void)SetState(nsIDownloadManager::DOWNLOAD_FINISHED);

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

@ -71,7 +71,7 @@ typedef PRInt16 DownloadType;
class nsDownload;
#ifdef XP_WIN
#if defined(XP_WIN) and !defined(__MINGW32__)
class nsDownloadScanner;
#endif
@ -88,7 +88,7 @@ public:
static nsDownloadManager *GetSingleton();
virtual ~nsDownloadManager();
#ifdef XP_WIN
#if defined(XP_WIN) and !defined(__MINGW32__)
nsDownloadManager() : mScanner(nsnull) { };
private:
nsDownloadScanner *mScanner;