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

Issue 1220943003: [Background Sync] Use Mojo IPC to fire background sync events (Closed)

Created:
5 years, 5 months ago by iclelland
Modified:
4 years, 11 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, horo+watch_chromium.org, jkarlin+watch_chromium.org, jsbell+serviceworker_chromium.org, kinuko+watch, kinuko+serviceworker, maniscalco+watch_chromium.org, maxbogue+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nhiroki, plaree+watch_chromium.org, pvalenzuela+watch_chromium.org, qsr+mojo_chromium.org, serviceworker-reviews, tim+watch_chromium.org, tzik, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, zea+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@mek
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Background Sync] Use Mojo IPC to fire background sync events This patch adds a background sync client service to the renderer process, which accepts connections from the browser, in order to trigger Sync and PeriodicSync events in the service worker. At the browser level, the Sync and PeriodicSync events are identical, so all of the code in this patch deals only with generic "Sync" events. (The code paths are the same, and the registration structs differ only in the periodicity value.) They only diverge in the renderer, once we determine which event in the service worker script proxy to fire. BUG=498388 Committed: https://crrev.com/77d52b2ac6ec76c56fc487c14dc405a083a23a28 Cr-Commit-Position: refs/heads/master@{#339874}

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : Rebase and remove IPC from unit tests #

Patch Set 4 : Rebase\ #

Patch Set 5 : Rebase after cr/1221503003 landed #

Total comments: 4

Patch Set 6 : Rebase after cr/1210643002 landed #

Patch Set 7 : Add connection error handler; make type converter safer. #

Total comments: 6

