Name Description Size
ASRouter.jsm 68740
ASRouterFeed.jsm @class ASRouterFeed - Connects ASRouter singleton (see above) to Activity Stream's store so that it can use the RemotePageManager. 1222
ASRouterPreferences.jsm 6624
ASRouterTargeting.jsm CachedTargetingGetter @param property {string} Name of the method called on ActivityStreamProvider @param options {{}?} Options object passsed to ActivityStreamProvider method @param updateInterval {number?} Update interval for query. Defaults to FRECENT_SITES_UPDATE_INTERVAL 23631
ASRouterTriggerListeners.jsm Check current location against the list of allowed hosts Additionally verify for redirects and check original request URL against the list. @returns {object} - {host, url} pair that matched the list of allowed hosts 17828
AboutPreferences.jsm Render preferences to an about:preferences content window with the provided preferences structure. 8867
ActivityStream.jsm 23622
ActivityStreamMessageChannel.jsm ActivityStreamMessageChannel - This module connects a Redux store to a RemotePageManager in Firefox. Call .createChannel to start the connection, and .destroyChannel to destroy it. You should use the BroadcastToContent, AlsoToOneContent, and AlsoToMain action creators in common/Actions.jsm to help you create actions that will be automatically routed to the correct location. @param {object} options @param {function} options.dispatch The dispatch method from a Redux store @param {string} options.pageURL The URL to which a RemotePageManager should be attached. Note that if it is about:newtab, the existing RemotePageManager for about:newtab will also be disabled @param {string} options.outgoingMessageName The name of the message sent to child processes @param {string} options.incomingMessageName The name of the message received from child processes @return {ActivityStreamMessageChannel} 11320
ActivityStreamPrefs.jsm Prefs - A wrapper around Preferences that always sets the branch to ACTIVITY_STREAM_PREF_BRANCH 3065
ActivityStreamStorage.jsm @param storeNames Array of strings used to create all the required stores 3307
BookmarkPanelHub.jsm @param {function} handleMessageRequest @param {function} addImpression @param {function} dispatch - Used for sending user telemetry information 10800
CFRMessageProvider.jsm 32460
CFRPageActions.jsm A WeakMap from browsers to {host, recommendation} pairs. Recommendations are defined in the ExtensionDoorhanger.schema.json. A recommendation is specific to a browser and host and is active until the given browser is closed or the user navigates (within that browser) away from the host. 39235
DefaultSites.jsm 1980
DiscoveryStreamFeed.jsm Send SPOCS Fill telemetry. @param {object} filteredItems An object keyed on filter reasons, and the value is a list of SPOCS. reasons: blocked_by_user, frequency_cap, below_min_score, flight_duplicate @param {boolean} fullRecalc A boolean indicating if it's a full recalculation. Calling `loadSpocs` will be treated as a full recalculation. Whereas responding the action "DISCOVERY_STREAM_SPOC_IMPRESSION" is not a full recalculation. 64023
DownloadsManager.jsm null for non-private downloads 5901
FaviconFeed.jsm Get favicon info (uri and size) for a uri from Places. @param uri {nsIURI} Page to check for favicon data @returns A promise of an object (possibly null) containing the data 5965
FilterAdult.jsm Run some text through md5 and return the base64 result. 89175
HighlightsFeed.jsm isStartup 11446
LinksCache.jsm Cache link results from a provided object property and refresh after some amount of time has passed. Allows for migrating data from previously cached links to the new links with the same url. 4801
MomentsPageHub.jsm If we don't have `expire` defined with the message it could be because it depends on user dependent parameters. Since the message matched targeting we calculate `expire` based on the current timestamp and the `expireDelta` which defines for how long it should be available. @param expireDelta {number} - Offset in milliseconds from the current date 5257
NewTabInit.jsm NewTabInit - A placeholder for now. This will send a copy of the state to all newly opened tabs. 1718
OnboardingMessageProvider.jsm globals Localization 12084
PanelTestProvider.jsm 17412
PersistentCache.jsm A file (disk) based persistent cache of a JSON serializable object. 2801
PersonalityProvider 7
PlacesFeed.jsm Observer - a wrapper around history/bookmark observers to add the QueryInterface. 16353
PrefsFeed.jsm 5618
RecommendationProviderSwitcher.jsm setAffinityProvider - This function switches between setting up a v1 or v2 personalization provider. It checks for certain configuration on affinityProviderV2, which is setup in setAffinityProviderVersion. In the case of v1, it returns a UserDomainAffinityProvider, in the case of v2, it reutrns a PersonalityProvider. We need to do this swap because v2 is still being tested, so by default v1 should be enabled. This is why the function params are the same, as v2 has been written to accept a similar pattern. @param {Array} timeSegments Changes the weight of a score based on how recent it is. @param {Object} parameterSets Provides factors for weighting which allows for flexible targeting. The functionality to calculate final scores can be seen in UserDomainAffinityProvider#calculateScores @param {Number} maxHistoryQueryResults How far back in the history do we go. @param {Number} version What version of the provider does this use. Note, this is NOT the same as personalization v1/v2, this could be used to change between a configuration or value in the provider, not to enable/disable a whole new provider. @param {Object} scores This is used to re hydrate the provider based on cached results. @returns {Object} A provider, either a PersonalityProvider or UserDomainAffinityProvider. 7791
RemoteL10n.jsm The downloaded Fluent file is located in this sub-directory of the local profile directory. 3855
Screenshots.jsm Get a screenshot / thumbnail for a url. Either returns the disk cached image or initiates a background request for the url. @param url {string} The url to get a thumbnail @return {Promise} Resolves a custom object or null if failed 4987
SearchShortcuts.jsm 3006
SectionsManager.jsm Generators for built in sections, keyed by the pref name for their feed. Built in sections may depend on options stored as serialised JSON in the pref `${feed_pref_name}.options`. 19794
ShortURL.jsm Properly convert internationalized domain names. @param {string} host Domain hostname. @returns {string} Hostname suitable to be displayed. 2347
SiteClassifier.jsm classifySite Classifies a given URL into a category based on classification data from RemoteSettings. The data from remote settings can match a category by one of the following: - match the exact URL - match the hostname or second level domain (sld) - match query parameter(s), and optionally their values or prefixes - match both (hostname or sld) and query parameter(s) The data looks like: [{ "type": "hostname-and-params-match", "criteria": [ { "url": "https://matchurl.com", "hostname": "matchhostname.com", "sld": "secondleveldomain", "params": [ { "key": "matchparam", "value": "matchvalue", "prefix": "matchpPrefix", }, ], }, ], "weight": 300, },...] 2977
SnippetsTestMessageProvider.jsm 27174
Store.jsm Store - This has a similar structure to a redux store, but includes some extra functionality to allow for routing of actions between the Main processes and child processes via a ActivityStreamMessageChannel. It also accepts an array of "Feeds" on inititalization, which can listen for any action that is dispatched through the store. 6324
SystemTickFeed.jsm 1118
TelemetryFeed.jsm 35496
TippyTopProvider.jsm Get a domain from a url optionally stripping subdomains. 2185
ToolbarBadgeHub.jsm 10163
ToolbarPanelHub.jsm 19886
TopSitesFeed.jsm 36693
TopStoriesFeed.jsm isStartup 31352
UTEventReporting.jsm Note: the schema can be found in https://searchfox.org/mozilla-central/source/toolkit/components/telemetry/Events.yaml 1819
UserDomainAffinityProvider.jsm Provides functionality to personalize content recommendations by calculating user domain affinity scores. These scores are used to calculate relevance scores for items/recs/stories that have domain affinities. The algorithm works as follows: - The recommendation endpoint returns a settings object containing timeSegments and parametersets. - For every time segment we calculate the corresponding domain visit counts, yielding result objects of the following structure: {"mozilla.org": 12, "mozilla.com": 34} (see UserDomainAffinityProvider#queryVisits) - These visit counts are transformed to domain affinity scores for all provided parameter sets: {"mozilla.org": {"paramSet1": 0.8, "paramSet2": 0.9}, "mozilla.org": {"paramSet1": 1, "paramSet2": 0.9}} (see UserDomainAffinityProvider#calculateScoresForParameterSets) - The parameter sets provide factors for weighting which allows for flexible targeting. The functionality to calculate final scores can be seen in UserDomainAffinityProvider#calculateScores - The user domain affinity scores are summed up across all time segments see UserDomainAffinityProvider#calculateAllUserDomainAffinityScores - An item's domain affinities are matched to the user's domain affinity scores by calculating an item relevance score (see UserDomainAffinityProvider#calculateItemRelevanceScore) - The item relevance scores are used to sort items (see TopStoriesFeed for more details) - The data structure was chosen to allow for fast cache lookups during relevance score calculation. While user domain affinities are calculated infrequently (i.e. only once a day), the item relevance score (potentially) needs to be calculated every time the feed updates. Therefore allowing cache lookups of scores[domain][parameterSet] is beneficial 13606
cache-worker.js eslint-env mozilla/chrome-worker 4707