android-components / mozilla.components.browser.storage.sync / PlacesHistoryStorage

PlacesHistoryStorage

open class PlacesHistoryStorage : HistoryStorage, SyncableStore<SyncAuthInfo> (source)

Implementation of the HistoryStorage which is backed by a Rust Places lib via PlacesConnection.

Constructors

<init>

PlacesHistoryStorage(context: Context)

Implementation of the HistoryStorage which is backed by a Rust Places lib via PlacesConnection.

Functions

cleanup

open fun cleanup(): Unit

Cleanup any allocated resources.

getAutocompleteSuggestion

open fun getAutocompleteSuggestion(query: String): HistoryAutocompleteResult?

Retrieves domain suggestions which best match the query.

getSuggestions

open fun getSuggestions(query: String, limit: Int): List<SearchResult>

Retrieves suggestions matching the query.

getVisited

open suspend fun getVisited(uris: List<String>): List<Boolean>

Maps a list of page URIs to a list of booleans indicating if each URI was visited.

open suspend fun getVisited(): List<String>

Retrieves a list of all visited pages.

recordObservation

open suspend fun recordObservation(uri: String, observation: PageObservation): Unit

Records an observation about a page.

recordVisit

open suspend fun recordVisit(uri: String, visitType: VisitType): Unit

Records a visit to a page.

sync

open suspend fun sync(authInfo: SyncAuthInfo): SyncStatus

Performs a sync.