Bug 1188478 - Add an Import button to the password manager to open the browser migrator. r=dolske

Windows-only for now since we can't yet import passwords on other platforms.
This commit is contained in:
Matthew Noorenberghe 2015-08-07 13:06:16 -07:00
parent aac6e79db2
commit 4ea5c223a9
5 changed files with 18 additions and 0 deletions

View File

@ -454,3 +454,8 @@ function escapeKeyHandler() {
}
window.close();
}
function OpenMigrator() {
const { MigrationUtils } = Cu.import("resource:///modules/MigrationUtils.jsm", {});
MigrationUtils.showMigrationWizard(window);
}

View File

@ -103,6 +103,11 @@
label="&removeall.label;" accesskey="&removeall.accesskey;"
oncommand="DeleteAllSignons();"/>
<spacer flex="1"/>
#if defined(MOZ_BUILD_APP_IS_BROWSER) && defined(XP_WIN)
<button accesskey="&import.accesskey;"
label="&import.label;"
oncommand="OpenMigrator();"/>
#endif
<button id="togglePasswords"
oncommand="TogglePasswordVisible();"/>
</hbox>

View File

@ -4,6 +4,8 @@
/*** =================== INITIALISATION CODE =================== ***/
const { classes: Cc, interfaces: Ci, results: Cr, utils: Cu } = Components;
Components.utils.import("resource://gre/modules/Services.jsm");
var kObserverService;

View File

@ -4,6 +4,9 @@
# 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/.
if CONFIG['MOZ_BUILD_APP'] == 'browser':
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
MOCHITEST_MANIFESTS += ['test/mochitest.ini']
MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
BROWSER_CHROME_MANIFESTS += ['test/browser/browser.ini']

View File

@ -22,6 +22,9 @@
<!ENTITY removeall.label "Remove All">
<!ENTITY removeall.accesskey "A">
<!ENTITY import.label "Import…">
<!ENTITY import.accesskey "I">
<!ENTITY filter.label "Search:">
<!ENTITY filter.accesskey "S">