michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: let Cu = Components.utils; michael@0: michael@0: Cu.import("resource://gre/modules/Services.jsm"); michael@0: Cu.import("resource://gre/modules/ResetProfile.jsm"); michael@0: michael@0: // based on onImportItemsPageShow from migration.js michael@0: function populateResetPane(aContainerID) { michael@0: let resetProfileItems = document.getElementById(aContainerID); michael@0: try { michael@0: let dataTypes = ResetProfile.getMigratedData(); michael@0: for (let dataType of dataTypes) { michael@0: let label = document.createElement("label"); michael@0: label.setAttribute("value", dataType); michael@0: resetProfileItems.appendChild(label); michael@0: } michael@0: } catch (ex) { michael@0: Cu.reportError(ex); michael@0: } michael@0: } michael@0: michael@0: function onResetProfileLoad() { michael@0: populateResetPane("migratedItems"); michael@0: } michael@0: michael@0: function onResetProfileAccepted() { michael@0: let retVals = window.arguments[0]; michael@0: retVals.reset = true; michael@0: }