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

Issue 759203002: [ServiceWorker] Make Stream support in ServiceWorkerURLRequestJob (Closed)

Created:
6 years ago by horo
Modified:
6 years ago
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, tzik, serviceworker-reviews, jam, nhiroki, darin-cc_chromium.org, horo+watch_chromium.org, kinuko+serviceworker, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[ServiceWorker] Make Stream support in ServiceWorkerURLRequestJob In ServiceWorkerURLRequestJob::DidDispatchFetchEvent(), if response.stream_url of ServiceWorkerHostMsg_FetchEventFinished is set, ServiceWorkerURLRequestJob starts reading the body of the response from the stream instead of the blob. But the stream may not be registered yet. It is because ServiceWorkerHostMsg_FetchEventFinished is sent from the worker thread but StreamHostMsg_StartBuilding which triggers the stream registration is sent from the main thread of the ServiceWorker process. So if ServiceWorkerURLRequestJob can't get the stream in DidDispatchFetchEvent(), call StreamRegistry::SetRegisterObserver() to receive the stream registration event. When ServiceWorkerURLRequestJob successfuly gets the stream, it starts reading the stream. The codes for reading the stream is almost same as the codes in StreamURLRequestJob. This change depends on these changes: https://codereview.chromium.org/760823002 https://codereview.chromium.org/759823003 BUG=436424 Committed: https://crrev.com/d556043ea410430fc84a555d4018265025dfc194 Cr-Commit-Position: refs/heads/master@{#308059}

Patch Set 1 : #

Total comments: 28

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : incorporated nhiroki's comment #

Patch Set 5 : include set #

Total comments: 12

Patch Set 6 : incorporated tyoshino and nhiroki's comment #

Total comments: 14

Patch Set 7 : incorporated tyoshino's comment #

Patch Set 8 : AbortPendingStream #

Unified diffs Side-by-side diffs Delta from patch set Stats (+410 lines, -11 lines) Patch
M base/supports_user_data.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/resource_context_impl.h View 2 chunks +5 lines, -4 lines 0 comments Download
M content/browser/resource_context_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/service_worker/service_worker_controllee_request_handler.cc View 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.h View 1 2 3 4 5 6 5 chunks +26 lines, -1 line 0 comments Download
M content/browser/service_worker/service_worker_url_request_job.cc View 1 2 3 4 5 6 7 8 chunks +118 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 4 5 6 9 chunks +257 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (16 generated)
horo
nhiroki@ Could you please review this? Thank you.
6 years ago (2014-11-26 08:25:37 UTC) #5
nhiroki
Partially reviewed. I'm not really familiar with this domain, so I'd prefer you to find ...
6 years ago (2014-11-27 05:03:26 UTC) #8
horo
Thank you! https://codereview.chromium.org/759203002/diff/100001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/759203002/diff/100001/content/browser/service_worker/service_worker_url_request_job.cc#newcode154 content/browser/service_worker/service_worker_url_request_job.cc:154: net::IOBuffer* buf, int buf_size, int *bytes_read) { ...
6 years ago (2014-11-27 06:52:51 UTC) #11
horo
tyoshino@ Could you please review this? Thank you!
6 years ago (2014-11-28 09:28:04 UTC) #13
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/759203002/diff/220001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/759203002/diff/220001/content/browser/service_worker/service_worker_url_request_job.cc#newcode155 content/browser/service_worker/service_worker_url_request_job.cc:155: DCHECK(bytes_read); can we assert that waiting_stream_url_ is empty here? ...
6 years ago (2014-12-03 08:13:33 UTC) #15
nhiroki
LGTM https://codereview.chromium.org/759203002/diff/220001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/759203002/diff/220001/content/browser/service_worker/service_worker_url_request_job.cc#newcode86 content/browser/service_worker/service_worker_url_request_job.cc:86: if (stream_.get()) { FYI: Boolean testing of scoped_refptr ...
6 years ago (2014-12-03 08:15:08 UTC) #16
horo
https://codereview.chromium.org/759203002/diff/220001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/759203002/diff/220001/content/browser/service_worker/service_worker_url_request_job.cc#newcode86 content/browser/service_worker/service_worker_url_request_job.cc:86: if (stream_.get()) { On 2014/12/03 08:15:08, nhiroki wrote: > ...
6 years ago (2014-12-05 05:51:54 UTC) #18
tyoshino (SeeGerritForStatus)
CL description: suport -> support
6 years ago (2014-12-08 09:31:57 UTC) #19
tyoshino (SeeGerritForStatus)
almost lg https://codereview.chromium.org/759203002/diff/280001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/759203002/diff/280001/content/browser/service_worker/service_worker_url_request_job.cc#newcode270 content/browser/service_worker/service_worker_url_request_job.cc:270: // Calling NotifyReadComplete call with 0 signals ...
6 years ago (2014-12-08 09:36:56 UTC) #20
horo
https://codereview.chromium.org/759203002/diff/280001/content/browser/service_worker/service_worker_url_request_job.cc File content/browser/service_worker/service_worker_url_request_job.cc (right): https://codereview.chromium.org/759203002/diff/280001/content/browser/service_worker/service_worker_url_request_job.cc#newcode270 content/browser/service_worker/service_worker_url_request_job.cc:270: // Calling NotifyReadComplete call with 0 signals completion. On ...
6 years ago (2014-12-09 04:23:56 UTC) #24
tyoshino (SeeGerritForStatus)
lgtm!
6 years ago (2014-12-09 05:41:33 UTC) #25
horo
jam@ Could you please review base/supports_user_data.h and content/browser/resource_context_impl.*?
6 years ago (2014-12-09 05:49:17 UTC) #27
jam
lgtm
6 years ago (2014-12-09 17:15:23 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759203002/380001
6 years ago (2014-12-12 04:56:49 UTC) #30
commit-bot: I haz the power
Committed patchset #8 (id:380001)
6 years ago (2014-12-12 06:20:20 UTC) #31
commit-bot: I haz the power
6 years ago (2014-12-12 06:21:08 UTC) #32
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/d556043ea410430fc84a555d4018265025dfc194
Cr-Commit-Position: refs/heads/master@{#308059}

Powered by Google App Engine
This is Rietveld 408576698