android-components / mozilla.components.concept.engine.content.blocking / TrackingProtectionExceptionStorage


interface TrackingProtectionExceptionStorage (source)

A contract that define how a tracking protection storage must behave.


Name Summary
add abstract fun add(session: EngineSession): Unit
Adds a new session to the exception list.
contains abstract fun contains(session: EngineSession, onResult: (Boolean) -> Unit): Unit
Indicates if a given session is in the exception list.
fetchAll abstract fun fetchAll(onResult: (List<TrackingProtectionException>) -> Unit): Unit
Fetch all domains that will be ignored for tracking protection.
remove abstract fun remove(session: EngineSession): Unit
Removes a session from the exception list.abstract fun remove(exception: TrackingProtectionException): Unit
Removes a exception from the exception list.
removeAll abstract fun removeAll(): Unit
Removes all domains from the exception list.
restore abstract fun restore(): Unit
Restore all domains stored in the storage.

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.