webengine/osswebengine/cache/src/HttpCacheEntry.cpp
changeset 11 c8a366e56285
parent 10 a359256acfc6
child 41 4bd5176e1bc8
--- a/webengine/osswebengine/cache/src/HttpCacheEntry.cpp	Thu Aug 27 07:44:59 2009 +0300
+++ b/webengine/osswebengine/cache/src/HttpCacheEntry.cpp	Thu Sep 24 12:53:48 2009 +0300
@@ -107,12 +107,26 @@
 //
 CHttpCacheEntry::~CHttpCacheEntry()
     {
+#ifdef __CACHELOG__
+    HttpCacheUtil::WriteFormatLog(0, _L("Deleting CHttpCacheEntry %08x"), this);
+#endif
     // Clean up eviction handler
     if ( iEvictionCandidate && iEvictionHandler )
         {
+#ifdef __CACHELOG__
+        HttpCacheUtil::WriteLog(0, _L("Removing from eviction candidate list"));
+#endif
         iEvictionHandler->Remove( *this );
         }
 
+    if( iDeleteObserver )
+        {
+#ifdef __CACHELOG__
+        HttpCacheUtil::WriteFormatLog(0, _L("Notifying delete observer %08x"), this);
+#endif
+        iDeleteObserver->EntryDeleted(this);
+        }
+    
     // Close files, this will commit changes
     iBodyFile.Close();
 
@@ -495,4 +509,13 @@
         }
     }
 
+void CHttpCacheEntry::SetDeleteObserver(MHttpCacheEntryDeleteObserver* aObserver)
+    {
+    iDeleteObserver = aObserver;
+    }
+
+void CHttpCacheEntry::ClearDeleteObserver()
+    {
+    iDeleteObserver = NULL;
+    }
 //  End of File