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

Issue 1344843003: [BackgroundSync] Add browser side support for SyncRegistration.done (Closed)

Created:
5 years, 3 months ago by jkarlin
Modified:
5 years, 3 months ago
CC:
chromium-reviews, tim+watch_chromium.org, viettrungluu+watch_chromium.org, qsr+mojo_chromium.org, zea+watch_chromium.org, Aaron Boodman, maxbogue+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, pvalenzuela+watch_chromium.org, plaree+watch_chromium.org, jkarlin+watch_chromium.org, darin-cc_chromium.org, darin (slow to review), ben+mojo_chromium.org, kinuko+watch, blink-worker-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@ncn_max
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[BackgroundSync] Add browser side support for SyncRegistration.done This CL adds support for the "done" promise of background sync registrations. See http://slightlyoff.github.io/BackgroundSync/spec/index.html for more detail. Done resolves with true if the sync event fired successfully and false if it failed or is unregistered. Changes: 1. Add and test BackgroundSyncManager::NotifyWhenDone. 2. Plumb NotifyWhenDone to the child process. 3. Test with BrowserTests that done can be called before or after a registration completes. Depends on: https://codereview.chromium.org/1353613002/ https://codereview.chromium.org/1348603003/ BUG=502214 Committed: https://crrev.com/6da0b6f3b2159374954c9e77b5f5f468f901a0cb Cr-Commit-Position: refs/heads/master@{#349660}

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : Update unregister logic #

Patch Set 4 : Extract some of the changes to new CLs #

Total comments: 10

Patch Set 5 : Address comments from PS4 and and add UNREGISTERED_WHILE_FIRING state #

Patch Set 6 : state fix #

Patch Set 7 : Rebase #

Total comments: 11

