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

Issue 12328072: Remove some calls to URLRequestContext::network_delegate(). (Closed)

Created:
7 years, 10 months ago by tedv
Modified:
7 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, pauljensen
Visibility:
Public.

Description

Remove some calls to URLRequestContext::network_delegate(). One new constructor interface to TestURLRequest was added to fascilitate this refactoring. The four argument constructor allows requests to be supplied both a context pointer and a network delegate pointer. The old three argument constructor will be removed once all existing calls use the new version. Several unit tests in net/* were updated to use this new constructor as well. BUG=146587 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186982

Patch Set 1 #

Total comments: 2

Patch Set 2 : Removed new throttler interface and URLRequest::network_delegate(). #

Patch Set 3 : Make network_delegate_ a protected member of URLRequestJob. #

Total comments: 6

Patch Set 4 : Provide read-only access to network delegate for derived classes. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -37 lines) Patch
M net/url_request/url_request_context_builder.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M net/url_request/url_request_filter_unittest.cc View 7 chunks +10 lines, -10 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 3 5 chunks +13 lines, -11 lines 0 comments Download
M net/url_request/url_request_job.h View 1 2 3 2 chunks +4 lines, -0 lines 0 comments Download
M net/url_request/url_request_job_factory_impl_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_job_unittest.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_test_util.h View 1 chunk +4 lines, -0 lines 0 comments Download
M net/url_request/url_request_test_util.cc View 1 chunk +8 lines, -1 line 0 comments Download
M net/url_request/url_request_throttler_simulation_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/url_request/url_request_throttler_unittest.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.cc View 1 2 3 4 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
tedv
Erik, can you do a once-over this code before handing it off to willchan for ...
7 years, 10 months ago (2013-02-23 04:42:25 UTC) #1
erikwright (departed)
In general I can't see any advantage to shuffling this accessor to the URLRequest object. ...
7 years, 10 months ago (2013-02-25 15:07:23 UTC) #2
tedv
On 2013/02/25 15:07:23, erikwright wrote: > In general I can't see any advantage to shuffling ...
7 years, 10 months ago (2013-02-26 03:28:16 UTC) #3
erikwright (departed)
I spoke with Jói, author of the throttling stuff. Whether to throttle or not can ...
7 years, 10 months ago (2013-02-26 14:48:44 UTC) #4
awong
I don't quite understand the question, but I think it's beyond my area of expertise ...
7 years, 10 months ago (2013-02-26 18:59:19 UTC) #5
erikwright (departed)
In simpler terms, which contexts might be used by requests where "request.first_party_for_cookies().scheme() == extensions::kExtensionScheme"? These ...
7 years, 10 months ago (2013-02-26 19:05:56 UTC) #6
awong
[ +mpcomplete ] That helps a little, but there's still some fuzziness. Here's what I ...
7 years, 10 months ago (2013-02-26 19:18:24 UTC) #7
Matt Perry
I don't really understand either. When you say "which contexts might be used" - what ...
7 years, 10 months ago (2013-02-26 19:25:54 UTC) #8
erikwright (departed)
On 2013/02/26 19:18:24, awong wrote: > [ +mpcomplete ] > > That helps a little, ...
7 years, 10 months ago (2013-02-26 19:28:55 UTC) #9
erikwright (departed)
On 2013/02/26 19:25:54, Matt Perry wrote: > I don't really understand either. When you say ...
7 years, 10 months ago (2013-02-26 19:29:42 UTC) #10
awong
On Tue, Feb 26, 2013 at 11:28 AM, <erikwright@chromium.org> wrote: > On 2013/02/26 19:18:24, awong ...
7 years, 10 months ago (2013-02-26 20:07:09 UTC) #11
tedv
I've uploaded a patch set that removes the throttler interface change, as well as the ...
7 years, 9 months ago (2013-02-28 03:19:58 UTC) #12
tedv
Just checking back again. willchan or erikwright, have either of you had the chance to ...
7 years, 9 months ago (2013-03-05 14:19:04 UTC) #13
erikwright (departed)
On 2013/03/05 14:19:04, tedv wrote: > Just checking back again. willchan or erikwright, have either ...
7 years, 9 months ago (2013-03-06 16:48:20 UTC) #14
erikwright (departed)
On 2013/03/06 16:48:20, erikwright wrote: > On 2013/03/05 14:19:04, tedv wrote: > > Just checking ...
7 years, 9 months ago (2013-03-06 16:49:20 UTC) #15
mmenke
On 2013/03/06 16:49:20, erikwright wrote: > On 2013/03/06 16:48:20, erikwright wrote: > > On 2013/03/05 ...
7 years, 9 months ago (2013-03-06 19:03:36 UTC) #16
mmenke
https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_http_job.cc File net/url_request/url_request_http_job.cc (right): https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_http_job.cc#newcode83 net/url_request/url_request_http_job.cc:83: explicit HttpTransactionDelegateImpl( nit: Explicit no longer needed. https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_job.h File ...
7 years, 9 months ago (2013-03-07 15:45:39 UTC) #17
tedv
https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_job.h File net/url_request/url_request_job.h (right): https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_job.h#newcode309 net/url_request/url_request_job.h:309: NetworkDelegate* network_delegate_; Makes sense; will change that. On 2013/03/07 ...
7 years, 9 months ago (2013-03-07 15:58:32 UTC) #18
mmenke
https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_job_factory_impl_unittest.cc File net/url_request/url_request_job_factory_impl_unittest.cc (right): https://codereview.chromium.org/12328072/diff/24001/net/url_request/url_request_job_factory_impl_unittest.cc#newcode77 net/url_request/url_request_job_factory_impl_unittest.cc:77: TestURLRequest request(GURL("foo://bar"), &delegate, &request_context, NULL); On 2013/03/07 15:58:32, tedv ...
7 years, 9 months ago (2013-03-07 16:05:58 UTC) #19
tedv
On 2013/03/07 16:05:58, mmenke wrote: > It gets constructed, but if it's not passed to ...
7 years, 9 months ago (2013-03-07 21:09:26 UTC) #20
mmenke
On 2013/03/07 21:09:26, tedv wrote: > On 2013/03/07 16:05:58, mmenke wrote: > > It gets ...
7 years, 9 months ago (2013-03-07 21:15:15 UTC) #21
tedv
On 2013/03/07 21:15:15, mmenke wrote: > Gah, I'm sorry. I had been thinking the TestURLRequestContext ...
7 years, 9 months ago (2013-03-07 21:19:57 UTC) #22
mmenke
On 2013/03/07 21:19:57, tedv wrote: > On 2013/03/07 21:15:15, mmenke wrote: > > Gah, I'm ...
7 years, 9 months ago (2013-03-07 21:23:13 UTC) #23
tedv
I added a protected access network_delegate() method to URLRequestJob. PTAL when you get the chance.
7 years, 9 months ago (2013-03-08 04:18:16 UTC) #24
mmenke
LGTM!
7 years, 9 months ago (2013-03-08 15:42:37 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tedv@chromium.org/12328072/40001
7 years, 9 months ago (2013-03-08 15:55:16 UTC) #26
commit-bot: I haz the power
7 years, 9 months ago (2013-03-08 18:04:43 UTC) #27
Message was sent while issue was closed.
Change committed as 186982

Powered by Google App Engine
This is Rietveld 408576698