diff options
author | Nate Fischer <ntfschr@chromium.org> | 2020-07-29 19:53:54 +0000 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2020-07-29 12:57:05 -0700 |
commit | 021571f9ab2fb3cf7c162fa43f2a6329dcda89b4 (patch) | |
tree | 0b80a36c9904eb1df7508ba11a729cf9fcf54d0c /src/org | |
parent | 5ba8309aa4e80f842de8dd3a71e1d48e01fc4784 (diff) | |
download | webview_support_interfaces-021571f9ab2fb3cf7c162fa43f2a6329dcda89b4.tar.gz |
Code inclusion: add setSafeBrowsingAllowlist boundary interfaceandroidx-print-release
This adds setSafeBrowsingAllowlist (behind the DEV_SUFFIX) and
deprecates the setSafeBrowsingWhitelist boundary interface. These are
functionally similar, although setSafeBrowsingAllowlist accepts a
Set<String> since this is a more appropriate data type.
This adds an UMA counter for the new API and adds missing enum labels
for other APIs.
This CL also renames a couple references to the old API to be
SET_SAFE_BROWSING_ALLOWLIST_DEPRECATED_NAME instead, to minimize
non-inclusive terminology.
Fixed: 1108667
Test: N/A
Change-Id: I49ef11e4346e631e14b822943abb6482837d60a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2321523
Auto-Submit: Nate Fischer <ntfschr@chromium.org>
Commit-Queue: Laís Minchillo <laisminchillo@chromium.org>
Reviewed-by: Laís Minchillo <laisminchillo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#792830}
GitOrigin-RevId: 58274f4e7182ab76f09f247a55846fc2bf5f8b3f
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java | 2 | ||||
-rw-r--r-- | src/org/chromium/support_lib_boundary/util/Features.java | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java index 648d416..c2d3864 100644 --- a/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java +++ b/src/org/chromium/support_lib_boundary/StaticsBoundaryInterface.java @@ -9,12 +9,14 @@ import android.net.Uri; import android.webkit.ValueCallback; import java.util.List; +import java.util.Set; /** * Boundary interface for WebViewFactoryProvider.Statics. */ public interface StaticsBoundaryInterface { void initSafeBrowsing(Context context, ValueCallback<Boolean> callback); + void setSafeBrowsingAllowlist(Set<String> hosts, ValueCallback<Boolean> callback); void setSafeBrowsingWhitelist(List<String> hosts, ValueCallback<Boolean> callback); Uri getSafeBrowsingPrivacyPolicyUrl(); boolean isMultiProcessEnabled(); diff --git a/src/org/chromium/support_lib_boundary/util/Features.java b/src/org/chromium/support_lib_boundary/util/Features.java index 0f285cc..d3a5039 100644 --- a/src/org/chromium/support_lib_boundary/util/Features.java +++ b/src/org/chromium/support_lib_boundary/util/Features.java @@ -47,6 +47,9 @@ public class Features { // WebViewCompat.startSafeBrowsing public static final String START_SAFE_BROWSING = "START_SAFE_BROWSING"; + // WebViewCompat.setSafeBrowsingAllowlist + public static final String SAFE_BROWSING_ALLOWLIST = "SAFE_BROWSING_ALLOWLIST"; + // WebViewCompat.setSafeBrowsingWhitelist public static final String SAFE_BROWSING_WHITELIST = "SAFE_BROWSING_WHITELIST"; |