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

Issue 1563633002: Make URLRequestJob::SetStatus private. (Closed)

Created:
4 years, 11 months ago by mmenke
Modified:
4 years, 11 months ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, cbentzel+watch_chromium.org, tzik, serviceworker-reviews, jam, kinuko+serviceworker, nhiroki, darin-cc_chromium.org, Paweł Hajdan Jr., horo+watch_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make URLRequestJob::SetStatus private. Recent CLs have already made it so URLRequestJob itself calls the method itself whenever necessary, except when URLRequestJob::Start is being called, where subclasses were still expected to invoke it. Most of them were failing to do so, but since nothing cares about the state after start, and little distinguished between ERR_IO_PENDING and SUCCESS, everything was still working. URLRequest now sets its status itself before it starts a URLRequestJob. This CL also makes the URLRequest consistently have a status of ERR_IO_PENDING when it's doing something - there were a number of paths where this wasn't previously the case. The state machine changes also coincidentally fix issue 575213, which regressed in https://codereview.chromium.org/1467603002, so this CL includes a test for that fix. In the future, I'd really like to get rid of URLRequestJob::SetStatus, and have URLRequests manage their own status. BUG=564250, 575213 TBR=jianli@chromium.org, phajdan.jr@chromium.org Committed: https://crrev.com/0fdf6ebeb19c8dfbb73e398d72a00be61d2aa444 Cr-Commit-Position: refs/heads/master@{#371072}

Patch Set 1 #

Patch Set 2 : More stuff #

Patch Set 3 : Fix tests #

Patch Set 4 : More fixes #

Patch Set 5 : Fix more stuff #

Patch Set 6 : More fixes... #

Patch Set 7 : Fix android_webview #

Patch Set 8 : Fix stuff #

Total comments: 25

Patch Set 9 : Response to Randy's comments #

Total comments: 4

Patch Set 10 : Combine with another CL #

Total comments: 3

