Files
mcarare c043f6bb6b Bug 1990613 - AC: Refactor multiple components to replace GlobalScope and coroutineContext with an explicit, application-provided CoroutineScope. r=android-reviewers,pollymce
Key changes:
- Refactored `TabIntentProcessor`, `RegionMiddleware`, `FileUploadsDirCleaner`, `AbstractAutofillService`, `GeckoAutocompleteStorageDelegate`, and `AutoSave` to accept a `CoroutineScope` (typically named `applicationScope`) in their constructors.
- Replaced `GlobalScope.launch` and `GlobalScope.async` with operations on the provided internal scopes to ensure structured concurrency and better lifecycle management.
- Updated `BundledSearchEnginesStorage` to use `coroutineScope` and `async` for loading search engines, removing the dependency on an external `coroutineContext`.
- Refactored `FxaPushSupportFeature` and its internal observers (`AccountObserver`, `ConstellationObserver`, `AutoPushObserver`) to utilize a centralized `applicationScope` instead of mixing global and UI contexts.
- Updated Fenix and sample browser `AutofillService` implementations to provide the `applicationScope` from the main components container.
- Updated associated unit tests to pass the appropriate test scope or `runTest` scope to the refactored classes.
- Removed several `@OptIn(DelicateCoroutinesApi::class)` annotations previously required for `GlobalScope` usage.

Differential Revision: https://phabricator.services.mozilla.com/D297659
2026-08-31 11:54:33 +00:00
..

Android Components > Browser > Session-Storage

This component offers mechanisms for saving and restoring a browsing session.

Usage

Setting up the dependency

Use Gradle to download the library from maven.mozilla.org (Setup repository):

implementation "org.mozilla.components:browser-session-storage:{latest-version}"

License

This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/