1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/content/resetProfile.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,34 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +"use strict"; 1.9 + 1.10 +let Cu = Components.utils; 1.11 + 1.12 +Cu.import("resource://gre/modules/Services.jsm"); 1.13 +Cu.import("resource://gre/modules/ResetProfile.jsm"); 1.14 + 1.15 +// based on onImportItemsPageShow from migration.js 1.16 +function populateResetPane(aContainerID) { 1.17 + let resetProfileItems = document.getElementById(aContainerID); 1.18 + try { 1.19 + let dataTypes = ResetProfile.getMigratedData(); 1.20 + for (let dataType of dataTypes) { 1.21 + let label = document.createElement("label"); 1.22 + label.setAttribute("value", dataType); 1.23 + resetProfileItems.appendChild(label); 1.24 + } 1.25 + } catch (ex) { 1.26 + Cu.reportError(ex); 1.27 + } 1.28 +} 1.29 + 1.30 +function onResetProfileLoad() { 1.31 + populateResetPane("migratedItems"); 1.32 +} 1.33 + 1.34 +function onResetProfileAccepted() { 1.35 + let retVals = window.arguments[0]; 1.36 + retVals.reset = true; 1.37 +}