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

Issue 2352173004: Mojoify FetchEvent of Service Worker. (Closed)

Created:
4 years, 3 months ago by horo
Modified:
4 years, 2 months ago
Reviewers:
clamy, shimazu, dcheng
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, mlamouri+watch-content_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, darin-cc_chromium.org, kinuko+watch, tzik, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojoify FetchEvent of Service Worker. I'd like to use Mojo to send navigation preload response (crbug.com/649558) from the browser process to the service worker. But currently we are using the legacy IPC when the browser process sends the FetchEvent to the service worker. There will be an ordering issue if we use both the legacy IPC and Mojo IPC. To avoid the ordering issue, this CL changes the FetchEvent IPC to use Mojo. BUG=629701, 649558 Committed: https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5 Cr-Commit-Position: refs/heads/master@{#422996}

Patch Set 1 #

Patch Set 2 : fix public_deps #

Total comments: 7

Patch Set 3 : incorporated shimazu's comment #

Patch Set 4 : Use EnumTraits #

Total comments: 6

Patch Set 5 : refine .typemap and BUILD.gn #

Patch Set 6 : rebase #

Total comments: 4

Patch Set 7 : pass the unretained raw pointer of |version_| to the callback #

Total comments: 8

Patch Set 8 : incorporated dcheng's comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+300 lines, -82 lines) Patch
M content/browser/service_worker/embedded_worker_test_helper.h View 1 2 3 4 5 6 7 7 chunks +17 lines, -6 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 4 5 10 chunks +57 lines, -18 lines 0 comments Download
M content/browser/service_worker/service_worker_fetch_dispatcher.cc View 1 2 3 4 5 6 7 3 chunks +20 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_url_request_job_unittest.cc View 1 2 3 4 5 6 7 12 chunks +24 lines, -33 lines 0 comments Download
M content/browser/service_worker/service_worker_version_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
A content/common/service_worker/fetch_event_dispatcher.mojom View 1 chunk +17 lines, -0 lines 0 comments Download
A content/common/service_worker/fetch_event_dispatcher.typemap View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 2 chunks +0 lines, -8 lines 0 comments Download
A content/common/service_worker/service_worker_status_code_traits.h View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_status_code_traits.cc View 1 2 3 1 chunk +51 lines, -0 lines 0 comments Download
M content/common/typemaps.gni View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 chunks +8 lines, -3 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 9 chunks +57 lines, -8 lines 0 comments Download

Messages

