Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Issue 2833923002: WebView: carefully check size for SafeBrowsing interstitial (Closed)

Created:
3 years, 8 months ago by Nate Fischer
Modified:
3 years, 8 months ago
Reviewers:
sgurun-gerrit only
CC:
agrieve+watch_chromium.org, android-webview-reviews_chromium.org, chromium-reviews
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

WebView: carefully check size for SafeBrowsing interstitial In the case of a SafeBrowsing hit, we want 3 options for which warning the user sees: 1. No interstitial - the WebView is invisible or unattached. Instead of an interstitial, we immediately return a network error. 2. Big interstitial - if the WebView is large enough that it's probably used for user navigation, then we should display the same interstitial Chrome uses (a scary warning page to catch the user's attention). 3. Small/Medium/Giant interstitial - if the WebView is small, it may be used as a piece of a larger composed app page. In this case, we eventually want to show a less-scary interstitial, since the page is typically not the result of user navigation. We intend to treat giant webviews the same way as either small or medium interstitials. We don't yet have a small interstitial, so we handle cases 1 & 3 the same for now (create a network error). Once the new interstitial is implemented, we'll handle cases 1 & 3 separately. BUG=702072 Review-Url: https://codereview.chromium.org/2833923002 Cr-Commit-Position: refs/heads/master@{#467119} Committed: https://chromium.googlesource.com/chromium/src/+/22119b62178b195b177b6e5629624d80f52efcd1

Patch Set 1 #

Patch Set 2 : Update docs and comments #

Patch Set 3 : Change to 70%, treat giant views like small views, and add tests #

Patch Set 4 : Fix logic error and update comments #

Total comments: 6

Patch Set 5 : Inline display width and height #

Patch Set 6 : Remove CanShowInterstitial from native #

Total comments: 4

Patch Set 7 : Also check if attached, add @VisibleForTesting #

Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -19 lines) Patch
M android_webview/browser/aw_safe_browsing_ui_manager.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M android_webview/browser/aw_safe_browsing_ui_manager.cc View 1 chunk +1 line, -1 line 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 3 chunks +46 lines, -11 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java View 1 2 4 chunks +87 lines, -3 lines 0 comments Download
M android_webview/native/aw_contents.h View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 39 (29 generated)
Nate Fischer
PTAL
3 years, 8 months ago (2017-04-24 21:43:40 UTC) #18
sgurun-gerrit only
https://codereview.chromium.org/2833923002/diff/60001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2833923002/diff/60001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2928 android_webview/java/src/org/chromium/android_webview/AwContents.java:2928: int displayHeight = displayAndroid.getDisplayHeight(); nit: inline https://codereview.chromium.org/2833923002/diff/60001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2929 android_webview/java/src/org/chromium/android_webview/AwContents.java:2929: int ...
3 years, 8 months ago (2017-04-24 22:44:11 UTC) #21
Nate Fischer
https://codereview.chromium.org/2833923002/diff/60001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2833923002/diff/60001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2928 android_webview/java/src/org/chromium/android_webview/AwContents.java:2928: int displayHeight = displayAndroid.getDisplayHeight(); On 2017/04/24 at 22:44:10, sgurun ...
3 years, 8 months ago (2017-04-24 23:00:53 UTC) #22
Nate Fischer
As discussed offline, I removed the native parts of CanShowInterstitial, we'll add it back if ...
3 years, 8 months ago (2017-04-24 23:43:43 UTC) #24
sgurun-gerrit only
https://codereview.chromium.org/2833923002/diff/100001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2833923002/diff/100001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2941 android_webview/java/src/org/chromium/android_webview/AwContents.java:2941: return mContainerView.getVisibility() == View.VISIBLE; We have a local variable ...
3 years, 8 months ago (2017-04-25 00:04:38 UTC) #26
Nate Fischer
https://codereview.chromium.org/2833923002/diff/100001/android_webview/java/src/org/chromium/android_webview/AwContents.java File android_webview/java/src/org/chromium/android_webview/AwContents.java (right): https://codereview.chromium.org/2833923002/diff/100001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode2941 android_webview/java/src/org/chromium/android_webview/AwContents.java:2941: return mContainerView.getVisibility() == View.VISIBLE; On 2017/04/25 at 00:04:38, sgurun ...
3 years, 8 months ago (2017-04-25 02:11:43 UTC) #28
sgurun-gerrit only
lgtm
3 years, 8 months ago (2017-04-25 19:50:01 UTC) #32
Nate Fischer
Thanks!
3 years, 8 months ago (2017-04-25 21:22:05 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2833923002/120001
3 years, 8 months ago (2017-04-25 21:23:14 UTC) #36
commit-bot: I haz the power
3 years, 8 months ago (2017-04-25 21:34:23 UTC) #39
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/22119b62178b195b177b6e562962...

Powered by Google App Engine
This is Rietveld 408576698