toolkit/content/resetProfile.js

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:a5c24dd933dd
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/. */
4
5 "use strict";
6
7 let Cu = Components.utils;
8
9 Cu.import("resource://gre/modules/Services.jsm");
10 Cu.import("resource://gre/modules/ResetProfile.jsm");
11
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 }
26
27 function onResetProfileLoad() {
28 populateResetPane("migratedItems");
29 }
30
31 function onResetProfileAccepted() {
32 let retVals = window.arguments[0];
33 retVals.reset = true;
34 }

mercurial