diff --git a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp index 5a307f58a1a..a4891c0c404 100644 --- a/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/base/src/nsPluginHostImpl.cpp @@ -51,10 +51,10 @@ #include "nsNetUtil.h" #include "nsIProgressEventSink.h" #include "nsIDocument.h" - - -#if MOZ_NEW_CACHE -#include "nsICachingChannel.h" + + +#if MOZ_NEW_CACHE +#include "nsICachingChannel.h" #endif // Friggin' X11 has to "#define None". Lame! #ifdef None @@ -1285,18 +1285,18 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request, nsISupports* aCo if (!channel) return NS_ERROR_FAILURE; - -#if MOZ_NEW_CACHE - nsCOMPtr cacheChannel = do_QueryInterface(channel); - if (cacheChannel) { - rv = cacheChannel->SetCacheAsFile(PR_TRUE); - if (NS_FAILED(rv)) { - // FIX: Cache must be disabled. We should try to stream this file - // to disk ourselves otherwise OnFileAvailable will never be fired. - NS_ASSERTION(PR_FALSE, "No Disk Cache Aval. Some plugins wont work."); - } - } -#endif + +#if MOZ_NEW_CACHE + nsCOMPtr cacheChannel = do_QueryInterface(channel); + if (cacheChannel) { + rv = cacheChannel->SetCacheAsFile(PR_TRUE); + if (NS_FAILED(rv)) { + // FIX: Cache must be disabled. We should try to stream this file + // to disk ourselves otherwise OnFileAvailable will never be fired. + NS_ASSERTION(PR_FALSE, "No Disk Cache Aval. Some plugins wont work."); + } + } +#endif char* aContentType = nsnull; rv = channel->GetContentType(&aContentType); @@ -1455,15 +1455,15 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest *request, { char* urlString; nsCOMPtr localFile; - -#if MOZ_NEW_CACHE - nsCOMPtr cacheChannel = do_QueryInterface(channel); - if (cacheChannel) - rv = cacheChannel->GetCacheFile(getter_AddRefs(localFile)); -#else + +#if MOZ_NEW_CACHE + nsCOMPtr cacheChannel = do_QueryInterface(channel); + if (cacheChannel) + rv = cacheChannel->GetCacheFile(getter_AddRefs(localFile)); +#else nsCOMPtr streamAsFile = do_QueryInterface(channel); if (streamAsFile) - rv = streamAsFile->GetFile(getter_AddRefs(localFile)); + rv = streamAsFile->GetFile(getter_AddRefs(localFile)); #endif if (NS_SUCCEEDED(rv) && localFile) { diff --git a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp index 5a307f58a1a..a4891c0c404 100644 --- a/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp +++ b/mozilla/modules/plugin/nglsrc/nsPluginHostImpl.cpp @@ -51,10 +51,10 @@ #include "nsNetUtil.h" #include "nsIProgressEventSink.h" #include "nsIDocument.h" - - -#if MOZ_NEW_CACHE -#include "nsICachingChannel.h" + + +#if MOZ_NEW_CACHE +#include "nsICachingChannel.h" #endif // Friggin' X11 has to "#define None". Lame! #ifdef None @@ -1285,18 +1285,18 @@ nsPluginStreamListenerPeer::OnStartRequest(nsIRequest *request, nsISupports* aCo if (!channel) return NS_ERROR_FAILURE; - -#if MOZ_NEW_CACHE - nsCOMPtr cacheChannel = do_QueryInterface(channel); - if (cacheChannel) { - rv = cacheChannel->SetCacheAsFile(PR_TRUE); - if (NS_FAILED(rv)) { - // FIX: Cache must be disabled. We should try to stream this file - // to disk ourselves otherwise OnFileAvailable will never be fired. - NS_ASSERTION(PR_FALSE, "No Disk Cache Aval. Some plugins wont work."); - } - } -#endif + +#if MOZ_NEW_CACHE + nsCOMPtr cacheChannel = do_QueryInterface(channel); + if (cacheChannel) { + rv = cacheChannel->SetCacheAsFile(PR_TRUE); + if (NS_FAILED(rv)) { + // FIX: Cache must be disabled. We should try to stream this file + // to disk ourselves otherwise OnFileAvailable will never be fired. + NS_ASSERTION(PR_FALSE, "No Disk Cache Aval. Some plugins wont work."); + } + } +#endif char* aContentType = nsnull; rv = channel->GetContentType(&aContentType); @@ -1455,15 +1455,15 @@ NS_IMETHODIMP nsPluginStreamListenerPeer::OnStopRequest(nsIRequest *request, { char* urlString; nsCOMPtr localFile; - -#if MOZ_NEW_CACHE - nsCOMPtr cacheChannel = do_QueryInterface(channel); - if (cacheChannel) - rv = cacheChannel->GetCacheFile(getter_AddRefs(localFile)); -#else + +#if MOZ_NEW_CACHE + nsCOMPtr cacheChannel = do_QueryInterface(channel); + if (cacheChannel) + rv = cacheChannel->GetCacheFile(getter_AddRefs(localFile)); +#else nsCOMPtr streamAsFile = do_QueryInterface(channel); if (streamAsFile) - rv = streamAsFile->GetFile(getter_AddRefs(localFile)); + rv = streamAsFile->GetFile(getter_AddRefs(localFile)); #endif if (NS_SUCCEEDED(rv) && localFile) {