bug 72528, removing old cache from build. sr=darin.

git-svn-id: svn://10.0.0.236/trunk@92548 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gordon%netscape.com
2001-04-17 10:40:13 +00:00
parent 9a35a75ae3
commit 91ac06c23a
2 changed files with 12 additions and 0 deletions

View File

@@ -106,8 +106,10 @@
#include "nsIDocumentCharsetInfo.h"
#include "nsIDocumentEncoder.h" //for outputting selection
#include "nsIBookmarksService.h"
#ifdef MOZ_OLD_CACHE
#include "nsINetDataCacheManager.h"
#include "nsICachedNetData.h"
#endif
#include "nsIXMLContent.h" //for createelementNS
#include "nsHTMLParts.h" //for createelementNS
#include "nsLayoutCID.h"
@@ -433,7 +435,9 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
}
}
#ifdef MOZ_OLD_CACHE
nsCOMPtr<nsICachedNetData> cachedData;
#endif
nsresult rv = nsDocument::StartDocumentLoad(aCommand,
aChannel, aLoadGroup,
aContainer,
@@ -539,12 +543,14 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
rv = httpChannel->GetLoadFlags(&loadAttr);
NS_ASSERTION(NS_SUCCEEDED(rv),"cannot get load attribute");
if(NS_SUCCEEDED(rv)) {
#ifdef MOZ_OLD_CACHE
// copy from nsHTTPChannel.cpp
if(loadAttr & nsIChannel::CACHE_AS_FILE)
cacheFlags = nsINetDataCacheManager::CACHE_AS_FILE;
else if(loadAttr & nsIRequest::INHIBIT_PERSISTENT_CACHING)
cacheFlags = nsINetDataCacheManager::BYPASS_PERSISTENT_CACHE;
bTryCache = PR_TRUE;
#endif
}
// Don't propogate the result code beyond here, since it
@@ -792,6 +798,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
if(bTryCache && urlSpec)
{
#ifdef MOZ_OLD_CACHE
nsCOMPtr<nsINetDataCacheManager> cacheMgr;
cacheMgr = do_GetService(NS_NETWORK_CACHE_MANAGER_CONTRACTID, &rv);
if(NS_SUCCEEDED(rv))
@@ -813,6 +820,7 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
}
}
rv=NS_OK;
#endif
}
if (kCharsetFromParentFrame > charsetSource) {
@@ -877,11 +885,13 @@ nsHTMLDocument::StartDocumentLoad(const char* aCommand,
return rv;
}
#ifdef MOZ_OLD_CACHE
if(cachedData) {
rv=cachedData->SetAnnotation("charset",charset.Length()+1,
NS_ConvertUCS2toUTF8(charset).get());
NS_ASSERTION(NS_SUCCEEDED(rv),"cannot SetAnnotation");
}
#endif
// Set the parser as the stream listener for the document loader...
if (mParser) {