android-components / mozilla.components.service.sync.logins / GeckoLoginStorageDelegate


class GeckoLoginStorageDelegate : LoginStorageDelegate (source)

LoginStorageDelegate implementation.

An abstraction that handles the persistence and retrieval of LoginEntrys so that Gecko doesn’t have to.

In order to use this class, attach it to the active GeckoRuntime as its loginStorageDelegate. It is not designed to work with other engines.

This class is part of a complex flow integrating Gecko and Application Services code, which is described here:


Name Summary
<init> GeckoLoginStorageDelegate(loginStorage: Lazy<LoginsStorage>, scope: CoroutineScope = CoroutineScope(Dispatchers.IO))
LoginStorageDelegate implementation.


Name Summary
onLoginFetch fun onLoginFetch(domain: String): Deferred<List<Login>>
Given a domain, returns a GeckoResult of the matching LoginEntrys found in loginStorage.
onLoginSave fun onLoginSave(login: Login): Unit
Called when a login should be saved or updated.
onLoginUsed fun onLoginUsed(login: Login): Unit
Called after a login has been autofilled into web content.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.