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

Issue 10911151: URLRequestHttpJob::StartTransaction should honour network delegate. (Closed)

Created:
8 years, 3 months ago by vabr (Chromium)
Modified:
8 years, 2 months ago
CC:
chromium-reviews, Aaron Boodman, cbentzel+watch_chromium.org, mihaip-chromium-reviews_chromium.org, darin-cc_chromium.org
Visibility:
Public.

Description

URLRequestHttpJob::StartTransaction should honour network delegate. If a network delegate returns net::ERR_BLOCKED_BY_CLIENT inside URLRequestHttpJob::StartTransaction() the job is not cancelled. This does not happen, e.g., when ERR_BLOCKED_BY_CLIENT is returned within URLRequestHttpJob::OnStartCompleted(). This CL attempts to change the behaviour of StartTransaction() to cancel the job on the error signal from the delegate. BUG=146816 TEST=This is not testable in the browser without custom code changes yet. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=158984

Patch Set 1 #

Patch Set 2 : Removing accidentally commited code change #

Total comments: 2

Patch Set 3 : Added a unit-test, not fully working yet #

Total comments: 1

Patch Set 4 : onBeforeUrlRequest case fixed in the unit test #

Patch Set 5 : Migrated to the new BlockingDelegate + added test for synchronous cancellation #

Patch Set 6 : Remove code duplication + disable *CancelRequest* tests in Chrome Frame #

Total comments: 2

Patch Set 7 : 2 tests split into 6 and only 4 disabled for CF #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -14 lines) Patch
M chrome_frame/test/net/fake_external_tab.cc View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 2 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 3 chunks +8 lines, -1 line 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 1 chunk +61 lines, -13 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
vabr (Chromium)
Hi Matt, This CL is probably silly and wrong, because I'm not sure about the ...
8 years, 3 months ago (2012-09-07 17:05:35 UTC) #1
mmenke
Your fix looks correct to me. Mind adding a unit test for this? Would be ...
8 years, 3 months ago (2012-09-07 17:27:50 UTC) #2
mmenke
On 2012/09/07 17:27:50, Matt Menke wrote: > Your fix looks correct to me. Mind adding ...
8 years, 3 months ago (2012-09-07 17:28:32 UTC) #3
vabr (Chromium)
Thanks, Matt! I added a unit test. I'm not done yet, because the unit test ...
8 years, 3 months ago (2012-09-10 15:32:58 UTC) #4
mmenke
It looks to me like your test is indeed going in the right direction. Great ...
8 years, 3 months ago (2012-09-10 15:53:18 UTC) #5
vabr (Chromium)
Matt, Big thanks for your speedy answers and for nailing the problem I had with ...
8 years, 3 months ago (2012-09-12 12:40:48 UTC) #6
mmenke
On 2012/09/12 12:40:48, vabr (Chromium) wrote: > Matt, > Big thanks for your speedy answers ...
8 years, 3 months ago (2012-09-12 12:50:24 UTC) #7
vabr (Chromium)
> Could you also add a test for synchronous cancellation, at least in the > ...
8 years, 3 months ago (2012-09-12 13:08:32 UTC) #8
mmenke
On 2012/09/12 13:08:32, vabr (Chromium) wrote: > > Could you also add a test for ...
8 years, 3 months ago (2012-09-12 14:06:09 UTC) #9
vabr (Chromium)
Hi Matt, Getting back to the first CL -- I added both the synchronous and ...
8 years, 2 months ago (2012-09-26 13:44:11 UTC) #10
mmenke
LGTM. Think it's reasonable just to not run them on Chrome Frame (Though, admittedly, I'm ...
8 years, 2 months ago (2012-09-26 15:25:27 UTC) #11
vabr (Chromium)
Thanks, Matt! Erik, could you please review chrome_frame/test/net/fake_external_tab.cc as OWNER? (This is a different CL ...
8 years, 2 months ago (2012-09-26 15:31:48 UTC) #12
erikwright (departed)
http://codereview.chromium.org/10911151/diff/21001/net/url_request/url_request_unittest.cc File net/url_request/url_request_unittest.cc (right): http://codereview.chromium.org/10911151/diff/21001/net/url_request/url_request_unittest.cc#newcode2073 net/url_request/url_request_unittest.cc:2073: BlockingNetworkDelegate::ON_BEFORE_URL_REQUEST, Could you just make the blocking stage a ...
8 years, 2 months ago (2012-09-26 15:41:42 UTC) #13
vabr (Chromium)
I split the tests as Erik suggested. Erik, is that better now? Matt, do you ...
8 years, 2 months ago (2012-09-26 16:04:08 UTC) #14
mmenke
Still LGTM
8 years, 2 months ago (2012-09-26 16:05:28 UTC) #15
erikwright (departed)
chrome_frame/* LGTM
8 years, 2 months ago (2012-09-26 16:07:03 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10911151/26001
8 years, 2 months ago (2012-09-26 19:26:52 UTC) #17
commit-bot: I haz the power
Retried try job too often for step(s) browser_tests
8 years, 2 months ago (2012-09-26 21:09:54 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vabr@chromium.org/10911151/26001
8 years, 2 months ago (2012-09-27 05:01:44 UTC) #19
commit-bot: I haz the power
Change committed as 158984
8 years, 2 months ago (2012-09-27 06:15:32 UTC) #20
battre
https://chromiumcodereview.appspot.com/10911151/diff/26001/chrome_frame/test/net/fake_external_tab.cc File chrome_frame/test/net/fake_external_tab.cc (right): https://chromiumcodereview.appspot.com/10911151/diff/26001/chrome_frame/test/net/fake_external_tab.cc#newcode212 chrome_frame/test/net/fake_external_tab.cc:212: // OnHeadersReceived, which do not seem supported by CF. ...
8 years, 2 months ago (2012-09-27 07:24:30 UTC) #21
vabr (Chromium)
8 years, 2 months ago (2012-09-27 18:15:12 UTC) #22
https://chromiumcodereview.appspot.com/10911151/diff/26001/chrome_frame/test/...
File chrome_frame/test/net/fake_external_tab.cc (right):

https://chromiumcodereview.appspot.com/10911151/diff/26001/chrome_frame/test/...
chrome_frame/test/net/fake_external_tab.cc:212: // OnHeadersReceived, which do
not seem supported by CF.
On 2012/09/27 07:24:30, battre wrote:
> Why are they not supported? This looks like a weak argument.

I was re-using the argument from other parts of this file (see below).
Note that there is still actually one more test run for Chrome Frame after this
CL, compared to the state before.
I don't think there is a way to run these 4 tests under Chrome Frame, the stages
in which they block do not seem to be ever visited.

Powered by Google App Engine
This is Rietveld 408576698