New issue
Advanced search Search tips

Issue 709236 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug

Blocked on:
issue 740697



Sign in to add a comment

Add a callback API for calling back to the app before showing the interstitial

Project Member Reported by sgu...@chromium.org, Apr 6 2017

Issue description


 void onSafebrowsingHit(WebView View, WebResourceRequest request, List<SafeBrowsingThreat> threats, ValueCallback<Integer> action)

SafebrowsingThread is a GMSCore API. We may want to define our own constants

Actions are:

SAFEBROWSING_SHOW_INTERSTITIAL: WebView should show interstitial (Default)
SAFEBROWSING_BACK_TO_SAFETY: WebView should behave as if Back to safety is clicked.
SAFEBROWSING_PROCEED: WebView should behave as if Proceed button is clicked.

if app does not override default behavior is taken.
 
Cc: -nparker@chromium.org nparker@google.com
Labels: SafeBrowsing-Triaged
Status: Assigned (was: Untriaged)
Do we really want this to be asynchronous? I think WebView needs an immediate answer. If it's asynchronous, what will we do while waiting for ValueCallback, besides blocking?

Comment 3 by sgu...@chromium.org, Apr 10 2017

Cc: -nparker@google.com nparker@chromium.org

Comment 4 by sgu...@chromium.org, Apr 11 2017

Labels: M-59

Comment 5 by sgu...@chromium.org, Apr 11 2017

Labels: -M-59 M-60
Labels: -M-60 M-61
sgurun@, is it appropriate to open this bug up?

Publicly visible design doc: https://goo.gl/QVLP6w

Comment 8 by sgu...@chromium.org, Jun 29 2017

yes we can open it up. 
Labels: -Restrict-View-Google
Removing Restrict-View-Google label
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d

commit ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d
Author: Nate Fischer <ntfschr@chromium.org>
Date: Thu Jul 06 00:11:16 2017

AW: implement WebViewClient#onSafeBrowsingHit API

This provides most of the implementation of
WebViewClient#onSafeBrowsingHit().

 * Includes all the plumbing
 * Ignores the application's override of onSafeBrowsingHit(). Invoking
   the application's override will be done downstream.
 * Implements the default behavior (SHOW_INTERSTITIAL)
 * Adds AwSafeBrowsingUIManager::SetExtendedReportingAllowed(). This
   allows us to add a SHOW_INTERSTITIAL_NO_REPORTING action (show the
   interstitial, but disallow the reporting checkbox).

Design doc: https://goo.gl/QVLP6w

Bug:  709236 
Test: run_webview_instrumentation_test_apk -f SafeBrowsingTest#*
Change-Id: Ia44bc5e1e17984eaf7a435eaf65a2ed85ac8a338
Reviewed-on: https://chromium-review.googlesource.com/551558
Reviewed-by: Varun Khaneja <vakh@chromium.org>
Reviewed-by: Selim Gurun <sgurun@chromium.org>
Commit-Queue: Varun Khaneja <vakh@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484380}
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/BUILD.gn
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_contents_client_bridge.cc
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_contents_client_bridge.h
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_safe_browsing_blocking_page.cc
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_safe_browsing_blocking_page.h
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_safe_browsing_resource_throttle.cc
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_safe_browsing_resource_throttle.h
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_safe_browsing_ui_manager.cc
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/browser/aw_safe_browsing_ui_manager.h
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/java/src/org/chromium/android_webview/AwContentsClientCallbackHelper.java
[add] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/java/src/org/chromium/android_webview/AwSafeBrowsingConversionHelper.java
[add] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/java/src/org/chromium/android_webview/AwSafeBrowsingResponse.java
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/components/safe_browsing/base_resource_throttle.h
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/components/safe_browsing_db/BUILD.gn
[modify] https://crrev.com/ec9ec8738b482f7caf00fe1a4ca3137ca6600a0d/components/safe_browsing_db/v4_protocol_manager_util.h

Blockedon: 740697
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 11 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fcc68aadfa4894ecfe27aac1131c428adc359a0e

commit fcc68aadfa4894ecfe27aac1131c428adc359a0e
Author: Nate Fischer <ntfschr@chromium.org>
Date: Tue Jul 11 00:53:47 2017

AW: change visibility of WebResourceRequestImpl

No change in logic.

This changes the visibility of WebResourceRequestImpl to protected,
since we need to use it downstream for onSafeBrowsingHit().

Bug:  709236 
Change-Id: Ie3f1534268667ef64d43dc7f8ae58e9424566cbb
Reviewed-on: https://chromium-review.googlesource.com/566022
Reviewed-by: Bo Liu <boliu@chromium.org>
Commit-Queue: Nate Fischer <ntfschr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485469}
[modify] https://crrev.com/fcc68aadfa4894ecfe27aac1131c428adc359a0e/android_webview/glue/java/src/com/android/webview/chromium/WebViewContentsClientAdapter.java

Project Member

Comment 13 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chrome-internal.googlesource.com/clank/internal/apps/+/a5cb351a037e553aa02162fa9563fb4c892725f3

commit a5cb351a037e553aa02162fa9563fb4c892725f3
Author: Nate Fischer <ntfschr@google.com>
Date: Thu Jul 20 19:32:33 2017

Status: Fixed (was: Assigned)
Alright, basic implementation should be done. Verification will need to wait until I build a test app.
Labels: WebView-SafeBrowsing
Status: Verified (was: Fixed)
Bulk edit: marking stale 'fixed' bugs as 'verified' since they don't need verification at this point.

Sign in to add a comment