Name Description Size
assets
BackgroundTask_defaultagent.sys.mjs -*- js-indent-level: 2; indent-tabs-mode: nil -*- 16519
Cache.cpp = nullptr 21063
Cache.h This cache functions as a FIFO queue which writes its data to the Windows registry. Note that the cache is not thread-safe, so it is recommended that the WDBA's RegistryMutex be acquired before accessing it. Some of the terminology used in this module is a easy to mix up, so let's just be clear about it: - registry key/sub-key A registry key is sort of like the registry's equivalent of a directory. It can contain values, each of which is made up of a name and corresponding data. We may also refer to a "sub-key", meaning a registry key nested in a registry key. - cache key/entry key A cache key refers to the string that we use to look up a single element of cache entry data. Example: "CacheEntryVersion" - entry This refers to an entire record stored using Cache::Enqueue or retrieved using Cache::Dequeue. It consists of numerous cache keys and their corresponding data. The first version of this cache was problematic because of how hard it was to extend. This version attempts to overcome this. It first migrates all data out of the version 1 cache. This means that the stored ping data will not be accessible to out-of-date clients, but presumably they will eventually be updated or the up-to-date client that performed the migration will send the pings itself. Because the WDBA telemetry has no client ID, all analysis is stateless, so even if the other clients send some pings before the stored ones get sent, that's ok. The ordering isn't really important. This version of the cache attempts to correct the problem of how hard it was to extend the old cache. The biggest problem that the old cache had was that when it dequeued data it had to shift data, but it wouldn't shift keys that it didn't know about, causing them to become associated with the wrong cache entries. Version 2 of the cache will make 4 improvements to attempt to avoid problems like this in the future: 1. Each cache entry will get its own registry key. This will help to keep cache entries isolated from each other. 2. Each cache entry will include version data so that we know what cache keys to expect when we read it. 3. Rather than having to shift every entry every time we dequeue, we will implement a circular queue so that we just have to update what index currently represents the front 4. We will store the cache capacity in the cache so that we can expand the cache later, if we want, without breaking previous versions. 8946
common.cpp = 0 2864
common.h 1102
components.conf 894
DefaultAgent.cpp 16348
DefaultAgent.h 874
DefaultBrowser.cpp 8610
DefaultBrowser.h 1195
DefaultPDF.cpp 5078
DefaultPDF.h 1156
docs
EventLog.cpp 514
EventLog.h 827
jar.mn 296
metrics.yaml 7629
module.ver 69
moz.build 2080
Notification.cpp 4181
Notification.h 1835
nsIDefaultAgent.idl Create a Windows scheduled task that will launch this binary with the do-task command every 24 hours, starting from 24 hours after register-task is run. @param {AString} aUniqueToken A unique identifier for this installation; typically the install path hash that's used for the update directory, the AppUserModelID, and other related purposes. 6190
nsIWindowsMutex.idl Interact with Windows named mutexes. Generally you don't want a Windows named mutex, you want one of the many Gecko locking primitives. But when you do want cross-application instance or even cross-installation coordination, a Windows named mutex might be an appropriate tool. 1870
pings.yaml 2109
Policy.cpp 5944
Policy.h 590
proxy
Registry.cpp = nullptr 11794
Registry.h 4644
ScheduledTask.cpp = nullptr 12416
ScheduledTask.h 906
ScheduledTaskRemove.cpp flags 3842
ScheduledTaskRemove.h 1197
SetDefaultBrowser.cpp The implementation for setting extension handlers by writing UserChoice. This is used by both SetDefaultBrowserUserChoice and SetDefaultExtensionHandlersUserChoice. @param aAumi The AUMI of the installation to set as default. @param aSid Current user's string SID @param aRegRename True if we should rename registry keys to prevent interference from kernel drivers attempting to lock subkeys. @param aExtraFileExtensions Optional array of extra file association pairs to set as default, like `[ ".pdf", "FirefoxPDF" ]`. @returns NS_OK All associations set and checked successfully. NS_ERROR_WDBA_REJECTED UserChoice was set, but checking the default did not return our ProgID. NS_ERROR_FAILURE Failed to set at least one association. 29402
SetDefaultBrowser.h Set the default browser by writing the UserChoice registry keys. This sets the associations for https, http, .html, and .htm, and optionally for additional extra file extensions. When the agent is run with set-default-browser-user-choice, the exit code is the result of this function. @param aAumi The AUMI of the installation to set as default. @param aRegRename True if we should rename registry keys to prevent interference from kernel drivers attempting to lock subkeys. @param aExtraFileExtensions Optional array of extra file association pairs to set as default, like `[ ".pdf", "FirefoxPDF" ]`. @return NS_OK All associations set and checked successfully. NS_ERROR_WDBA_NO_PROGID The ProgID classes had not been registered. NS_ERROR_WDBA_HASH_CHECK The existing UserChoice Hash could not be verified. NS_ERROR_WDBA_REJECTED UserChoice was set, but checking the default did not return our ProgID. NS_ERROR_WDBA_BUILD The existing UserChoice Hash was verified, but we're on an older, unsupported Windows build, so do not attempt to update the UserChoice hash. NS_ERROR_FAILURE other failure 3146
Telemetry.cpp 23755
Telemetry.h 901
tests
UtfConvert.cpp 1964
UtfConvert.h 841
WindowsMutex.cpp 3310
WindowsMutex.h 1136