Patch Set 11 : Response to comments #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+190 lines, -183 lines) Patch
M android_webview/browser/net/android_stream_reader_url_request_job.cc View 1 2 3 4 5 6 4 chunks +0 lines, -12 lines 2 comments Download
M content/browser/service_worker/service_worker_read_from_cache_job.cc View 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc View 1 2 3 4 5 6 7 8 8 chunks +32 lines, -21 lines 0 comments Download
M content/browser/service_worker/service_worker_write_to_cache_job.cc View 2 chunks +0 lines, -3 lines 0 comments Download
M content/browser/streams/stream_url_request_job.h View 1 2 3 chunks +2 lines, -3 lines 0 comments Download
M content/browser/streams/stream_url_request_job.cc View 1 2 3 4 5 6 7 8 2 chunks +10 lines, -23 lines 1 comment Download
M content/public/test/test_download_request_handler.cc View 3 chunks +2 lines, -3 lines 0 comments Download
M net/test/url_request/url_request_failed_job.cc View 1 chunk +0 lines, -1 line 0 comments Download
M net/url_request/url_request.cc View 1 2 3 4 5 6 7 8 6 chunks +16 lines, -6 lines 0 comments Download
M net/url_request/url_request_ftp_job.cc View 3 chunks +0 lines, -10 lines 0 comments Download
M net/url_request/url_request_http_job.cc View 1 2 7 chunks +0 lines, -21 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 2 3 4 5 6 7 8 12 chunks +45 lines, -32 lines 0 comments Download
M net/url_request/url_request_job.h View 2 chunks +4 lines, -3 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 4 5 6 7 8 9 10 7 chunks +39 lines, -28 lines 0 comments Download
M net/url_request/url_request_job_factory_impl_unittest.cc View 3 chunks +3 lines, -12 lines 0 comments Download
M net/url_request/url_request_job_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +37 lines, -0 lines 0 comments Download
M storage/browser/blob/blob_url_request_job.cc View 2 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 39 (21 generated)
mmenke
Suggest reviewing url_request_job / url_request first, as everything else is fallout from that. https://codereview.chromium.org/1563633002/diff/230001/android_webview/browser/net/android_stream_reader_url_request_job.cc File ...
4 years, 11 months ago (2016-01-07 15:54:55 UTC) #11
Randy Smith (Not in Mondays)
First round of comments; only real concern is understanding the URLRequest state machine based on ...
4 years, 11 months ago (2016-01-11 02:27:48 UTC) #13
mmenke
https://codereview.chromium.org/1563633002/diff/230001/android_webview/browser/net/android_stream_reader_url_request_job.cc File android_webview/browser/net/android_stream_reader_url_request_job.cc (left): https://codereview.chromium.org/1563633002/diff/230001/android_webview/browser/net/android_stream_reader_url_request_job.cc#oldcode257 android_webview/browser/net/android_stream_reader_url_request_job.cc:257: DCHECK(!request_->status().is_io_pending()); On 2016/01/11 02:27:48, Randy Smith - Not in ...
4 years, 11 months ago (2016-01-11 06:17:11 UTC) #14
mmenke
https://codereview.chromium.org/1563633002/diff/270001/net/url_request/url_request_job_unittest.cc File net/url_request/url_request_job_unittest.cc (right): https://codereview.chromium.org/1563633002/diff/270001/net/url_request/url_request_job_unittest.cc#newcode129 net/url_request/url_request_job_unittest.cc:129: const MockTransaction kInvalidContentGZip_Transaction = { Ahh...This test was supposed ...
4 years, 11 months ago (2016-01-11 14:21:40 UTC) #15
mmenke
https://codereview.chromium.org/1563633002/diff/270001/net/url_request/url_request_job_unittest.cc File net/url_request/url_request_job_unittest.cc (right): https://codereview.chromium.org/1563633002/diff/270001/net/url_request/url_request_job_unittest.cc#newcode129 net/url_request/url_request_job_unittest.cc:129: const MockTransaction kInvalidContentGZip_Transaction = { On 2016/01/11 14:21:40, mmenke ...
4 years, 11 months ago (2016-01-11 14:22:15 UTC) #16
Randy Smith (Not in Mondays)
On 2016/01/11 14:22:15, mmenke wrote: > https://codereview.chromium.org/1563633002/diff/270001/net/url_request/url_request_job_unittest.cc > File net/url_request/url_request_job_unittest.cc (right): > > https://codereview.chromium.org/1563633002/diff/270001/net/url_request/url_request_job_unittest.cc#newcode129 > ...
4 years, 11 months ago (2016-01-11 15:51:59 UTC) #17
mmenke
On 2016/01/11 15:51:59, Randy Smith - Not in Fridays wrote: > On 2016/01/11 14:22:15, mmenke ...
4 years, 11 months ago (2016-01-11 16:33:46 UTC) #18
Randy Smith (Not in Mondays)
Pretty much nits below. You can do what you want with the comment change and ...
4 years, 11 months ago (2016-01-15 17:42:02 UTC) #22
mmenke
Oops...Yea, triage doc changes are ourdated (Stilly playing with them), and weren't meant to be ...
4 years, 11 months ago (2016-01-15 18:09:42 UTC) #23
mmenke
[+mnaganov]: Please review android_webview [+falken]: Please review content/browser/service_worker [+zork]: Please review content/browser/streams [+jianli]: Please review ...
4 years, 11 months ago (2016-01-15 18:31:05 UTC) #25
mnaganov (inactive)
android_webview/ LGTM https://codereview.chromium.org/1563633002/diff/350001/android_webview/browser/net/android_stream_reader_url_request_job.cc File android_webview/browser/net/android_stream_reader_url_request_job.cc (right): https://codereview.chromium.org/1563633002/diff/350001/android_webview/browser/net/android_stream_reader_url_request_job.cc#newcode251 android_webview/browser/net/android_stream_reader_url_request_job.cc:251: return delegate_->GetMimeType( On 2016/01/15 18:31:05, mmenke wrote: ...
4 years, 11 months ago (2016-01-15 19:04:58 UTC) #26
falken
service_worker lgtm
4 years, 11 months ago (2016-01-18 00:55:57 UTC) #27
mmenke
[zork]: Ping! Please review content/browser/streams. [jianli, phajdan.jr]: I consider the parts of the review you ...
4 years, 11 months ago (2016-01-20 16:47:31 UTC) #29
Zachary Kuznia
lgtm
4 years, 11 months ago (2016-01-22 18:02:43 UTC) #30
mmenke
On 2016/01/22 18:02:43, Zachary Kuznia wrote: > lgtm Thanks!
4 years, 11 months ago (2016-01-22 21:43:19 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1563633002/350001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1563633002/350001
4 years, 11 months ago (2016-01-22 21:45:52 UTC) #35
commit-bot: I haz the power
Committed patchset #11 (id:350001)
4 years, 11 months ago (2016-01-22 23:18:32 UTC) #37
commit-bot: I haz the power
4 years, 11 months ago (2016-01-22 23:19:33 UTC) #39
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/0fdf6ebeb19c8dfbb73e398d72a00be61d2aa444
Cr-Commit-Position: refs/heads/master@{#371072}

Powered by Google App Engine
This is Rietveld 408576698