--- a/browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp Thu Aug 19 10:58:56 2010 +0300
+++ b/browserutilities/downloadmgr/DownloadMgrServEng/Src/BuffStorage.cpp Tue Aug 31 16:17:46 2010 +0300
@@ -28,9 +28,9 @@
#include "HttpDownloadMgrLogger.h"
#include "HeaderField.h"
-#include <SysUtil.h>
+#include <sysutil.h>
#include <DocumentHandler.h>
-#include <APMSTD.H>
+#include <apmstd.h>
#include "HttpDownloadMgrLogger.h"
@@ -79,7 +79,6 @@
{
LOGGER_ENTERFN( "ConstructL" );
CActiveScheduler::Add( this );
- iWait = new (ELeave) CActiveSchedulerWait;
}
// -----------------------------------------------------------------------------
@@ -109,11 +108,6 @@
ResetBuffers();
delete iWritePtr; iWritePtr = 0;
- if(iWait)
- {
- delete iWait;
- iWait = NULL;
- }
}
@@ -140,10 +134,10 @@
CLOG_WRITE_2( "(%08X) CBuffStorage::RunL DH-iStat: %d, ", this, iStatus.Int() );
}
- if(iWait && iWait->IsStarted())
+ if(iWait.IsStarted())
{
CLOG_WRITE_1 ( "(%08X) CBuffStorage::RunL() Stopping iWait", this );
- iWait->AsyncStop();
+ iWait.AsyncStop();
}
}
@@ -163,10 +157,10 @@
{
CLOG_WRITE_1("(%08X) CBuffStorage::ResetBuffers >>", this);
- if(IsActive()&& iWait && !iWait->IsStarted())
+ if(IsActive())
{
// Make sure async writes are finished
- iWait->Start();
+ iWait.Start();
}
// Cleanup
@@ -231,10 +225,10 @@
CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL >>", this);
// Make sure async writes are finished before doing anything
- if(IsActive() && iWait && !iWait->IsStarted())
+ if(IsActive())
{
CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL: stalling >>", this);
- iWait->Start();
+ iWait.Start();
CLOG_WRITE_1("(%08X) CBuffStorage::FlushBuffersL: stalling <<", this);
}
@@ -341,10 +335,10 @@
// Check if previous async write is still ongoing
// Done here so if somebody switched on progressive download midway through we don't mix buffers
- if(IsActive()&& iWait && !iWait->IsStarted())
+ if(IsActive())
{
CLOG_WRITE_1("(%08X) CBuffStorage::DoBufferingWriteL: stalling >>", this);
- iWait->Start();
+ iWait.Start();
CLOG_WRITE_1("(%08X) CBuffStorage::DoBufferingWriteL: stalling <<", this);
}
@@ -421,10 +415,10 @@
{
CLOG_WRITE_2("(%08X) CBuffStorage::DoNonbufferingWriteL: %d bytes", this, aBuf.Length());
- if(IsActive() && iWait && !iWait->IsStarted())
+ if(IsActive())
{
CLOG_WRITE_1("(%08X) CBuffStorage::DoNonbufferingWriteL: stalling >>", this);
- iWait->Start();
+ iWait.Start();
CLOG_WRITE_1("(%08X) CBuffStorage::DoNonbufferingWriteL: stalling <<", this);
}