Package org.mozilla.geckoview
Class ContentBlocking.SafeBrowsingProvider.Builder
Object
org.mozilla.geckoview.ContentBlocking.SafeBrowsingProvider.Builder
- Enclosing class:
- ContentBlocking.SafeBrowsingProvider
Builder for constructing SafeBrowsingProvider instances.
-
Method Summary
Modifier and TypeMethodDescriptionadvisoryName(String advisoryName) Set the advisory name for this provider.advisoryUrl(String advisoryUrl) Set the url that will be used to give a general advisory about this SafeBrowsing provider.build()Build theContentBlocking.SafeBrowsingProviderbased on thisContentBlocking.SafeBrowsingProvider.Builderinstance.dataSharingEnabled(boolean dataSharingEnabled) Set whether to share threat data with the provider, off by default.dataSharingUrl(String dataSharingUrl) Set url to share threat data to the provider, if enabled bydataSharingEnabled(boolean).enabled(boolean enabled) Set whether to enable this provider.getHashUrl(String getHashUrl) Sets the url that will be used to get the full hashes that match a partial hash.Sets the lists provided by this provider.reportMalwareMistakeUrl(String reportMalwareMistakeUrl) Set the url that will be used to report a url mistakenly reported as Malware to the SafeBrowsing provider.reportPhishingMistakeUrl(String reportPhishingMistakeUrl) Set the url that will be used to report a url mistakenly reported as Phishing to the SafeBrowsing provider.Set the url that will be used to report a url to the SafeBrowsing provider.Sets the url that will be used to update the threat list for this provider.Sets the SafeBrowsing protocol session for this provider.
-
Method Details
-
version
Sets the SafeBrowsing protocol session for this provider.- Parameters:
version- the version strong, e.g. "2.2" or "4".- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
lists
Sets the lists provided by this provider.- Parameters:
lists- one or more lists for this provider, e.g. "goog-malware-proto", "goog-unwanted-proto"- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
updateUrl
Sets the url that will be used to update the threat list for this provider.See also v4/threadListUpdates/fetch .
- Parameters:
updateUrl- the update url endpoint for this provider- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
getHashUrl
Sets the url that will be used to get the full hashes that match a partial hash.See also v4/fullHashes/find .
- Parameters:
getHashUrl- the gethash url endpoint for this provider- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
reportUrl
Set the url that will be used to report a url to the SafeBrowsing provider.- Parameters:
reportUrl- the url endpoint to report a url to this provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
reportPhishingMistakeUrl
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder reportPhishingMistakeUrl(@NonNull String reportPhishingMistakeUrl) Set the url that will be used to report a url mistakenly reported as Phishing to the SafeBrowsing provider.- Parameters:
reportPhishingMistakeUrl- the url endpoint to report a url to this provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
reportMalwareMistakeUrl
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder reportMalwareMistakeUrl(@NonNull String reportMalwareMistakeUrl) Set the url that will be used to report a url mistakenly reported as Malware to the SafeBrowsing provider.- Parameters:
reportMalwareMistakeUrl- the url endpoint to report a url to this provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
advisoryUrl
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder advisoryUrl(@NonNull String advisoryUrl) Set the url that will be used to give a general advisory about this SafeBrowsing provider.- Parameters:
advisoryUrl- the adivisory page url for this provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
advisoryName
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder advisoryName(@NonNull String advisoryName) Set the advisory name for this provider.- Parameters:
advisoryName- the adivisory name for this provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
dataSharingUrl
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder dataSharingUrl(@NonNull String dataSharingUrl) Set url to share threat data to the provider, if enabled bydataSharingEnabled(boolean).- Parameters:
dataSharingUrl- the url endpoint- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
dataSharingEnabled
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder dataSharingEnabled(boolean dataSharingEnabled) Set whether to share threat data with the provider, off by default.- Parameters:
dataSharingEnabled-trueif the browser should share threat data with the provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
enabled
Set whether to enable this provider. This is currently only used for the SafeBrowsing V5.- Parameters:
enabled-trueif the provider should be enabled.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builderinstance.
-
build
Build theContentBlocking.SafeBrowsingProviderbased on thisContentBlocking.SafeBrowsingProvider.Builderinstance.- Returns:
- thie
ContentBlocking.SafeBrowsingProviderinstance.
-