mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Issue #1721 - Implement GlobalPrivacyControl
(and get rid of failed DoNotTrack)
This commit is contained in:
parent
0315aeee73
commit
50ad087351
14 changed files with 41 additions and 50 deletions
|
|
@ -87,7 +87,7 @@
|
|||
#define HTTP_PREF_PREFIX "network.http."
|
||||
#define INTL_ACCEPT_LANGUAGES "intl.accept_languages"
|
||||
#define BROWSER_PREF_PREFIX "browser.cache."
|
||||
#define DONOTTRACK_HEADER_ENABLED "privacy.donottrackheader.enabled"
|
||||
#define GPC_HEADER_ENABLED "privacy.GPCheader.enabled"
|
||||
#define H2MANDATORY_SUITE "security.ssl3.ecdhe_rsa_aes_128_gcm_sha256"
|
||||
#define ALLOW_EXPERIMENTS "network.allow-experiments"
|
||||
#define SAFE_HINT_HEADER_VALUE "safeHint.enabled"
|
||||
|
|
@ -181,7 +181,7 @@ nsHttpHandler::nsHttpHandler()
|
|||
, mAcceptLanguagesIsDirty(true)
|
||||
, mPromptTempRedirect(true)
|
||||
, mEnablePersistentHttpsCaching(false)
|
||||
, mDoNotTrackEnabled(false)
|
||||
, mGPCEnabled(false)
|
||||
, mSafeHintEnabled(false)
|
||||
, mParentalControlEnabled(false)
|
||||
, mHandlerActive(false)
|
||||
|
|
@ -279,7 +279,7 @@ nsHttpHandler::Init()
|
|||
prefBranch->AddObserver(UA_PREF_PREFIX, this, true);
|
||||
prefBranch->AddObserver(INTL_ACCEPT_LANGUAGES, this, true);
|
||||
prefBranch->AddObserver(BROWSER_PREF("disk_cache_ssl"), this, true);
|
||||
prefBranch->AddObserver(DONOTTRACK_HEADER_ENABLED, this, true);
|
||||
prefBranch->AddObserver(GPC_HEADER_ENABLED, this, true);
|
||||
prefBranch->AddObserver(H2MANDATORY_SUITE, this, true);
|
||||
prefBranch->AddObserver(HTTP_PREF("tcp_keepalive.short_lived_connections"), this, true);
|
||||
prefBranch->AddObserver(HTTP_PREF("tcp_keepalive.long_lived_connections"), this, true);
|
||||
|
|
@ -1497,11 +1497,11 @@ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
|
|||
// Tracking options
|
||||
//
|
||||
|
||||
if (PREF_CHANGED(DONOTTRACK_HEADER_ENABLED)) {
|
||||
if (PREF_CHANGED(GPC_HEADER_ENABLED)) {
|
||||
cVar = false;
|
||||
rv = prefs->GetBoolPref(DONOTTRACK_HEADER_ENABLED, &cVar);
|
||||
rv = prefs->GetBoolPref(GPC_HEADER_ENABLED, &cVar);
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
mDoNotTrackEnabled = cVar;
|
||||
mGPCEnabled = cVar;
|
||||
}
|
||||
}
|
||||
// Hint option
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue