@AnyThread public static class ContentBlocking.Settings.Builder extends RuntimeSettings.Builder<ContentBlocking.Settings>
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
ContentBlocking.Settings.Builder |
antiTracking(int cat)
Set anti-tracking categories.
|
ContentBlocking.Settings.Builder |
cookieBehavior(int behavior)
Set cookie storage behavior.
|
ContentBlocking.Settings.Builder |
cookieLifetime(int lifetime)
Set the cookie lifetime.
|
ContentBlocking.Settings.Builder |
cookiePurging(boolean enabled)
Set whether or not to automatically purge tracking cookies.
|
ContentBlocking.Settings.Builder |
enhancedTrackingProtectionLevel(int level)
Set the ETP behavior level.
|
protected ContentBlocking.Settings |
newSettings(ContentBlocking.Settings settings)
Create a default or copy settings object.
|
ContentBlocking.Settings.Builder |
safeBrowsing(int cat)
Set safe browsing categories.
|
ContentBlocking.Settings.Builder |
safeBrowsingMalwareTable(String[] safeBrowsingMalwareTable)
Set the safe browsing table for malware threats.
|
ContentBlocking.Settings.Builder |
safeBrowsingPhishingTable(String[] safeBrowsingPhishingTable)
Set the safe browsing table for phishing threats.
|
ContentBlocking.Settings.Builder |
safeBrowsingProviders(ContentBlocking.SafeBrowsingProvider... providers)
Set custom safe browsing providers.
|
ContentBlocking.Settings.Builder |
strictSocialTrackingProtection(boolean enabled)
Set whether or not strict social tracking protection is enabled.
|
build, getSettings
@NonNull protected ContentBlocking.Settings newSettings(@Nullable ContentBlocking.Settings settings)
RuntimeSettings.Builder
newSettings
in class RuntimeSettings.Builder<ContentBlocking.Settings>
settings
- Settings object to copy, null for default settings.@NonNull public ContentBlocking.Settings.Builder safeBrowsingProviders(@NonNull ContentBlocking.SafeBrowsingProvider... providers)
providers
- one or more custom providers.ContentBlocking.SafeBrowsingProvider
@NonNull public ContentBlocking.Settings.Builder safeBrowsingPhishingTable(@NonNull String[] safeBrowsingPhishingTable)
safeBrowsingPhishingTable
- one or more lists for safe browsing phishing.ContentBlocking.SafeBrowsingProvider
@NonNull public ContentBlocking.Settings.Builder safeBrowsingMalwareTable(@NonNull String[] safeBrowsingMalwareTable)
safeBrowsingMalwareTable
- one or more lists for safe browsing malware.ContentBlocking.SafeBrowsingProvider
@NonNull public ContentBlocking.Settings.Builder antiTracking(int cat)
cat
- The categories of resources that should be blocked.
Use one or more of the
ContentBlocking.AntiTracking
flags.@NonNull public ContentBlocking.Settings.Builder safeBrowsing(int cat)
cat
- The categories of resources that should be blocked.
Use one or more of the
ContentBlocking.SafeBrowsing
flags.@NonNull public ContentBlocking.Settings.Builder cookieBehavior(int behavior)
behavior
- The storage behavior that should be applied.
Use one of the ContentBlocking.CookieBehavior
flags.@NonNull public ContentBlocking.Settings.Builder cookieLifetime(int lifetime)
lifetime
- The enforced cookie lifetime.
Use one of the ContentBlocking.CookieLifetime
flags.@NonNull public ContentBlocking.Settings.Builder enhancedTrackingProtectionLevel(int level)
level
- The level of ETP blocking to use. Only takes effect if
cookie behavior is set to ContentBlocking.CookieBehavior.ACCEPT_NON_TRACKERS
or ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS
.@NonNull public ContentBlocking.Settings.Builder strictSocialTrackingProtection(boolean enabled)
enabled
- A boolean indicating whether or not strict social tracking protection
should be enabled.@NonNull public ContentBlocking.Settings.Builder cookiePurging(boolean enabled)
ContentBlocking.CookieBehavior.ACCEPT_NON_TRACKERS
or ContentBlocking.CookieBehavior.ACCEPT_FIRST_PARTY_AND_ISOLATE_OTHERS
.enabled
- A boolean indicating whether or not cookie purging should be enabled.