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

Issue 122453002: Allows deferral of a URLRequest just before talking to the network, at (Closed)

Created:
6 years, 11 months ago by jkarlin
Modified:
6 years, 11 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Allows deferral of a URLRequest just before talking to the network, at DoCreateStream time in the HttpNetworkTransaction. This hook allows for experimentation with the ResourceScheduler so that it can defer after first checking the cache, gathering the cookies, and starting the WebRequest but before going to the network. BUG=328741 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=243568

Patch Set 1 #

Patch Set 2 : URLRequest::OnNetworkCreateStream only gets called once per URLRequest #

Patch Set 3 : Updated logging tests to only expect one OnNetworkCreateStream #

Patch Set 4 : Move NotifyNetworkCreateStream up from http job to all jobs. #

Patch Set 5 : Refactored to OnBeforeNetworkStart and rebased. #

Patch Set 6 : Formatting nits #

Total comments: 24

Patch Set 7 : Addressing mattm's comments #

Patch Set 8 : Potential fix of a memory leak due to a reference cycle. #

Total comments: 25

Patch Set 9 : The second set of mmenke's comments. #

Total comments: 2

Patch Set 10 : Updated content-length in test to actual length #

Unified diffs Side-by-side diffs Delta from patch set Stats (+410 lines, -11 lines) Patch
M net/http/http_cache_transaction.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -0 lines 0 comments Download
M net/http/http_cache_transaction.cc View 1 2 3 4 5 6 2 chunks +13 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.h View 1 2 3 4 5 6 7 8 4 chunks +7 lines, -0 lines 0 comments Download
M net/http/http_network_transaction.cc View 1 2 3 4 5 6 6 chunks +28 lines, -2 lines 0 comments Download
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +101 lines, -0 lines 0 comments Download
M net/http/http_transaction.h View 1 2 3 4 5 6 7 8 2 chunks +11 lines, -0 lines 0 comments Download
M net/http/http_transaction_unittest.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M net/http/http_transaction_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M net/url_request/url_request.h View 1 2 3 4 5 6 7 8 4 chunks +17 lines, -0 lines 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 3 chunks +24 lines, -1 line 0 comments Download
M net/url_request/url_request_http_job.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 4 5 6 7 2 chunks +8 lines, -0 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 4 3 chunks +7 lines, -1 line 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 2 chunks +13 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 2 3 4 5 chunks +9 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 2 3 4 2 chunks +11 lines, -0 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 5 6 7 8 9 chunks +141 lines, -7 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
jkarlin
6 years, 11 months ago (2013-12-30 18:54:35 UTC) #1
mattm
redirecting
6 years, 11 months ago (2014-01-03 23:55:54 UTC) #2
mmenke
On 2014/01/03 23:55:54, mattm wrote: > redirecting jkarlin: I think I'll hold off on review ...
6 years, 11 months ago (2014-01-06 21:55:00 UTC) #3
mmenke
On 2014/01/06 21:55:00, mmenke wrote: > On 2014/01/03 23:55:54, mattm wrote: > > redirecting > ...
6 years, 11 months ago (2014-01-06 21:56:00 UTC) #4
jkarlin
On 2014/01/06 21:56:00, mmenke wrote: > On 2014/01/06 21:55:00, mmenke wrote: > > On 2014/01/03 ...
6 years, 11 months ago (2014-01-06 22:43:51 UTC) #5
jkarlin
On 2014/01/06 22:43:51, jkarlin wrote: > On 2014/01/06 21:56:00, mmenke wrote: > > On 2014/01/06 ...
6 years, 11 months ago (2014-01-07 14:33:23 UTC) #6
mmenke
This looks really good to me - I'll get back with more comments later today, ...
6 years, 11 months ago (2014-01-07 15:26:23 UTC) #7
jkarlin
Awesome, ready for the next round. https://codereview.chromium.org/122453002/diff/460001/net/http/http_cache_transaction.h File net/http/http_cache_transaction.h (right): https://codereview.chromium.org/122453002/diff/460001/net/http/http_cache_transaction.h#newcode135 net/http/http_cache_transaction.h:135: const base::Callback<void(bool*)>& callback) ...
6 years, 11 months ago (2014-01-07 16:19:31 UTC) #8
mmenke
https://codereview.chromium.org/122453002/diff/840018/net/http/http_cache_transaction.h File net/http/http_cache_transaction.h (right): https://codereview.chromium.org/122453002/diff/840018/net/http/http_cache_transaction.h#newcode444 net/http/http_cache_transaction.h:444: base::Callback<void(bool*)> before_network_start_callback_; base::Callback<void(bool*)> -> BeforeNetworkStartCallback https://codereview.chromium.org/122453002/diff/840018/net/http/http_network_transaction.h File net/http/http_network_transaction.h (right): ...
6 years, 11 months ago (2014-01-07 19:44:05 UTC) #9
jkarlin
https://codereview.chromium.org/122453002/diff/840018/net/http/http_cache_transaction.h File net/http/http_cache_transaction.h (right): https://codereview.chromium.org/122453002/diff/840018/net/http/http_cache_transaction.h#newcode444 net/http/http_cache_transaction.h:444: base::Callback<void(bool*)> before_network_start_callback_; On 2014/01/07 19:44:05, mmenke wrote: > base::Callback<void(bool*)> ...
6 years, 11 months ago (2014-01-07 20:10:03 UTC) #10
mmenke
LGTM https://codereview.chromium.org/122453002/diff/990001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/122453002/diff/990001/net/http/http_network_transaction_unittest.cc#newcode1388 net/http/http_network_transaction_unittest.cc:1388: MockRead("Content-Length: 100\r\n\r\n"), Could you just change this to ...
6 years, 11 months ago (2014-01-07 20:31:38 UTC) #11
jkarlin
https://codereview.chromium.org/122453002/diff/990001/net/http/http_network_transaction_unittest.cc File net/http/http_network_transaction_unittest.cc (right): https://codereview.chromium.org/122453002/diff/990001/net/http/http_network_transaction_unittest.cc#newcode1388 net/http/http_network_transaction_unittest.cc:1388: MockRead("Content-Length: 100\r\n\r\n"), On 2014/01/07 20:31:38, mmenke wrote: > Could ...
6 years, 11 months ago (2014-01-08 12:15:09 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jkarlin@chromium.org/122453002/1260001
6 years, 11 months ago (2014-01-08 13:10:25 UTC) #13
commit-bot: I haz the power
6 years, 11 months ago (2014-01-08 15:40:49 UTC) #14
Message was sent while issue was closed.
Change committed as 243568

Powered by Google App Engine
This is Rietveld 408576698