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

Issue 1155713005: Use a resource throttle to implement shouldOverrideUrlLoading. (Closed)

Created:
5 years, 7 months ago by gsennton
Modified:
5 years, 5 months ago
CC:
chromium-reviews, 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

Use resource throttle to implement shouldOverrideUrlLoading, core change We have been using both a resource throttle and a sync IPC to implement shouldOverrideUrlLoading, with this patch we use only a resource throttle instead. This patch depends on https://codereview.chromium.org/1194383003 which adds a flag indicating that the current request was overridden. The flag is passed down to AwWebContentsObserver.didFailLoad. That CL in turn depends on https://codereview.chromium.org/1178273007/ which adds the flag to blink errors. BUG=325351 Committed: https://crrev.com/777bb78a111aee919e07f5206267915a87639f88 Cr-Commit-Position: refs/heads/master@{#339109}

Patch Set 1 #

Patch Set 2 : Added test for XHR cancellation #

Patch Set 3 : Add flag showing that shouldOverrideUrl cancelled the navigation #

Total comments: 13

Patch Set 4 : Change XHR test and remove HandleNavigation path. #

Total comments: 1

Patch Set 5 : Move addition of was_ignored_by_handler flag to its own CL. #

Patch Set 6 : Remove shouldOverrideUrlLoading from awContentsClientBridge #

Total comments: 2

Patch Set 7 : Make test server wait for shouldOverrideUrlLoading call before returning xhr request #

Patch Set 8 : Rebase #

Patch Set 9 : Fix trybot failure (use static inner class in instrumentation test) #

Total comments: 11

Patch Set 10 : Remove unused function and includes #

Patch Set 11 : Change userGestureCarryOverInfo logic #

Total comments: 4

Patch Set 12 : Rebase and fix qinmin nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+131 lines, -218 lines) Patch
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +0 lines, -37 lines 0 comments Download
M android_webview/browser/aw_contents_client_bridge_base.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -4 lines 0 comments Download
M android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -6 lines 0 comments Download
M android_webview/common/render_view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -13 lines 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 11 1 chunk +29 lines, -14 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContentsClientBridge.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -10 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +90 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents_client_bridge.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -3 lines 0 comments Download
M android_webview/native/aw_contents_client_bridge.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -14 lines 0 comments Download
M android_webview/renderer/aw_content_renderer_client.h View 1 2 3 1 chunk +0 lines, -8 lines 0 comments Download
M android_webview/renderer/aw_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +0 lines, -58 lines 0 comments Download
M content/public/renderer/content_renderer_client.h View 1 2 3 4 5 6 7 8 9 2 chunks +0 lines, -19 lines 0 comments Download
M content/public/renderer/content_renderer_client.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -14 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +0 lines, -17 lines 0 comments Download

Messages

