Also make DownloadManager NAM private if private browsing is on
There's only one global DownloadManager with its own NAM (for downloads not associated with a page). We can't really decide whether that should be private or not, so as a best-effort approximation we simply make it private if private browsing was turned on when starting qutebrowser.
This commit is contained in:
parent
89dc8185b9
commit
27aa40428e
@ -27,6 +27,7 @@ import collections
|
||||
from PyQt5.QtCore import pyqtSlot, pyqtSignal, QTimer
|
||||
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply
|
||||
|
||||
from qutebrowser.config import config
|
||||
from qutebrowser.utils import message, usertypes, log, urlutils, utils
|
||||
from qutebrowser.browser import downloads
|
||||
from qutebrowser.browser.webkit import http
|
||||
@ -366,7 +367,8 @@ class DownloadManager(downloads.AbstractDownloadManager):
|
||||
def __init__(self, win_id, parent=None):
|
||||
super().__init__(parent)
|
||||
self._networkmanager = networkmanager.NetworkManager(
|
||||
win_id=win_id, tab_id=None, private=False, parent=self)
|
||||
win_id=win_id, tab_id=None,
|
||||
private=config.get('general', 'private-browsing'), parent=self)
|
||||
|
||||
@pyqtSlot('QUrl')
|
||||
def get(self, url, *, user_agent=None, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user