зеркало из https://github.com/mozilla/pjs.git
Bug 722845 - Part 5: Disable offline cache entries for private channels. r=mayhemer
This commit is contained in:
Родитель
aabb5e983a
Коммит
d0cc9b5f28
|
@ -18,6 +18,7 @@
|
|||
#include "nsStyleLinkElement.h"
|
||||
#include "nsINodeInfo.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsILoadContext.h"
|
||||
#include "nsIDocShellTreeItem.h"
|
||||
#include "nsCPrefetchService.h"
|
||||
#include "nsIURI.h"
|
||||
|
@ -1032,6 +1033,13 @@ nsContentSink::ProcessOfflineManifest(const nsAString& aManifestSpec)
|
|||
return;
|
||||
}
|
||||
|
||||
// If the docshell's in private browsing mode, we don't want to do any
|
||||
// manifest processing.
|
||||
nsCOMPtr<nsILoadContext> loadContext = do_QueryInterface(mDocShell);
|
||||
if (loadContext->UsePrivateBrowsing()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsresult rv;
|
||||
|
||||
// Grab the application cache the document was loaded from, if any.
|
||||
|
|
|
@ -8794,6 +8794,10 @@ nsDocShell::GetInheritedPrincipal(bool aConsiderCurrentDocument)
|
|||
bool
|
||||
nsDocShell::ShouldCheckAppCache(nsIURI *aURI)
|
||||
{
|
||||
if (mInPrivateBrowsing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIOfflineCacheUpdateService> offlineService =
|
||||
do_GetService(NS_OFFLINECACHEUPDATESERVICE_CONTRACTID);
|
||||
if (!offlineService) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче