android-components / mozilla.components.browser.storage.memory / InMemoryHistoryStorage

InMemoryHistoryStorage

class InMemoryHistoryStorage : HistoryStorage (source)

An in-memory implementation of mozilla.components.concept.storage.HistoryStorage.

Constructors

<init>

InMemoryHistoryStorage()

An in-memory implementation of mozilla.components.concept.storage.HistoryStorage.

Functions

cleanup

fun cleanup(): Unit

Cleanup any allocated resources.

getAutocompleteSuggestion

fun getAutocompleteSuggestion(query: String): HistoryAutocompleteResult?

Retrieves domain suggestions which best match the query.

getSuggestions

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

Retrieves suggestions matching the query.

getVisited

fun getVisited(uris: List<String>): Deferred<List<Boolean>>

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

fun getVisited(): Deferred<List<String>>

Retrieves a list of all visited pages.

recordObservation

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

Records an observation about a page.

recordVisit

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

Records a visit to a page.