toolkit/content/resetProfile.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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