Total messages: 83 (17 generated)
gsennton
5 years, 7 months ago (2015-05-26 18:13:22 UTC) #2
gsennton
On 2015/05/26 18:13:22, gsennton wrote: Out of the instrumentation tests in AwContentsClientShouldOverrideUrlLoadingTest this is failing ...
5 years, 6 months ago (2015-05-28 09:53:22 UTC) #3
gsennton
On 2015/05/28 09:53:22, gsennton wrote: > On 2015/05/26 18:13:22, gsennton wrote: > > Out of ...
5 years, 6 months ago (2015-05-28 12:24:21 UTC) #4
gsennton
On 2015/05/28 12:24:21, gsennton wrote: > On 2015/05/28 09:53:22, gsennton wrote: > > On 2015/05/26 ...
5 years, 6 months ago (2015-05-28 14:37:33 UTC) #5
gsennton
I added a test for mkosibas document loading fix, and it passes for the resource ...
5 years, 6 months ago (2015-05-29 15:07:54 UTC) #6
gsennton
Ok, so PS3 is passing webview's instrumentation tests but the behaviour is still a bit ...
5 years, 6 months ago (2015-06-03 17:37:49 UTC) #7
sgurun-gerrit only
Actually it is more reasonable then I thought it is :) the cl needs work ...
5 years, 6 months ago (2015-06-04 06:37:34 UTC) #8
sgurun-gerrit only
On 2015/06/04 06:37:34, sgurun wrote: > Actually it is more reasonable then I thought it ...
5 years, 6 months ago (2015-06-04 06:37:57 UTC) #9
gsennton
A couple of notes/questions: Regarding the weird behaviour of redirects (calling didFailLoad for the original ...
5 years, 6 months ago (2015-06-04 14:55:19 UTC) #10
mnaganov (inactive)
https://codereview.chromium.org/1155713005/diff/40001/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java File android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java (right): https://codereview.chromium.org/1155713005/diff/40001/android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java#newcode59 android_webview/java/src/org/chromium/android_webview/AwWebContentsObserver.java:59: if (!wasIgnoredByHandler) { nit: Why not to put this ...
5 years, 6 months ago (2015-06-04 19:09:28 UTC) #12
sgurun-gerrit only
> Does it matter whether OnPageStarted is called before or after > shouldOverrideUrl? -- with ...
5 years, 6 months ago (2015-06-05 07:01:45 UTC) #13
sgurun-gerrit only
https://codereview.chromium.org/1155713005/diff/40001/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/1155713005/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode490 android_webview/java/src/org/chromium/android_webview/AwContents.java:490: // load, redirect and backforward should also be filtered ...
5 years, 6 months ago (2015-06-05 07:52:50 UTC) #14
gsennton
https://codereview.chromium.org/1155713005/diff/40001/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/1155713005/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode490 android_webview/java/src/org/chromium/android_webview/AwContents.java:490: // load, redirect and backforward should also be filtered ...
5 years, 6 months ago (2015-06-08 14:07:24 UTC) #15
gsennton
Hi jam@ I added you as reviewer as you might know how to proceed here ...
5 years, 6 months ago (2015-06-08 17:15:46 UTC) #17
mnaganov (inactive)
On 2015/06/08 14:07:24, gsennton wrote: > https://codereview.chromium.org/1155713005/diff/40001/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/1155713005/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java#newcode490 ...
5 years, 6 months ago (2015-06-11 19:44:12 UTC) #18
sgurun-gerrit only
On 2015/06/11 19:44:12, mnaganov wrote: > On 2015/06/08 14:07:24, gsennton wrote: > > > https://codereview.chromium.org/1155713005/diff/40001/android_webview/java/src/org/chromium/android_webview/AwContents.java ...
5 years, 6 months ago (2015-06-16 17:50:37 UTC) #19
jam
On 2015/06/08 17:15:46, gsennton wrote: > Hi jam@ I added you as reviewer as you ...
5 years, 6 months ago (2015-06-17 15:30:45 UTC) #20
mnaganov (inactive)
https://codereview.chromium.org/1155713005/diff/60001/android_webview/renderer/aw_content_renderer_client.cc File android_webview/renderer/aw_content_renderer_client.cc (left): https://codereview.chromium.org/1155713005/diff/60001/android_webview/renderer/aw_content_renderer_client.cc#oldcode117 android_webview/renderer/aw_content_renderer_client.cc:117: RenderThread::Get()->Send(new AwViewHostMsg_ShouldOverrideUrlLoading( Note that this is the only place ...
5 years, 6 months ago (2015-06-18 18:08:20 UTC) #21
mnaganov (inactive)
On 2015/06/18 18:08:20, mnaganov wrote: > https://codereview.chromium.org/1155713005/diff/60001/android_webview/renderer/aw_content_renderer_client.cc > File android_webview/renderer/aw_content_renderer_client.cc (left): > > https://codereview.chromium.org/1155713005/diff/60001/android_webview/renderer/aw_content_renderer_client.cc#oldcode117 > ...
5 years, 6 months ago (2015-06-18 18:14:49 UTC) #22
gsennton
Ok, so the blink change needed for this CL to work has landed (yay :D) ...
5 years, 6 months ago (2015-06-22 19:07:55 UTC) #23
gsennton
Ok, so I moved the addition of the was-ignored-by-handler flag to its own CL so ...
5 years, 6 months ago (2015-06-23 11:06:01 UTC) #24
mnaganov (inactive)
Whatever is easier to you. We can just honor this CL status as draft, and ...
5 years, 6 months ago (2015-06-23 15:57:18 UTC) #25
gsennton
Ok, I removed the path used by HandleNavigation in this CL. All the files touching ...
5 years, 6 months ago (2015-06-23 17:03:21 UTC) #27
mnaganov (inactive)
https://codereview.chromium.org/1155713005/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java File android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java (right): https://codereview.chromium.org/1155713005/diff/100001/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java#newcode1021 android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldOverrideUrlLoadingTest.java:1021: mWebServer.setResponseDelay(WAIT_TIMEOUT_MS / 5); No, that's an awfully flaky way. ...
5 years, 6 months ago (2015-06-23 19:06:08 UTC) #28
gsennton
Right, so I fixed the test so that the xhr is not answered until shouldOverrideUrlLoading ...
5 years, 6 months ago (2015-06-24 11:14:16 UTC) #30
mnaganov (inactive)
On 2015/06/24 11:14:16, gsennton wrote: > Right, so I fixed the test so that the ...
5 years, 6 months ago (2015-06-24 15:37:10 UTC) #31
gsennton
On 2015/06/24 15:37:10, mnaganov wrote: > On 2015/06/24 11:14:16, gsennton wrote: > > Right, so ...
5 years, 6 months ago (2015-06-24 15:45:11 UTC) #32
mnaganov (inactive)
On 2015/06/24 15:45:11, gsennton wrote: > On 2015/06/24 15:37:10, mnaganov wrote: > > On 2015/06/24 ...
5 years, 6 months ago (2015-06-24 20:40:45 UTC) #33
gsennton
On 2015/06/24 20:40:45, mnaganov wrote: > Yeah, I see. Well, unless we issue onPageFinished in ...
5 years, 6 months ago (2015-06-25 09:33:41 UTC) #34
gsennton
On 2015/06/25 09:33:41, gsennton wrote: > On 2015/06/24 20:40:45, mnaganov wrote: > > Yeah, I ...
5 years, 5 months ago (2015-06-29 08:58:54 UTC) #35
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155713005/120001
5 years, 5 months ago (2015-07-07 01:36:31 UTC) #37
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/70066) ios_dbg_simulator_ninja on ...
5 years, 5 months ago (2015-07-07 01:39:26 UTC) #39
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155713005/140001
5 years, 5 months ago (2015-07-07 09:44:46 UTC) #42
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/android_clang_dbg_recipe/builds/93883)
5 years, 5 months ago (2015-07-07 10:36:02 UTC) #44
sgurun-gerrit only
https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/aw_content_browser_client.cc File android_webview/browser/aw_content_browser_client.cc (right): https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/aw_content_browser_client.cc#newcode78 android_webview/browser/aw_content_browser_client.cc:78: void AwContentsMessageFilter::OverrideThreadForMessage( nit:remove empty method. https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): ...
5 years, 5 months ago (2015-07-08 01:08:54 UTC) #45
gsennton
Ok, so I am not familiar with the UserGestureCarryOver code and as sgurun@ pointed out ...
5 years, 5 months ago (2015-07-08 11:12:55 UTC) #46
Jaekyun Seok (inactive)
https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc#newcode237 android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc:237: InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request); On 2015/07/08 11:12:55, gsennton wrote: > On 2015/07/08 ...
5 years, 5 months ago (2015-07-08 21:26:18 UTC) #48
Jaekyun Seok (inactive)
5 years, 5 months ago (2015-07-08 21:26:22 UTC) #49
gsennton
https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/1155713005/diff/160001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc#newcode237 android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc:237: InterceptNavigationDelegate::UpdateUserGestureCarryoverInfo(request); On 2015/07/08 21:26:18, Jaekyun Seok wrote: > On ...
5 years, 5 months ago (2015-07-09 12:53:49 UTC) #50
Jaekyun Seok (inactive)
qinmin@, could you please look at this CL? In this CL, InterceptNavigationResourceThrottle is being used ...
5 years, 5 months ago (2015-07-09 20:33:58 UTC) #52
sgurun-gerrit only
On 2015/07/09 20:33:58, Jaekyun Seok wrote: > qinmin@, could you please look at this CL? ...
5 years, 5 months ago (2015-07-09 22:42:30 UTC) #53
Jaekyun Seok (inactive)
On 2015/07/09 22:42:30, sgurun wrote: > On 2015/07/09 20:33:58, Jaekyun Seok wrote: > > qinmin@, ...
5 years, 5 months ago (2015-07-09 22:51:28 UTC) #54
sgurun-gerrit only
On 2015/07/09 22:51:28, Jaekyun Seok wrote: > On 2015/07/09 22:42:30, sgurun wrote: > > On ...
5 years, 5 months ago (2015-07-10 06:46:31 UTC) #55
Jaekyun Seok (inactive)
On 2015/07/10 06:46:31, sgurun wrote: > On 2015/07/09 22:51:28, Jaekyun Seok wrote: > > On ...
5 years, 5 months ago (2015-07-10 06:59:06 UTC) #56
gsennton
ping for qinmin@ regarding #56
5 years, 5 months ago (2015-07-13 18:58:39 UTC) #57
qinmin
https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc#newcode231 android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc:231: !request->url().SchemeIs(url::kHttpScheme) && This will allow sub frames to open ...
5 years, 5 months ago (2015-07-13 19:18:48 UTC) #58
gsennton
Added palmer@ for the potential security issue mentioned in #58 https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc#newcode231 ...
5 years, 5 months ago (2015-07-13 20:53:38 UTC) #60
palmer
https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc File android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc (right): https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc#newcode231 android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc:231: !request->url().SchemeIs(url::kHttpScheme) && On 2015/07/13 20:53:38, gsennton wrote: > On ...
5 years, 5 months ago (2015-07-13 21:33:11 UTC) #61
mnaganov (inactive)
On 2015/07/13 21:33:11, palmer wrote: > https://codereview.chromium.org/1155713005/diff/200001/android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc > File > android_webview/browser/renderer_host/aw_resource_dispatcher_host_delegate.cc > (right): > > ...
5 years, 5 months ago (2015-07-13 23:06:12 UTC) #62
palmer
> No, not because of this, and actually doesn't require the ad to be in ...
5 years, 5 months ago (2015-07-14 00:59:55 UTC) #63
sgurun-gerrit only
On 2015/07/14 00:59:55, palmer wrote: > > No, not because of this, and actually doesn't ...
5 years, 5 months ago (2015-07-14 06:22:24 UTC) #64
gsennton
> We do not. Looking at the code, I think this always was the behavior. ...
5 years, 5 months ago (2015-07-14 09:20:30 UTC) #65
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155713005/220001
5 years, 5 months ago (2015-07-14 09:24:08 UTC) #67
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 5 months ago (2015-07-14 10:18:13 UTC) #69
qinmin
In ChromeResourceDispatcherHostDelegate::HandleExternalProtocol, we prevent external protocols from launching within subframes. Why AWResourceDispatcherHostDelegate need to do ...
5 years, 5 months ago (2015-07-14 14:06:14 UTC) #70
gsennton
On 2015/07/14 14:06:14, qinmin wrote: > In ChromeResourceDispatcherHostDelegate::HandleExternalProtocol, we prevent > external protocols from launching ...
5 years, 5 months ago (2015-07-14 14:36:19 UTC) #71
sgurun-gerrit only
On 2015/07/14 14:36:19, gsennton wrote: > On 2015/07/14 14:06:14, qinmin wrote: > > In ChromeResourceDispatcherHostDelegate::HandleExternalProtocol, ...
5 years, 5 months ago (2015-07-14 15:33:04 UTC) #72
sgurun-gerrit only
On 2015/07/14 15:33:04, sgurun wrote: > On 2015/07/14 14:36:19, gsennton wrote: > > On 2015/07/14 ...
5 years, 5 months ago (2015-07-15 18:40:59 UTC) #73
sgurun-gerrit only
On 2015/07/15 18:40:59, sgurun wrote: > On 2015/07/14 15:33:04, sgurun wrote: > > On 2015/07/14 ...
5 years, 5 months ago (2015-07-15 23:13:57 UTC) #74
sgurun-gerrit only
On 2015/07/15 18:40:59, sgurun wrote: > On 2015/07/14 15:33:04, sgurun wrote: > > On 2015/07/14 ...
5 years, 5 months ago (2015-07-15 23:14:06 UTC) #75
palmer
IPC security LGTM. Thanks for filing the additional bugs!
5 years, 5 months ago (2015-07-16 18:41:09 UTC) #76
sgurun-gerrit only
On 2015/07/16 18:41:09, palmer wrote: > IPC security LGTM. Thanks for filing the additional bugs! ...
5 years, 5 months ago (2015-07-16 18:45:22 UTC) #77
jam
content lgtm
5 years, 5 months ago (2015-07-16 19:00:29 UTC) #78
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1155713005/220001
5 years, 5 months ago (2015-07-16 19:08:12 UTC) #81
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 5 months ago (2015-07-16 20:12:57 UTC) #82
commit-bot: I haz the power
5 years, 5 months ago (2015-07-16 20:14:07 UTC) #83
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/777bb78a111aee919e07f5206267915a87639f88
Cr-Commit-Position: refs/heads/master@{#339109}

Powered by Google App Engine
This is Rietveld 408576698