2012-02-23 19:34:18 -08: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-28 20:25:08 -07:00
|
|
|
"use strict";
|
2012-02-23 19:34:18 -08:00
|
|
|
|
2013-06-28 20:25:08 -07:00
|
|
|
let Cu = Components.utils;
|
|
|
|
|
|
|
|
Cu.import("resource://gre/modules/Services.jsm");
|
|
|
|
Cu.import("resource://gre/modules/ResetProfile.jsm");
|
2012-03-09 15:21:03 -08:00
|
|
|
|
2012-02-23 19:34:18 -08:00
|
|
|
// based on onImportItemsPageShow from migration.js
|
2012-03-09 15:21:03 -08:00
|
|
|
function populateResetPane(aContainerID) {
|
|
|
|
let resetProfileItems = document.getElementById(aContainerID);
|
|
|
|
try {
|
2013-06-28 20:25:08 -07:00
|
|
|
let dataTypes = ResetProfile.getMigratedData();
|
2012-03-09 15:21:03 -08: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-23 19:34:18 -08:00
|
|
|
function onResetProfileLoad() {
|
2012-03-09 15:21:03 -08:00
|
|
|
populateResetPane("migratedItems");
|
|
|
|
}
|
|
|
|
|
2012-02-23 19:34:18 -08:00
|
|
|
function onResetProfileAccepted() {
|
2012-03-09 15:21:03 -08:00
|
|
|
let retVals = window.arguments[0];
|
2012-02-23 19:34:18 -08:00
|
|
|
retVals.reset = true;
|
|
|
|
}
|