Bug 817477 - Remove support for global private browsing mode; r=jdm,glandium
This commit is contained in:
@@ -13,9 +13,6 @@
|
||||
#include "nsIComponentRegistrar.h"
|
||||
#include "nsDocShellCID.h"
|
||||
#include "nsNetCID.h"
|
||||
#ifndef MOZ_PER_WINDOW_PRIVATE_BROWSING
|
||||
#include "nsIPrivateBrowsingService.h"
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//// nsDownloadHistory
|
||||
@@ -33,20 +30,6 @@ nsDownloadHistory::AddDownload(nsIURI *aSource,
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aSource);
|
||||
|
||||
#if !(defined(MOZ_PER_WINDOW_PRIVATE_BROWSING)) && defined(DEBUG)
|
||||
// This code makes sure that in global private browsing mode, the flag
|
||||
// passed to us matches the global PB mode. This can be removed when
|
||||
// per-window private browsing has been turned on.
|
||||
nsCOMPtr<nsIPrivateBrowsingService> pbService =
|
||||
do_GetService(NS_PRIVATE_BROWSING_SERVICE_CONTRACTID);
|
||||
if (pbService) {
|
||||
bool inPrivateBrowsing = false;
|
||||
if (NS_SUCCEEDED(pbService->GetPrivateBrowsingEnabled(&inPrivateBrowsing))) {
|
||||
MOZ_ASSERT(!inPrivateBrowsing, "Shouldn't be adding any download history in PB mode");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
nsCOMPtr<nsIGlobalHistory2> history =
|
||||
do_GetService("@mozilla.org/browser/global-history;2");
|
||||
if (!history)
|
||||
|
||||
Reference in New Issue
Block a user