Commit 938997fa authored by Alex Catarineu's avatar Alex Catarineu Committed by Georg Koppen
Browse files

Bug 28746: Remove torbutton isolation and fp prefs sync

parent 2dfa0e0c
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -100,11 +100,9 @@ var torbutton_unique_pref_observer =
    {
        this.forced_ua = false;
        m_tb_prefs.addObserver("extensions.torbutton", this, false);
        m_tb_prefs.addObserver("network.cookie", this, false);
        m_tb_prefs.addObserver("browser.privatebrowsing.autostart", this, false);
        m_tb_prefs.addObserver("javascript", this, false);
        m_tb_prefs.addObserver("plugin.disable", this, false);
        m_tb_prefs.addObserver("privacy.firstparty.isolate", this, false);
        m_tb_prefs.addObserver("privacy.resistFingerprinting", this, false);
        m_tb_prefs.addObserver("privacy.resistFingerprinting.letterboxing", this, false);

@@ -116,11 +114,9 @@ var torbutton_unique_pref_observer =
    unregister: function()
    {
        m_tb_prefs.removeObserver("extensions.torbutton", this);
        m_tb_prefs.removeObserver("network.cookie", this);
        m_tb_prefs.removeObserver("browser.privatebrowsing.autostart", this);
        m_tb_prefs.removeObserver("javascript", this);
        m_tb_prefs.removeObserver("plugin.disable", this);
        m_tb_prefs.removeObserver("privacy.firstparty.isolate", this);
        m_tb_prefs.removeObserver("privacy.resistFingerprinting", this);
        m_tb_prefs.removeObserver("privacy.resistFingerprinting.letterboxing", this);

@@ -175,9 +171,6 @@ var torbutton_unique_pref_observer =
            case "privacy.resistFingerprinting.letterboxing":
                torbutton_update_fingerprinting_prefs();
                break;
            case "privacy.firstparty.isolate":
                torbutton_update_isolation_prefs();
                break;
        }
    }
}
@@ -1453,25 +1446,12 @@ function torbutton_update_disk_prefs() {
function torbutton_update_fingerprinting_prefs() {
    var mode = m_tb_prefs.getBoolPref("privacy.resistFingerprinting");
    var letterboxing = m_tb_prefs.getBoolPref("privacy.resistFingerprinting.letterboxing", false);

    m_tb_prefs.setBoolPref("webgl.disable-extensions", mode);
    m_tb_prefs.setBoolPref("dom.enable_performance", !mode);
    m_tb_prefs.setBoolPref("browser.zoom.siteSpecific", !mode);
    m_tb_prefs.setBoolPref("extensions.torbutton.resize_new_windows", mode && !letterboxing);

    // Force prefs to be synced to disk
    Services.prefs.savePrefFile(null);
}

function torbutton_update_isolation_prefs() {
    let isolate = m_tb_prefs.getBoolPref("privacy.firstparty.isolate");

    m_tb_prefs.setBoolPref("security.enable_tls_session_tickets", !isolate);

    // Force prefs to be synced to disk
    Services.prefs.savePrefFile(null);
}

// This function closes all XUL browser windows except this one. For this
// window, it closes all existing tabs and creates one about:blank tab.
function torbutton_close_tabs_on_new_identity() {