|
WebView: choose loud vs. quiet interstitial
This CL lets WebView choose between a Loud vs. Quiet blocking page when
blocking malicious content.
This changes the constructor of BaseBlockingPage to accept an
ErrorUiType parameter indicating the correct SafeBrowsingErrorUI to
instantiate. It includes three states to cover interstitials that are
loud, giant, or small (to handle small and giant slightly differently in native code).
BaseSafeBrowsingErrorUI now has GetHTMLTemplateId(), which returns the
proper resource ID for the blocking page's HTML template. This fixes a
crash during the i18n stage when using the wrong HTML.
GetErrorUiType() has been plumbed out to native, allowing WebView
native code to differentiate between the three interstitial states.
This adds the resources for the quiet interstitial, which corresponds
to the following apk size increases:
- SystemWebViewGoogle.apk's en-US.pak (6877 -> 7248) (+371)
- SystemWebViewGoogle.apk's resources.pak (417015 -> 427494) (+10479)
BUG= 718545
Review-Url: https://codereview.chromium.org/2898593002
Cr-Commit-Position: refs/heads/master@{#474858}
Committed: https://chromium.googlesource.com/chromium/src/+/96bd408ae32e5925624d5f4359687df707205de3
Total comments: 6
Total comments: 4
Total comments: 6
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+134 lines, -30 lines) |
Patch |
 |
M |
android_webview/BUILD.gn
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+7 lines, -0 lines |
0 comments
|
Download
|
 |
M |
android_webview/browser/aw_contents.h
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
android_webview/browser/aw_contents.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+10 lines, -2 lines |
0 comments
|
Download
|
 |
M |
android_webview/browser/aw_safe_browsing_blocking_page.h
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+7 lines, -1 line |
0 comments
|
Download
|
 |
M |
android_webview/browser/aw_safe_browsing_blocking_page.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
4 chunks |
+19 lines, -3 lines |
0 comments
|
Download
|
 |
M |
android_webview/browser/aw_safe_browsing_ui_manager.h
|
View
|
1
2
3
4
5
|
2 chunks |
+8 lines, -2 lines |
0 comments
|
Download
|
 |
M |
android_webview/browser/aw_safe_browsing_ui_manager.cc
|
View
|
1
2
3
4
5
|
2 chunks |
+8 lines, -1 line |
0 comments
|
Download
|
 |
M |
android_webview/java/src/org/chromium/android_webview/AwContents.java
|
View
|
1
2
3
4
5
6
7
8
9
10
|
2 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
android_webview/javatests/src/org/chromium/android_webview/test/SafeBrowsingTest.java
|
View
|
1
2
3
4
5
6
7
8
9
10
|
1 chunk |
+12 lines, -8 lines |
0 comments
|
Download
|
 |
M |
android_webview/ui/grit_resources_whitelist.txt
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
android_webview/ui/grit_strings_whitelist.txt
|
View
|
|
1 chunk |
+4 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/safe_browsing/base_blocking_page.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
components/safe_browsing/base_blocking_page.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+12 lines, -4 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/DEPS
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/content/security_interstitial_page.h
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/content/security_interstitial_page.cc
|
View
|
|
1 chunk |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
components/security_interstitials/core/BUILD.gn
|
View
|
1
2
3
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/core/base_safe_browsing_error_ui.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/core/safe_browsing_loud_error_ui.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/core/safe_browsing_loud_error_ui.cc
|
View
|
1
2
3
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/core/safe_browsing_quiet_error_ui.h
|
View
|
1
2
3
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
components/security_interstitials/core/safe_browsing_quiet_error_ui.cc
|
View
|
1
2
3
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
Total messages: 70 (43 generated)
|