зеркало из https://github.com/mozilla/gecko-dev.git
Bug 722845 - Part 5: Disable offline cache entries for private channels. r=mayhemer
This commit is contained in:
Родитель
724407ef07
Коммит
8865ba35f5
|
@ -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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче