зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1634386 - The Password Import Autocomplete suggestion is displayed on Linux r=MattN
Share ChromeMigrationUtils.supportsLoginsForPlatform for ChromeProfileMigrator.getResources and ChromeMigrationUtils.getImportableLogins. Differential Revision: https://phabricator.services.mozilla.com/D87639
This commit is contained in:
Родитель
0ec64c5610
Коммит
b666b9283a
|
@ -37,6 +37,10 @@ var ChromeMigrationUtils = {
|
|||
// }
|
||||
_extensionLocaleStrings: {},
|
||||
|
||||
get supportsLoginsForPlatform() {
|
||||
return ["macosx", "win"].includes(AppConstants.platform);
|
||||
},
|
||||
|
||||
/**
|
||||
* Get all extensions installed in a specific profile.
|
||||
* @param {String} profileId - A Chrome user profile ID. For example, "Profile 1".
|
||||
|
@ -369,6 +373,11 @@ var ChromeMigrationUtils = {
|
|||
*/
|
||||
_importableLoginsCache: null,
|
||||
async getImportableLogins(formOrigin) {
|
||||
// Only provide importable if we actually support importing.
|
||||
if (!this.supportsLoginsForPlatform) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
// Lazily fill the cache with all importable login browsers.
|
||||
if (!this._importableLoginsCache) {
|
||||
this._importableLoginsCache = new Map();
|
||||
|
|
|
@ -120,7 +120,7 @@ ChromeProfileMigrator.prototype.getResources = async function Chrome_getResource
|
|||
GetHistoryResource(profileFolder),
|
||||
GetCookiesResource(profileFolder),
|
||||
];
|
||||
if (AppConstants.platform == "win" || AppConstants.platform == "macosx") {
|
||||
if (ChromeMigrationUtils.supportsLoginsForPlatform) {
|
||||
possibleResourcePromises.push(
|
||||
this._GetPasswordsResource(profileFolder)
|
||||
);
|
||||
|
|
Загрузка…
Ссылка в новой задаче