This is needed for Ubuntu Linux when Firefox is installed as a Snap package.
Under those conditions, Firefox doesn't have the ability to read the contents
of the other browsers' data directories.
We work around by showing the user a native file picker and instructing them
to browse to that data directory in folder picker mode - doing so gives
the Firefox process access to the folder (through a temporary symlink).
Another restriction we must overcome is Sqlite's inability to read from
Sqlite databases through that symlinked folder. We work around this by
copying the databases we're importing from to the system temporary
directory, querying it, and then deleting those copies.
Differential Revision: https://phabricator.services.mozilla.com/D188874
This is needed for Ubuntu Linux when Firefox is installed as a Snap package.
Under those conditions, Firefox doesn't have the ability to read the contents
of the other browsers' data directories.
We work around by showing the user a native file picker and instructing them
to browse to that data directory in folder picker mode - doing so gives
the Firefox process access to the folder (through a temporary symlink).
Another restriction we must overcome is Sqlite's inability to read from
Sqlite databases through that symlinked folder. We work around this by
copying the databases we're importing from to the system temporary
directory, querying it, and then deleting those copies.
Differential Revision: https://phabricator.services.mozilla.com/D188874
This is needed for Ubuntu Linux when Firefox is installed as a Snap package.
Under those conditions, Firefox doesn't have the ability to read the contents
of the other browsers' data directories.
We work around by showing the user a native file picker and instructing them
to browse to that data directory in folder picker mode - doing so gives
the Firefox process access to the folder (through a temporary symlink).
Another restriction we must overcome is Sqlite's inability to read from
Sqlite databases through that symlinked folder. We work around this by
copying the databases we're importing from to the system temporary
directory, querying it, and then deleting those copies.
Differential Revision: https://phabricator.services.mozilla.com/D188874
Originally, we had had the extensions migration success link work by using a normal
anchor element with "about:addons" set as the href. This works on privileged pages like
about:preferences, but not for unprivileged pages like about:welcome - unprivileged
pages are generally unable to directly link to most about: pages.
The solution here is to continue to use an anchor element, but to use an event handler
on it rather than a "href" attribute, and have the MigrationWizardParent hear that
click event and take responsibility for opening about:addons.
As part of this, we're also intentionally choosing to open about:addons in a background
tab so that the user can continue to work through their onboard flow uninterrupted
should they click on the link while on about:welcome.
Differential Revision: https://phabricator.services.mozilla.com/D188116
This also fixes some incorrect inline documentation I found in some of our tests,
and fixes a case where we were showing the warning state for importing bookmarks
in browser_safari_passwords.js.
Differential Revision: https://phabricator.services.mozilla.com/D183506
In bug 1836555, we changed the progress update messages from MigrationWizardParent
from being a binary "in progress" and "not in progress" to a series of possible
values defined under MigrationWizardConstants.PROGRESS_VALUE.
We forgot to update the file migrators to use this, and they were still using
the old `inProgress` flag. This means that the migration occurred, but progress
updates weren't properly displayed.
We had a test for this, but the test was actually broken - it was querying for
the progress groups using a broken query selector. I've fixed the test, added
an additional check to ensure that the progress icons are in the completed
state, and confirmed that the test fails without the fix, and passes with it.
Differential Revision: https://phabricator.services.mozilla.com/D181783
Enables support for migrating extensions from Chrome once we have the
API to match and install extensions from the add-ons store.
Adds a new ProgressState object to delineate between various progress
states. This new object has four properties: value, message, linkURL,
and linkText. See migration-wizard-constants for more information.
MigrationWizard.#onShowingProgress uses the new ProgressState object
to handle the new LOADING, SUCCESS, ERROR and INFO values for progress.
This has the added benefit of updating the UI on error cases for the
existing resource groups.
Adds a new details object parameter to MigratorBase.migrate which is
currently used in the Chrome extensions import case.
See ChromeProfileMigrator.GetExtensionsResource for an example of
creating this details object.
See MigrationWizardParent.#doBrowserMigration for example usage of this
details object.
Adds support-text links under each resource type group in the markup.
This is currently used only by extensions in the partial matching and
no matching extensions cases.
Refactor MigrationUtils.installExtensionsWrapper to return an array
with the progress state (LOADING, SUCCESS, ERROR, INFO) and any
imported extensions.
Depends on D180005
Differential Revision: https://phabricator.services.mozilla.com/D180876
The spec calls for a special-case in the event that file migration
ever fails - the wizard should be sent back to the selection page,
have the associated file migrator still set in the dropdown, and
show an error message.
A later patch in this series will add such an error message for
the bookmarks file migrator.
Depends on D180458
Differential Revision: https://phabricator.services.mozilla.com/D180490
Those probes are:
* migration.uninstaller_profile_refresh (scalar)
* migration.discovered_migrators (keyed scalar)
* FX_MIGRATION_SOURCE_BROWSER (histogram)
* FX_MIGRATION_USAGE (histogram)
* FX_MIGRATION_ERRORS (histogram)
Not being ported are the following histograms:
* FX_STARTUP_MIGRATION_BROWSER_COUNT
* FX_STARTUP_MIGRATION_EXISTING_DEFAULT_BROWSER
* FX_STARTUP_MIGRATION_DATA_RECENCY
* FX_STARTUP_MIGRATION_USED_RECENT_BROWSER
as these are all expired.
Differential Revision: https://phabricator.services.mozilla.com/D180231
Safari doesn't let us import all passwords from Keychain at once. Instead,
the user needs to authorize each read from Keychain one by one. This is
not tenable for password import.
Instead, we show the user instructions on how they can export their passwords
from Safari into a CSV file that can then be imported. This patch adds support
for showing those instructions (which had landed earlier in bug 1818789) and
then importing from that CSV file upon selection.
The data-review for the safari_password_file Telemetry event being used here
was done earlier in bug 1824786.
Differential Revision: https://phabricator.services.mozilla.com/D175669
Safari doesn't let us import all passwords from Keychain at once. Instead,
the user needs to authorize each read from Keychain one by one. This is
not tenable for password import.
Instead, we show the user instructions on how they can export their passwords
from Safari into a CSV file that can then be imported. This patch adds support
for showing those instructions (which had landed earlier in bug 1818789) and
then importing from that CSV file upon selection.
The data-review for the safari_password_file Telemetry event being used here
was done earlier in bug 1824786.
Differential Revision: https://phabricator.services.mozilla.com/D175669
We weren't passing the appropriate profile object to getMigrateData, and thanks to mocking,
we didn't catch this in automated testing.
This patch fixes the issue, and updates our mocking helpers to ensure that the expected
profile object gets passed to the `getResources` calls during mochitest-browser tests.
Differential Revision: https://phabricator.services.mozilla.com/D175144
Additionally check for the new content modal and standalone version for WAIT_FOR_MIGRATION_CLOSE by using observer notifications from preferences dialog close, new wizard actor, old wizard uninit.
Differential Revision: https://phabricator.services.mozilla.com/D174692
This also adds some belt-and-suspenders checks here so that even if the Migration Wizard
somehow gets confused and sends resource types that the migrator can't import from, they'll
just get ignored rather than having a forever-progress-spinner for that resource type.
Differential Revision: https://phabricator.services.mozilla.com/D173848