toolkit/mozapps/extensions/test/addons/test_bug740612_2/bootstrap.js

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 Components.utils.import("resource://gre/modules/Services.jsm");
     3 const VERSION = "1.0";
     5 function install(data, reason) {
     6   Services.prefs.setIntPref("bootstraptest.installed_version", VERSION);
     7   Services.prefs.setIntPref("bootstraptest.install_reason", reason);
     8 }
    10 function startup(data, reason) {
    11   Services.prefs.setIntPref("bootstraptest.active_version", VERSION);
    12   Services.prefs.setIntPref("bootstraptest.startup_reason", reason);
    13 }
    15 function shutdown(data, reason) {
    16   Services.prefs.setIntPref("bootstraptest.active_version", 0);
    17   Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason);
    18 }
    20 function uninstall(data, reason) {
    21   Services.prefs.setIntPref("bootstraptest.installed_version", 0);
    22   Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason);
    23 }

mercurial