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