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

Issue 1497743005: Allow huge data: URIs only via WebView.loadDataWithBaseUrl (Closed)

Created:
5 years ago by mnaganov (inactive)
Modified:
4 years, 10 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, nasko+codewatch_chromium.org, jam, darin-cc_chromium.org, mkwst+moarreviews-renderer_chromium.org, android-webview-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow huge data: URIs only via WebView.loadDataWithBaseUrl This CL removes WebView hack for allowing 20MB URLs to be passed via IPC. To maintain compatibility with legacy apps, passing long data: URIs is still allowed via WebView.loadDataWithBaseUrl, which passes them as a string to circumvent the URL length limit. Data URI only goes from the browser side to the renderer side, but not back, because "history url" (or "virtual url" in Chromium terms) is used for representing the URL in other IPC messages. BUG=525697 Committed: https://crrev.com/bf08742205e9c6be216135b2466129614b674adf Cr-Commit-Position: refs/heads/master@{#365454}

Patch Set 1 #

Patch Set 2 : Fixed tests compilation #

Patch Set 3 : We can only make it work for loadDataWithBaseUrl #

Patch Set 4 : Remove SetMaxURLChars hack #

Patch Set 5 : Sort out the tests #

Total comments: 5

Patch Set 6 : Added test for serializing a huge data url #

Total comments: 20

Patch Set 7 : Make specific to Android, use RefCountedString #

Total comments: 18

Patch Set 8 : Rebased #

Patch Set 9 : Comments addressed #

Total comments: 4

Patch Set 10 : Final comments addressed #