Total messages: 112 (90 generated)
horo
shimazu@ Could you please review this?
4 years, 3 months ago (2016-09-23 01:22:53 UTC) #52
shimazu
https://codereview.chromium.org/2352173004/diff/190001/content/browser/service_worker/embedded_worker_test_helper.h File content/browser/service_worker/embedded_worker_test_helper.h (right): https://codereview.chromium.org/2352173004/diff/190001/content/browser/service_worker/embedded_worker_test_helper.h#newcode66 content/browser/service_worker/embedded_worker_test_helper.h:66: base::Callback<void(blink::mojom::ServiceWorkerEventStatus, Now we can use EnumTraits<blink::mojom::ServiceWorkerEventStatus>. We already have ...
4 years, 3 months ago (2016-09-23 03:26:11 UTC) #53
horo
https://codereview.chromium.org/2352173004/diff/190001/content/browser/service_worker/embedded_worker_test_helper.h File content/browser/service_worker/embedded_worker_test_helper.h (right): https://codereview.chromium.org/2352173004/diff/190001/content/browser/service_worker/embedded_worker_test_helper.h#newcode66 content/browser/service_worker/embedded_worker_test_helper.h:66: base::Callback<void(blink::mojom::ServiceWorkerEventStatus, On 2016/09/23 03:26:11, shimazu wrote: > Now we ...
4 years, 3 months ago (2016-09-23 05:57:56 UTC) #58
shimazu
lgtm with a nit https://codereview.chromium.org/2352173004/diff/230001/content/common/service_worker/service_worker_status_code_traits.cc File content/common/service_worker/service_worker_status_code_traits.cc (right): https://codereview.chromium.org/2352173004/diff/230001/content/common/service_worker/service_worker_status_code_traits.cc#newcode27 content/common/service_worker/service_worker_status_code_traits.cc:27: return blink::mojom::ServiceWorkerEventStatus::ABORTED; Do we have ...
4 years, 3 months ago (2016-09-23 08:15:03 UTC) #63
horo
https://codereview.chromium.org/2352173004/diff/190001/content/browser/service_worker/embedded_worker_test_helper.h File content/browser/service_worker/embedded_worker_test_helper.h (right): https://codereview.chromium.org/2352173004/diff/190001/content/browser/service_worker/embedded_worker_test_helper.h#newcode66 content/browser/service_worker/embedded_worker_test_helper.h:66: base::Callback<void(blink::mojom::ServiceWorkerEventStatus, On 2016/09/23 05:57:56, horo wrote: > On 2016/09/23 ...
4 years, 3 months ago (2016-09-23 09:13:35 UTC) #64
horo
dcheng@ Could you please review content/common/service_worker/fetch_event_dispatcher.mojom
4 years, 3 months ago (2016-09-23 09:15:27 UTC) #66
shimazu
Sorry for late comment, but let me add some comments. https://codereview.chromium.org/2352173004/diff/230001/content/common/BUILD.gn File content/common/BUILD.gn (right): https://codereview.chromium.org/2352173004/diff/230001/content/common/BUILD.gn#newcode313 ...
4 years, 2 months ago (2016-09-27 01:01:07 UTC) #73
horo
Ah, I didn't know this. Thank you. https://codereview.chromium.org/2352173004/diff/230001/content/common/BUILD.gn File content/common/BUILD.gn (right): https://codereview.chromium.org/2352173004/diff/230001/content/common/BUILD.gn#newcode313 content/common/BUILD.gn:313: "service_worker/service_worker_status_code_traits.h", On ...
4 years, 2 months ago (2016-09-27 02:11:40 UTC) #74
horo
On 2016/09/23 09:15:27, horo wrote: > dcheng@ > Could you please review > content/common/service_worker/fetch_event_dispatcher.mojom Ping?
4 years, 2 months ago (2016-09-28 00:04:47 UTC) #79
horo
On 2016/09/28 00:04:47, horo wrote: > On 2016/09/23 09:15:27, horo wrote: > > dcheng@ > ...
4 years, 2 months ago (2016-09-29 23:50:47 UTC) #80
dcheng
Some initial comments. https://codereview.chromium.org/2352173004/diff/270001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://codereview.chromium.org/2352173004/diff/270001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode80 content/browser/service_worker/service_worker_fetch_dispatcher.cc:80: DCHECK(active_version); Why bind WeakPtr if we ...
4 years, 2 months ago (2016-09-30 08:54:43 UTC) #85
horo
https://codereview.chromium.org/2352173004/diff/270001/content/browser/service_worker/service_worker_fetch_dispatcher.cc File content/browser/service_worker/service_worker_fetch_dispatcher.cc (right): https://codereview.chromium.org/2352173004/diff/270001/content/browser/service_worker/service_worker_fetch_dispatcher.cc#newcode80 content/browser/service_worker/service_worker_fetch_dispatcher.cc:80: DCHECK(active_version); On 2016/09/30 08:54:43, dcheng wrote: > Why bind ...
4 years, 2 months ago (2016-10-03 02:30:57 UTC) #91
dcheng
mojo lgtm https://codereview.chromium.org/2352173004/diff/310001/content/browser/service_worker/embedded_worker_test_helper.h File content/browser/service_worker/embedded_worker_test_helper.h (right): https://codereview.chromium.org/2352173004/diff/310001/content/browser/service_worker/embedded_worker_test_helper.h#newcode245 content/browser/service_worker/embedded_worker_test_helper.h:245: std::map<int, int> thread_id_embedded_worker_id_map_; Nit: a comment here ...
4 years, 2 months ago (2016-10-04 07:19:53 UTC) #94
horo
Thank you! https://codereview.chromium.org/2352173004/diff/310001/content/browser/service_worker/embedded_worker_test_helper.h File content/browser/service_worker/embedded_worker_test_helper.h (right): https://codereview.chromium.org/2352173004/diff/310001/content/browser/service_worker/embedded_worker_test_helper.h#newcode245 content/browser/service_worker/embedded_worker_test_helper.h:245: std::map<int, int> thread_id_embedded_worker_id_map_; On 2016/10/04 07:19:53, dcheng ...
4 years, 2 months ago (2016-10-04 12:16:40 UTC) #97
horo
clamy@ Could you please review content/common/BUILD.gn?
4 years, 2 months ago (2016-10-04 12:17:13 UTC) #99
clamy
content/common/BUIL.gn lgtm
4 years, 2 months ago (2016-10-04 16:16:15 UTC) #102
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2352173004/330001
4 years, 2 months ago (2016-10-04 23:17:24 UTC) #105
commit-bot: I haz the power
Committed patchset #8 (id:330001)
4 years, 2 months ago (2016-10-04 23:24:12 UTC) #107
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/bdc8e1e4477f7dcd911528720a50d639be6d39b5 Cr-Commit-Position: refs/heads/master@{#422996}
4 years, 2 months ago (2016-10-04 23:25:46 UTC) #109
dcheng
A revert of this CL (patchset #8 id:330001) has been created in https://codereview.chromium.org/2399933003/ by dcheng@chromium.org. ...
4 years, 2 months ago (2016-10-06 18:15:35 UTC) #110
garykac
On 2016/10/04 23:25:46, commit-bot: I haz the power wrote: > Patchset 8 (id:??) landed as ...
4 years, 2 months ago (2016-10-06 18:18:01 UTC) #111
garykac
4 years, 2 months ago (2016-10-06 18:28:47 UTC) #112
Message was sent while issue was closed.
A revert of this CL (patchset #8 id:330001) has been created in
https://codereview.chromium.org/2394183003/ by garykac@chromium.org.

The reason for reverting is: Crashes in Canary: crbug.com/653403.

Powered by Google App Engine
This is Rietveld 408576698