equal
deleted
inserted
replaced
492 HttpCacheUtil::WriteFormatLog(0, _L("CACHEPOSTPONE: CHttpCacheStreamEntry::FlushAsync called on object %08x. Cached data %d bytes"), &aEntry, datalen ); |
492 HttpCacheUtil::WriteFormatLog(0, _L("CACHEPOSTPONE: CHttpCacheStreamEntry::FlushAsync called on object %08x. Cached data %d bytes"), &aEntry, datalen ); |
493 #endif |
493 #endif |
494 |
494 |
495 if ( datalen && aEntry.BodyData().Length() ) // don't bother writing files which have no body data |
495 if ( datalen && aEntry.BodyData().Length() ) // don't bother writing files which have no body data |
496 { |
496 { |
497 if ( IsDiskSpaceAvailable( datalen ) && CreateNewBodyFile( aEntry ) ) |
497 if ( IsDiskSpaceAvailable( datalen ) && CreateNewBodyFile( aEntry, ETrue ) ) |
498 { |
498 { |
499 #ifdef __CACHELOG__ |
499 #ifdef __CACHELOG__ |
500 HttpCacheUtil::WriteFormatLog(0, _L("CACHEPOSTPONE: Triggering Async write for object 0x%08x."), &aEntry); |
500 HttpCacheUtil::WriteFormatLog(0, _L("CACHEPOSTPONE: Triggering Async write for object 0x%08x."), &aEntry); |
501 #endif |
501 #endif |
502 // trim any spare space available. |
502 // trim any spare space available. |
592 // ----------------------------------------------------------------------------- |
592 // ----------------------------------------------------------------------------- |
593 // CHttpCacheStreamHandler::CreateNewBodyFile |
593 // CHttpCacheStreamHandler::CreateNewBodyFile |
594 // |
594 // |
595 // ----------------------------------------------------------------------------- |
595 // ----------------------------------------------------------------------------- |
596 // |
596 // |
597 TBool CHttpCacheStreamHandler::CreateNewBodyFile( CHttpCacheEntry& aCacheEntry ) |
597 TBool CHttpCacheStreamHandler::CreateNewBodyFile( CHttpCacheEntry& aCacheEntry, TBool aUseDirectIO ) |
598 { |
598 { |
599 TInt statusBody( KErrNotFound ); |
599 TInt statusBody( KErrNotFound ); |
600 |
600 |
601 // Create the body file or replace it, if it exists. |
601 // Create the body file or replace it, if it exists. |
|
602 #ifdef BRDO_RFILE_WRITE_DIRECT_IO_FF |
|
603 statusBody = aCacheEntry.BodyFile().Replace( iRfs, aCacheEntry.Filename(), EFileShareExclusive | EFileWrite | (aUseDirectIO ? EFileWriteDirectIO : 0) ); |
|
604 #else |
602 statusBody = aCacheEntry.BodyFile().Replace( iRfs, aCacheEntry.Filename(), EFileShareExclusive | EFileWrite ); |
605 statusBody = aCacheEntry.BodyFile().Replace( iRfs, aCacheEntry.Filename(), EFileShareExclusive | EFileWrite ); |
|
606 #endif |
603 |
607 |
604 #ifdef __CACHELOG__ |
608 #ifdef __CACHELOG__ |
605 HttpCacheUtil::WriteUrlToLog( 0, aCacheEntry.Filename(), aCacheEntry.Url() ); |
609 HttpCacheUtil::WriteUrlToLog( 0, aCacheEntry.Filename(), aCacheEntry.Url() ); |
606 #endif |
610 #endif |
607 |
611 |