From 91ac06c23a540323d23bf72b1752d2e9fa8ef34b Mon Sep 17 00:00:00 2001 From: "gordon%netscape.com" Date: Tue, 17 Apr 2001 10:40:13 +0000 Subject: [PATCH] bug 72528, removing old cache from build. sr=darin. git-svn-id: svn://10.0.0.236/trunk@92548 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/content/html/document/src/nsHTMLDocument.cpp | 10 ++++++++++ mozilla/embedding/tests/mfcembed/StdAfx.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp index ad931ec12a9..46525c21b21 100644 --- a/mozilla/content/html/document/src/nsHTMLDocument.cpp +++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp @@ -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 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 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) { diff --git a/mozilla/embedding/tests/mfcembed/StdAfx.h b/mozilla/embedding/tests/mfcembed/StdAfx.h index 992f2e0cf65..e6554db2f00 100644 --- a/mozilla/embedding/tests/mfcembed/StdAfx.h +++ b/mozilla/embedding/tests/mfcembed/StdAfx.h @@ -75,7 +75,9 @@ #include "nsAppDirectoryServiceDefs.h" #include "nsIProfileChangeStatus.h" #include "nsIObserverService.h" +#ifdef MOZ_OLD_CACHE #include "nsINetDataCacheManager.h" +#endif #include "nsError.h" #include "nsIObserver.h" #include "nsWeakReference.h"