toolkit/content/resetProfile.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 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     3  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 "use strict";
     7 let Cu = Components.utils;
     9 Cu.import("resource://gre/modules/Services.jsm");
    10 Cu.import("resource://gre/modules/ResetProfile.jsm");
    12 // based on onImportItemsPageShow from migration.js
    13 function populateResetPane(aContainerID) {
    14   let resetProfileItems = document.getElementById(aContainerID);
    15   try {
    16     let dataTypes = ResetProfile.getMigratedData();
    17     for (let dataType of dataTypes) {
    18       let label = document.createElement("label");
    19       label.setAttribute("value", dataType);
    20       resetProfileItems.appendChild(label);
    21     }
    22   } catch (ex) {
    23     Cu.reportError(ex);
    24   }
    25 }
    27 function onResetProfileLoad() {
    28   populateResetPane("migratedItems");
    29 }
    31 function onResetProfileAccepted() {
    32   let retVals = window.arguments[0];
    33   retVals.reset = true;
    34 }

mercurial