Patch Set 11 : Fixed the test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+346 lines, -97 lines) Patch
M android_webview/browser/aw_browser_main_parts.cc View 1 2 3 2 chunks +0 lines, -9 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/LoadDataWithBaseUrlTest.java View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
M android_webview/native/state_serializer.cc View 1 2 3 4 5 6 3 chunks +27 lines, -1 line 0 comments Download
M android_webview/native/state_serializer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +57 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_android.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_android.cc View 1 2 3 4 5 6 7 8 3 chunks +20 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl.cc View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_controller_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +22 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.h View 1 2 3 4 5 6 7 8 2 chunks +12 lines, -0 lines 0 comments Download
M content/browser/frame_host/navigation_entry_impl.cc View 1 2 3 4 5 6 7 8 9 4 chunks +38 lines, -1 line 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M content/child/service_worker/service_worker_dispatcher.cc View 1 2 3 4 5 3 chunks +4 lines, -4 lines 0 comments Download
M content/common/common_param_traits_unittest.cc View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M content/common/content_constants_internal.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/navigation_params.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -4 lines 0 comments Download
M content/common/navigation_params.cc View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/framehost/NavigationControllerImpl.java View 1 2 2 chunks +4 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/LoadUrlParams.java View 1 2 3 6 chunks +35 lines, -6 lines 0 comments Download
M content/public/browser/navigation_controller.h View 1 2 3 4 5 6 7 8 9 2 chunks +9 lines, -0 lines 0 comments Download
M content/public/browser/navigation_entry.h View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M content/public/common/common_param_traits.cc View 1 2 3 2 chunks +2 lines, -3 lines 0 comments Download
M content/public/common/content_constants.h View 1 2 3 1 chunk +7 lines, -0 lines 0 comments Download
M content/public/common/content_constants.cc View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/url_utils.h View 1 2 3 2 chunks +0 lines, -25 lines 0 comments Download
M content/public/common/url_utils.cc View 1 2 3 2 chunks +0 lines, -19 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 4 chunks +21 lines, -3 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 2 3 4 5 6 7 3 chunks +30 lines, -2 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 45 (19 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497743005/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497743005/60001
5 years ago (2015-12-08 23:43:49 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: cast_shell_linux on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/90217)
5 years ago (2015-12-09 00:13:59 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497743005/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497743005/80001
5 years ago (2015-12-09 01:01:49 UTC) #8
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-09 03:05:47 UTC) #10
mnaganov (inactive)
Bo, please do sanity check for the CL.
5 years ago (2015-12-09 17:35:54 UTC) #12
boliu
Details look fine, but then let's see what owner and security people think. Two high ...
5 years ago (2015-12-09 19:33:02 UTC) #13
mnaganov (inactive)
On 2015/12/09 19:33:02, boliu wrote: > Details look fine, but then let's see what owner ...
5 years ago (2015-12-09 21:14:32 UTC) #14
boliu
On 2015/12/09 21:14:32, mnaganov wrote: > On 2015/12/09 19:33:02, boliu wrote: > > Details look ...
5 years ago (2015-12-09 21:17:50 UTC) #15
mnaganov (inactive)
Hi Tom, This is a respin of https://codereview.chromium.org/84703003/ which you were examining some time ago. ...
5 years ago (2015-12-09 21:20:48 UTC) #17
Tom Sepez
LGTM with comment. https://codereview.chromium.org/1497743005/diff/80001/android_webview/native/state_serializer_unittest.cc File android_webview/native/state_serializer_unittest.cc (right): https://codereview.chromium.org/1497743005/diff/80001/android_webview/native/state_serializer_unittest.cc#newcode55 android_webview/native/state_serializer_unittest.cc:55: const string data_url_as_string("data:text/html;charset=utf-8;base64,"); can we get ...
5 years ago (2015-12-09 21:30:14 UTC) #18
mnaganov (inactive)
https://codereview.chromium.org/1497743005/diff/80001/android_webview/native/state_serializer_unittest.cc File android_webview/native/state_serializer_unittest.cc (right): https://codereview.chromium.org/1497743005/diff/80001/android_webview/native/state_serializer_unittest.cc#newcode55 android_webview/native/state_serializer_unittest.cc:55: const string data_url_as_string("data:text/html;charset=utf-8;base64,"); On 2015/12/09 21:30:14, Tom Sepez wrote: ...
5 years ago (2015-12-09 22:22:53 UTC) #19
mnaganov (inactive)
Hi Charlie, Can you please take a look at this CL?
5 years ago (2015-12-09 22:28:26 UTC) #21
Charlie Reis
I'd really like to consider alternatives to this approach. I recognize that you're trying to ...
5 years ago (2015-12-10 20:43:46 UTC) #22
mnaganov (inactive)
Charlie, I really appreciated your feedback here! I decided to do the following things in ...
5 years ago (2015-12-11 23:14:24 UTC) #23
Charlie Reis
On 2015/12/11 23:14:24, mnaganov wrote: > Charlie, I really appreciated your feedback here! > > ...
5 years ago (2015-12-14 20:35:56 UTC) #24
mnaganov (inactive)
https://codereview.chromium.org/1497743005/diff/120001/content/browser/frame_host/navigation_controller_android.cc File content/browser/frame_host/navigation_controller_android.cc (right): https://codereview.chromium.org/1497743005/diff/120001/content/browser/frame_host/navigation_controller_android.cc#newcode238 content/browser/frame_host/navigation_controller_android.cc:238: // Treat |data_url_as_string| as if we were intenting to ...
5 years ago (2015-12-15 18:30:29 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497743005/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497743005/160001
5 years ago (2015-12-15 18:35:57 UTC) #27
Charlie Reis
Thanks. LGTM with one earlier request below. https://codereview.chromium.org/1497743005/diff/160001/content/browser/frame_host/navigation_entry_impl.cc File content/browser/frame_host/navigation_entry_impl.cc (right): https://codereview.chromium.org/1497743005/diff/160001/content/browser/frame_host/navigation_entry_impl.cc#newcode218 content/browser/frame_host/navigation_entry_impl.cc:218: data_url_as_string_ = ...
5 years ago (2015-12-15 19:22:07 UTC) #28
mnaganov (inactive)
Thank you, Charlie! https://codereview.chromium.org/1497743005/diff/160001/content/browser/frame_host/navigation_entry_impl.cc File content/browser/frame_host/navigation_entry_impl.cc (right): https://codereview.chromium.org/1497743005/diff/160001/content/browser/frame_host/navigation_entry_impl.cc#newcode218 content/browser/frame_host/navigation_entry_impl.cc:218: data_url_as_string_ = data_url; On 2015/12/15 19:22:07, ...
5 years ago (2015-12-15 20:30:49 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497743005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497743005/180001
5 years ago (2015-12-15 20:34:20 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/111088)
5 years ago (2015-12-15 23:27:30 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497743005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497743005/200001
5 years ago (2015-12-16 00:45:03 UTC) #37
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.linux (JOB_TIMED_OUT, no build URL)
5 years ago (2015-12-16 02:52:58 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1497743005/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1497743005/200001
5 years ago (2015-12-16 04:47:32 UTC) #41
commit-bot: I haz the power
Committed patchset #11 (id:200001)
5 years ago (2015-12-16 05:10:12 UTC) #43
commit-bot: I haz the power
5 years ago (2015-12-16 05:11:04 UTC) #45
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/bf08742205e9c6be216135b2466129614b674adf
Cr-Commit-Position: refs/heads/master@{#365454}

Powered by Google App Engine
This is Rietveld 408576698