Package org.mozilla.geckoview
Class ContentBlocking.SafeBrowsingProvider.Builder
Object
org.mozilla.geckoview.ContentBlocking.SafeBrowsingProvider.Builder
- Enclosing class:
- ContentBlocking.SafeBrowsingProvider
-
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.SafeBrowsingProvider
based on thisContentBlocking.SafeBrowsingProvider.Builder
instance.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)
.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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
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.Builder
instance.
-
dataSharingEnabled
@NonNull public ContentBlocking.SafeBrowsingProvider.Builder dataSharingEnabled(boolean dataSharingEnabled) Set whether to share threat data with the provider, off by default.- Parameters:
dataSharingEnabled
-true
if the browser should share threat data with the provider.- Returns:
- this
ContentBlocking.SafeBrowsingProvider.Builder
instance.
-
build
Build theContentBlocking.SafeBrowsingProvider
based on thisContentBlocking.SafeBrowsingProvider.Builder
instance.- Returns:
- thie
ContentBlocking.SafeBrowsingProvider
instance.
-