Patch Set 8 : Addressing post-lgtm review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+211 lines, -62 lines) Patch
M content/browser/service_worker/embedded_worker_test_helper.h View 1 2 3 2 chunks +0 lines, -2 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 3 chunks +0 lines, -15 lines 0 comments Download
M content/browser/service_worker/service_worker_registration_unittest.cc View 3 chunks +3 lines, -5 lines 0 comments Download
M content/browser/service_worker/service_worker_version.h View 1 2 3 4 5 6 7 4 chunks +5 lines, -3 lines 0 comments Download
M content/browser/service_worker/service_worker_version.cc View 1 2 3 4 5 6 8 chunks +25 lines, -14 lines 0 comments Download
M content/common/background_sync_service.mojom View 2 chunks +4 lines, -2 lines 0 comments Download
M content/common/service_worker/service_worker_messages.h View 1 2 3 4 5 2 chunks +0 lines, -5 lines 0 comments Download
A content/common/service_worker/service_worker_type_converters.h View 1 chunk +22 lines, -0 lines 0 comments Download
A content/common/service_worker/service_worker_type_converters.cc View 1 2 3 4 5 6 1 chunk +32 lines, -0 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_common_mojo_bindings.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/content_renderer.gypi View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/public/common/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A + content/public/common/service_worker_event_status.mojom View 1 chunk +7 lines, -6 lines 0 comments Download
A + content/renderer/background_sync/OWNERS View 0 chunks +-1 lines, --1 lines 0 comments Download
A + content/renderer/background_sync/PRESUBMIT.py View 1 chunk +1 line, -1 line 0 comments Download
A content/renderer/background_sync/background_sync_client_impl.h View 1 2 3 4 5 6 7 1 chunk +40 lines, -0 lines 0 comments Download
A content/renderer/background_sync/background_sync_client_impl.cc View 1 2 3 4 1 chunk +34 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 3 4 5 4 chunks +5 lines, -1 line 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 5 8 chunks +28 lines, -9 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 21 (5 generated)
iclelland
This CL has the same functionality as https://codereview.chromium.org/1171173002 but has been updated to depend on ...
5 years, 5 months ago (2015-07-03 13:17:12 UTC) #2
iclelland
I've updated this now that https://codereview.chromium.org/1221503003 has landed. It's still essentially a rework of https://codereview.chromium.org/1171173002, ...
5 years, 5 months ago (2015-07-17 16:03:34 UTC) #4
Marijn Kruisselbrink
https://codereview.chromium.org/1220943003/diff/80001/content/browser/service_worker/service_worker_version.cc File content/browser/service_worker/service_worker_version.cc (right): https://codereview.chromium.org/1220943003/diff/80001/content/browser/service_worker/service_worker_version.cc#newcode810 content/browser/service_worker/service_worker_version.cc:810: // https://codereview.chromium.org/1210643002 lands. In the last version of that ...
5 years, 5 months ago (2015-07-17 17:12:15 UTC) #5
iclelland
tsepez -- PTAL at the mojom files -- this code is a rework of https://codereview.chromium.org/1171173002, ...
5 years, 5 months ago (2015-07-20 16:06:16 UTC) #7
Marijn Kruisselbrink
lgtm https://codereview.chromium.org/1220943003/diff/120001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/1220943003/diff/120001/content/browser/service_worker/service_worker_version.h#newcode621 content/browser/service_worker/service_worker_version.h:621: BackgroundSyncServiceClientPtr background_sync_dispatcher_; Maybe keep the declaration of the ...
5 years, 5 months ago (2015-07-20 16:16:19 UTC) #8
jkarlin
content/renderer/background_sync lgtm https://codereview.chromium.org/1220943003/diff/120001/content/renderer/background_sync/background_sync_client_impl.h File content/renderer/background_sync/background_sync_client_impl.h (right): https://codereview.chromium.org/1220943003/diff/120001/content/renderer/background_sync/background_sync_client_impl.h#newcode8 content/renderer/background_sync/background_sync_client_impl.h:8: #include "base/memory/ref_counted.h" needed? https://codereview.chromium.org/1220943003/diff/120001/content/renderer/background_sync/background_sync_client_impl.h#newcode28 content/renderer/background_sync/background_sync_client_impl.h:28: // BackgroundSyncClient ...
5 years, 5 months ago (2015-07-20 17:17:26 UTC) #9
iclelland
https://codereview.chromium.org/1220943003/diff/120001/content/browser/service_worker/service_worker_version.h File content/browser/service_worker/service_worker_version.h (right): https://codereview.chromium.org/1220943003/diff/120001/content/browser/service_worker/service_worker_version.h#newcode621 content/browser/service_worker/service_worker_version.h:621: BackgroundSyncServiceClientPtr background_sync_dispatcher_; On 2015/07/20 16:16:19, Marijn Kruisselbrink wrote: > ...
5 years, 5 months ago (2015-07-20 18:05:21 UTC) #10
Tom Sepez
mojom lgtm
5 years, 5 months ago (2015-07-21 00:01:08 UTC) #11
michaeln
lgtm 2
5 years, 5 months ago (2015-07-21 00:21:16 UTC) #12
iclelland
jochen -- friendly bump ;) Thanks
5 years, 5 months ago (2015-07-22 02:09:34 UTC) #13
jochen (gone - plz use gerrit)
lgtm
5 years, 5 months ago (2015-07-22 09:41:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1220943003/140001
5 years, 5 months ago (2015-07-22 13:17:10 UTC) #17
commit-bot: I haz the power
Committed patchset #8 (id:140001)
5 years, 5 months ago (2015-07-22 14:16:07 UTC) #18
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/77d52b2ac6ec76c56fc487c14dc405a083a23a28 Cr-Commit-Position: refs/heads/master@{#339874}
5 years, 5 months ago (2015-07-22 14:17:01 UTC) #19
jam
I just saw this. why is content/public/common/service_worker_event_status.mojom in content/public/common instead of content/common? since it's not ...
4 years, 11 months ago (2016-01-26 22:53:04 UTC) #20
iclelland
4 years, 11 months ago (2016-01-26 22:57:58 UTC) #21
Message was sent while issue was closed.
Thanks John, I don't recall exactly why it ended up there, but you're
right, it doesn't belong.

We're doing a bunch of refactoring of the code this quarter, so I'll make
sure that gets moved.

On Tue, Jan 26, 2016 at 5:53 PM, <jam@chromium.org> wrote:

> I just saw this.
>
> why is  content/public/common/service_worker_event_status.mojom in
> content/public/common instead of content/common? since it's not used by
> anyone
> outside content, it should be in content/common.
>
> please move it, per
> https://www.chromium.org/developers/content-module/content-api
>
> https://codereview.chromium.org/1220943003/
>

-- 
You received this message because you are subscribed to the Google Groups
"Chromium-reviews" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698