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

Issue 10920033: Implement Android WebView BlockNetworkImages (Closed)

Created:
8 years, 3 months ago by boliu
Modified:
8 years, 2 months ago
Reviewers:
joth, Yaron, mnaganov (inactive), mnaganov
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, android-webview-reviews_google.com
Visibility:
Public.

Description

Implement Android WebView BlockNetworkImages This uses the WebCore ImagesEnabled setting, which is added to ContentSettings. The setting also includes overriding WebPermissionClient::allowImage, which here allows images with local soucres to load as well. Use a whitelist of local file schemes instead of blacklisting only http(s). BUG= Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158809

Patch Set 1 #

Patch Set 2 : Complete update: use ImagesEnabled and WebPermissionClient::allowImage. #

Patch Set 3 : Update ContentSetting to new locking semantics. Add a test that does not require http server. #

Total comments: 9

Patch Set 4 : Use blacklist http(s)/ftp for compatibility. Address Mikhail's comments. #

Total comments: 1

Patch Set 5 : Added new test with TestWebServer (thanks joth!). Updated TestWebServer to support setting base64 r… #

Patch Set 6 : Remove leftover include in chrome/ #

Total comments: 6

Patch Set 7 : Add javadoc to new method in TestWebServer. Fix style nit again. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+197 lines, -21 lines) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java View 1 2 3 4 4 chunks +88 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/TestWebServer.java View 1 2 3 4 5 6 7 chunks +34 lines, -19 lines 0 comments Download
M android_webview/renderer/aw_render_view_ext.h View 1 2 chunks +14 lines, -1 line 0 comments Download
M android_webview/renderer/aw_render_view_ext.cc View 1 2 3 4 5 6 2 chunks +19 lines, -1 line 0 comments Download
M content/browser/android/content_settings.cc View 1 2 4 chunks +11 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentSettings.java View 1 2 3 3 chunks +31 lines, -0 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
boliu
FYI. Will add reviewers when webkit change lands.
8 years, 3 months ago (2012-08-31 01:20:14 UTC) #1
mnaganov (inactive)
On 2012/08/31 01:20:14, boliu wrote: > FYI. Will add reviewers when webkit change lands. The ...
8 years, 3 months ago (2012-08-31 09:10:45 UTC) #2
boliu
WebKit patches landed, waiting for chromium webkit to roll past them: http://trac.webkit.org/changeset/128645 http://trac.webkit.org/changeset/128780 No tests ...
8 years, 3 months ago (2012-09-18 00:29:59 UTC) #3
mnaganov_google.com
On Tue, Sep 18, 2012 at 1:29 AM, <boliu@chromium.org> wrote: > WebKit patches landed, waiting ...
8 years, 3 months ago (2012-09-18 08:55:30 UTC) #4
boliu
Patch set 3 has one test that does not require http server. It passes downstream ...
8 years, 3 months ago (2012-09-25 00:37:03 UTC) #5
mnaganov (inactive)
https://chromiumcodereview.appspot.com/10920033/diff/7001/android_webview/common/aw_utils.cc File android_webview/common/aw_utils.cc (right): https://chromiumcodereview.appspot.com/10920033/diff/7001/android_webview/common/aw_utils.cc#newcode12 android_webview/common/aw_utils.cc:12: bool isLocalScheme(const GURL& url) { I think this may ...
8 years, 2 months ago (2012-09-25 09:55:53 UTC) #6
boliu
All the comments for javadoc in ContentSettings done too. http://codereview.chromium.org/10920033/diff/7001/android_webview/common/aw_utils.cc File android_webview/common/aw_utils.cc (right): http://codereview.chromium.org/10920033/diff/7001/android_webview/common/aw_utils.cc#newcode12 android_webview/common/aw_utils.cc:12: ...
8 years, 2 months ago (2012-09-25 16:55:12 UTC) #7
mnaganov (inactive)
lgtm
8 years, 2 months ago (2012-09-25 16:58:30 UTC) #8
joth
lgtm % nit http://codereview.chromium.org/10920033/diff/16001/android_webview/renderer/aw_render_view_ext.cc File android_webview/renderer/aw_render_view_ext.cc (right): http://codereview.chromium.org/10920033/diff/16001/android_webview/renderer/aw_render_view_ext.cc#newcode56 android_webview/renderer/aw_render_view_ext.cc:56: const WebKit::WebURL& imageURL) { this is ...
8 years, 2 months ago (2012-09-25 19:10:47 UTC) #9
boliu
+Yaron for content/android/public New test so PTAL. Going to make sure the webkit patch sticks ...
8 years, 2 months ago (2012-09-25 20:16:18 UTC) #10
joth
new test lgtm. http://codereview.chromium.org/10920033/diff/13004/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java (right): http://codereview.chromium.org/10920033/diff/13004/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java#newcode1357 android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java:1357: @SmallTest both these tests load pages ...
8 years, 2 months ago (2012-09-25 20:28:21 UTC) #11
Yaron
content/public/android lgtm
8 years, 2 months ago (2012-09-25 20:29:21 UTC) #12
boliu
http://codereview.chromium.org/10920033/diff/13004/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java (right): http://codereview.chromium.org/10920033/diff/13004/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java#newcode1357 android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java:1357: @SmallTest On 2012/09/25 20:28:21, joth wrote: > both these ...
8 years, 2 months ago (2012-09-25 20:52:28 UTC) #13
joth
On 2012/09/25 20:52:28, boliu wrote: > http://codereview.chromium.org/10920033/diff/13004/android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java > File > android_webview/javatests/src/org/chromium/android_webview/test/AwSettingsTest.java > (right): > > ...
8 years, 2 months ago (2012-09-25 22:21:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/boliu@chromium.org/10920033/15002
8 years, 2 months ago (2012-09-26 14:27:48 UTC) #15
commit-bot: I haz the power
8 years, 2 months ago (2012-09-26 16:23:57 UTC) #16
Change committed as 158809

Powered by Google App Engine
This is Rietveld 408576698