tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

head-common.js (797B)


      1 /* Any copyright is dedicated to the Public Domain.
      2   http://creativecommons.org/publicdomain/zero/1.0/ */
      3 
      4 "use strict";
      5 
      6 const { MigrationWizardConstants } = ChromeUtils.importESModule(
      7  "chrome://browser/content/migration/migration-wizard-constants.mjs"
      8 );
      9 
     10 /**
     11 * Returns the constant strings from MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES
     12 * that aren't also part of MigrationWizardConstants.PROFILE_RESET_ONLY_RESOURCE_TYPES.
     13 *
     14 * This is the set of resources that the user can actually choose to migrate via
     15 * checkboxes.
     16 *
     17 * @returns {string[]}
     18 */
     19 function getChoosableResourceTypes() {
     20  return Object.keys(MigrationWizardConstants.DISPLAYED_RESOURCE_TYPES).filter(
     21    resourceType =>
     22      !MigrationWizardConstants.PROFILE_RESET_ONLY_RESOURCE_TYPES[resourceType]
     23  );
     24 }