Patch Set 8 : Address comments from PS7 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+727 lines, -14 lines) Patch
M content/browser/background_sync/background_sync_browsertest.cc View 1 2 3 3 chunks +96 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_manager.h View 1 3 chunks +14 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_manager.cc View 1 2 3 4 5 6 7 4 chunks +92 lines, -2 lines 0 comments Download
M content/browser/background_sync/background_sync_manager_unittest.cc View 1 2 3 4 2 chunks +222 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_registration.h View 1 2 3 4 3 chunks +12 lines, -2 lines 0 comments Download
M content/browser/background_sync/background_sync_registration.cc View 1 2 3 4 3 chunks +41 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_registration_handle.h View 1 2 3 4 5 6 7 3 chunks +12 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_registration_handle.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_service_impl.h View 2 chunks +5 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_service_impl.cc View 1 2 3 2 chunks +25 lines, -0 lines 0 comments Download
M content/browser/background_sync/background_sync_service_impl_unittest.cc View 6 chunks +56 lines, -5 lines 0 comments Download
M content/child/background_sync/background_sync_provider.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M content/child/background_sync/background_sync_provider.cc View 1 2 3 4 5 6 7 2 chunks +53 lines, -0 lines 0 comments Download
M content/child/background_sync/background_sync_provider_thread_proxy.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M content/child/background_sync/background_sync_provider_thread_proxy.cc View 1 chunk +14 lines, -0 lines 0 comments Download
M content/common/background_sync_service.mojom View 1 2 3 4 2 chunks +5 lines, -1 line 0 comments Download
M content/test/data/background_sync/background_sync_test_helpers.js View 1 3 chunks +40 lines, -2 lines 0 comments Download
M content/test/data/background_sync/service_worker.js View 1 2 3 4 5 6 7 4 chunks +21 lines, -2 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 23 (6 generated)
jkarlin
iclelland: PTAL at everything, thanks! michaeln: PTAL at everything, the registration handles are put to ...
5 years, 3 months ago (2015-09-15 15:57:53 UTC) #2
jkarlin
tsepez@chromium.org: Please review changes in the mojom file. Thanks!
5 years, 3 months ago (2015-09-15 15:58:31 UTC) #4
Tom Sepez
mojom LGTM
5 years, 3 months ago (2015-09-15 16:48:54 UTC) #5
jkarlin
PTAL, many thanks
5 years, 3 months ago (2015-09-16 18:49:39 UTC) #7
iclelland
On 2015/09/16 18:49:39, jkarlin wrote: > PTAL, many thanks At first glance, it seems like ...
5 years, 3 months ago (2015-09-16 20:36:53 UTC) #8
jkarlin
On 2015/09/16 20:36:53, iclelland wrote: > On 2015/09/16 18:49:39, jkarlin wrote: > > PTAL, many ...
5 years, 3 months ago (2015-09-17 00:49:10 UTC) #10
iclelland
LGTM! This is great (and much easier to follow now) I left a couple of ...
5 years, 3 months ago (2015-09-17 13:48:10 UTC) #11
jkarlin
https://codereview.chromium.org/1344843003/diff/100001/content/browser/background_sync/background_sync_manager.cc File content/browser/background_sync/background_sync_manager.cc (right): https://codereview.chromium.org/1344843003/diff/100001/content/browser/background_sync/background_sync_manager.cc#newcode1106 content/browser/background_sync/background_sync_manager.cc:1106: // if it was already out of retry attempts ...
5 years, 3 months ago (2015-09-17 17:40:25 UTC) #12
jkarlin
michaeln: PTAL, thank you.
5 years, 3 months ago (2015-09-17 18:02:34 UTC) #13
michaeln
lgtm but please see the comments about thread safety https://codereview.chromium.org/1344843003/diff/160001/content/browser/background_sync/background_sync_manager.h File content/browser/background_sync/background_sync_manager.h (right): https://codereview.chromium.org/1344843003/diff/160001/content/browser/background_sync/background_sync_manager.h#newcode249 content/browser/background_sync/background_sync_manager.h:249: ...
5 years, 3 months ago (2015-09-17 21:44:12 UTC) #14
jkarlin
Thanks! https://codereview.chromium.org/1344843003/diff/160001/content/browser/background_sync/background_sync_manager.h File content/browser/background_sync/background_sync_manager.h (right): https://codereview.chromium.org/1344843003/diff/160001/content/browser/background_sync/background_sync_manager.h#newcode249 content/browser/background_sync/background_sync_manager.h:249: // BackgroundSyncRegistrationHandle::NotifyWhenDone for detailed On 2015/09/17 21:44:12, michaeln ...
5 years, 3 months ago (2015-09-18 12:03:20 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1344843003/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1344843003/180001
5 years, 3 months ago (2015-09-18 13:50:09 UTC) #18
commit-bot: I haz the power
Committed patchset #8 (id:180001)
5 years, 3 months ago (2015-09-18 13:55:25 UTC) #19
commit-bot: I haz the power
Patchset 8 (id:??) landed as https://crrev.com/6da0b6f3b2159374954c9e77b5f5f468f901a0cb Cr-Commit-Position: refs/heads/master@{#349660}
5 years, 3 months ago (2015-09-18 13:56:03 UTC) #20
michaeln
https://codereview.chromium.org/1344843003/diff/160001/content/child/background_sync/background_sync_provider_thread_proxy.cc File content/child/background_sync/background_sync_provider_thread_proxy.cc (right): https://codereview.chromium.org/1344843003/diff/160001/content/child/background_sync/background_sync_provider_thread_proxy.cc#newcode216 content/child/background_sync/background_sync_provider_thread_proxy.cc:216: blink::WebSyncNotifyWhenDoneCallbacks* callbacks) { > Yes, good catch. chasej@ is ...
5 years, 3 months ago (2015-09-18 19:18:52 UTC) #21
jkarlin
On 2015/09/18 19:18:52, michaeln wrote: > https://codereview.chromium.org/1344843003/diff/160001/content/child/background_sync/background_sync_provider_thread_proxy.cc > File content/child/background_sync/background_sync_provider_thread_proxy.cc > (right): > > https://codereview.chromium.org/1344843003/diff/160001/content/child/background_sync/background_sync_provider_thread_proxy.cc#newcode216 ...
5 years, 3 months ago (2015-09-21 13:28:39 UTC) #22
jkarlin
5 years, 3 months ago (2015-09-23 17:01:02 UTC) #23
Message was sent while issue was closed.
On 2015/09/21 13:28:39, jkarlin wrote:
> On 2015/09/18 19:18:52, michaeln wrote:
> >
>
https://codereview.chromium.org/1344843003/diff/160001/content/child/backgrou...
> > File content/child/background_sync/background_sync_provider_thread_proxy.cc
> > (right):
> > 
> >
>
https://codereview.chromium.org/1344843003/diff/160001/content/child/backgrou...
> > content/child/background_sync/background_sync_provider_thread_proxy.cc:216:
> > blink::WebSyncNotifyWhenDoneCallbacks* callbacks) {
> > > Yes, good catch. chasej@ is making good headway into the mojo-per-thread
CL.
> > 
> > Glad to hear that. I hope it helps to establish safe best practices for
using
> > mojo in workers. Its just so easy to get introduce threading bugs, having a
> good
> > example w/o bugs to follow will be nice.
> > 
> > Can you point me at a cl or other artifacts of work in progress?
> 
> https://code.google.com/p/chromium/issues/detail?id=527601 is the bug, no CL
up
> for review yet. Last Thursday Jason mentioned that he figured out how to do it
> cleanly so I expect a CL in the near future.

https://codereview.chromium.org/1358063004/ is the WIP CL.

Powered by Google App Engine
This is Rietveld 408576698