android-components / mozilla.components.support.migration / FennecMigrator / Builder

Builder

class Builder (source)

Data migration builder. Allows configuring which migrations to run, their versions and relative order.

Constructors

Name Summary
<init> Builder(context: <ERROR CLASS>, crashReporter: CrashReporting)
Data migration builder. Allows configuring which migrations to run, their versions and relative order.

Functions

Name Summary
build fun build(): FennecMigrator
Constructs a FennecMigrator based on the current configuration.
migrateAddons fun migrateAddons(engine: Engine, addonCollectionProvider: AddonCollectionProvider, addonUpdater: AddonUpdater, version: Int = Migration.Addons.currentVersion): Builder
Enables Add-on migration.
migrateBookmarks fun migrateBookmarks(storage: Lazy<PlacesBookmarksStorage>, topSiteStorage: TopSiteStorage? = null, version: Int = Migration.Bookmarks.currentVersion): Builder
Enable bookmarks migration. Must be called after migrateHistory. Optionally, enable top sites migration, if topSiteStorage is specified. In Fennec, pinned sites are stored as special type of a bookmark, hence this coupling.
migrateFxa fun migrateFxa(accountManager: Lazy<FxaAccountManager>, version: Int = Migration.FxA.currentVersion): Builder
Enable FxA state migration.
migrateGecko fun migrateGecko(version: Int = Migration.Gecko.currentVersion): Builder
Enables the migration of Gecko internal files.
migrateHistory fun migrateHistory(storage: Lazy<PlacesHistoryStorage>, version: Int = Migration.History.currentVersion): Builder
Enable history migration.
migrateLogins fun migrateLogins(storage: Lazy<SyncableLoginsStorage>, version: Int = Migration.Logins.currentVersion): Builder
Enable logins migration.
migrateOpenTabs fun migrateOpenTabs(sessionManager: SessionManager, version: Int = Migration.OpenTabs.currentVersion): Builder
Enable open tabs migration.
migrateSearchEngine fun migrateSearchEngine(searchEngineManager: SearchEngineManager, version: Int = Migration.SearchEngine.currentVersion): Builder
Enable default search engine migration.
migrateSettings fun migrateSettings(version: Int = Migration.Settings.currentVersion): Builder
Enable all Fennec - Fenix common settings migration.
migrateTelemetryIdentifiers fun migrateTelemetryIdentifiers(version: Int = Migration.TelemetryIdentifiers.currentVersion): Builder
Enable migration of Fennec telemetry identifiers.