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

Issue 2748213003: Service Worker event dispatcher for Background Fetch (Closed)

Created:
3 years, 9 months ago by Peter Beverloo
Modified:
3 years, 9 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, kinuko+watch, jsbell+serviceworker_chromium.org, awdf+watch_chromium.org, tzik, jam, abarth-chromium, dglazkov+blink, darin-cc_chromium.org, blink-reviews, falken+watch_chromium.org, harkness+watch_chromium.org, blink-reviews-api_chromium.org, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, nhiroki, michaeln, shimazu+serviceworker_chromium.org, serviceworker-reviews, Aaron Boodman, kinuko+serviceworker, horo+watch_chromium.org, darin (slow to review)
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Service Worker event dispatcher for Background Fetch This CL implements the BackgroundFetchEventDispatcher and teaches it to dispatch abort and click events. It then plumbs all the way down to Blink to do so, after which it feeds back the result to the caller. The `backgroundfetched` and `backgroundfetchfail` events rely on the Request and Response objects to be available through Mojo; they will follow in a subsequent CL. TBR=avi (new file listed in BUILD.gn) BUG=692534, 692581 Review-Url: https://codereview.chromium.org/2748213003 Cr-Commit-Position: refs/heads/master@{#457989} Committed: https://chromium.googlesource.com/chromium/src/+/ef079770a54afefdb2248ad47143a216f8f6ed85

Patch Set 1 #

Patch Set 2 : Service Worker event dispatcher for Background Fetch #

Total comments: 29

Patch Set 3 : Service Worker event dispatcher for Background Fetch #

Patch Set 4 : Service Worker event dispatcher for Background Fetch #

Total comments: 2

Patch Set 5 : Service Worker event dispatcher for Background Fetch #

Patch Set 6 : uma fix #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1070 lines, -14 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A content/browser/background_fetch/background_fetch_event_dispatcher.h View 1 2 3 4 1 chunk +119 lines, -0 lines 0 comments Download
A content/browser/background_fetch/background_fetch_event_dispatcher.cc View 1 2 3 4 5 1 chunk +194 lines, -0 lines 2 comments Download
A content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc View 1 2 3 4 1 chunk +316 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.h View 2 chunks +18 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 2 3 4 3 chunks +53 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.cc View 1 2 3 4 3 chunks +16 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_event_dispatcher.mojom View 2 chunks +12 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 5 chunks +66 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_type_converters.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_type_converters.cc View 1 1 chunk +19 lines, -1 line 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.h View 3 chunks +15 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchClickEvent.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.h View 3 chunks +13 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchEvent.cpp View 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScopeClient.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h View 1 chunk +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.cpp View 1 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeClientImpl.cpp View 1 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h View 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 2 chunks +47 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h View 1 1 chunk +12 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h View 1 chunk +10 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 chunks +81 lines, -0 lines 0 comments Download

Messages

Total messages: 45 (27 generated)
Peter Beverloo
+harkness for background fetch bits +horo for Service Workers plumbing +isherman for UMA Notably, see ...
3 years, 9 months ago (2017-03-15 16:24:59 UTC) #5
Tom Sepez
mojom LGTM.
3 years, 9 months ago (2017-03-15 17:39:17 UTC) #6
Ilya Sherman
https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.cc File content/browser/background_fetch/background_fetch_event_dispatcher.cc (right): https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.cc#newcode38 content/browser/background_fetch/background_fetch_event_dispatcher.cc:38: base::StringPrintf("BackgroundFetch.EventDispatchResult.%s", nit: I'm pretty sure that returning an std::string ...
3 years, 9 months ago (2017-03-16 03:58:50 UTC) #9
horo
https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.cc File content/browser/background_fetch/background_fetch_event_dispatcher.cc (right): https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.cc#newcode128 content/browser/background_fetch/background_fetch_event_dispatcher.cc:128: service_worker_context_->FindReadyRegistrationForIdOnly( Can you use FindReadyRegistrationForId instead? FindReadyRegistrationForId is more ...
3 years, 9 months ago (2017-03-16 07:08:22 UTC) #10
Peter Beverloo
https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.cc File content/browser/background_fetch/background_fetch_event_dispatcher.cc (right): https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.cc#newcode38 content/browser/background_fetch/background_fetch_event_dispatcher.cc:38: base::StringPrintf("BackgroundFetch.EventDispatchResult.%s", On 2017/03/16 03:58:50, Ilya Sherman wrote: > nit: ...
3 years, 9 months ago (2017-03-16 16:05:59 UTC) #11
harkness
LGTM https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.h File content/browser/background_fetch/background_fetch_event_dispatcher.h (right): https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.h#newcode71 content/browser/background_fetch/background_fetch_event_dispatcher.h:71: base::Closure finished_closure, nit: error_closure? "finished" is harder to ...
3 years, 9 months ago (2017-03-16 17:42:18 UTC) #18
Ilya Sherman
https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.h File content/browser/background_fetch/background_fetch_event_dispatcher.h (right): https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.h#newcode35 content/browser/background_fetch/background_fetch_event_dispatcher.h:35: DISPATCH_RESULT_MAX = DISPATCH_RESULT_CANNOT_DISPATCH_EVENT On 2017/03/16 16:05:58, Peter Beverloo wrote: ...
3 years, 9 months ago (2017-03-16 22:36:02 UTC) #21
Ilya Sherman
Metrics LGTM with the below comments resolved. On 2017/03/16 22:36:02, Ilya Sherman wrote: > https://codereview.chromium.org/2748213003/diff/20001/content/browser/background_fetch/background_fetch_event_dispatcher.h ...
3 years, 9 months ago (2017-03-16 22:53:21 UTC) #22
horo
lgtm
3 years, 9 months ago (2017-03-17 02:22:07 UTC) #23
haraken
WebKit LGTM
3 years, 9 months ago (2017-03-17 11:44:51 UTC) #24
Peter Beverloo
Thanks all! TBR=avi for a new file in the background fetch directory. (I'll separately send ...
3 years, 9 months ago (2017-03-17 13:43:28 UTC) #27
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/2748213003/80001
3 years, 9 months ago (2017-03-17 13:43:54 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/409199)
3 years, 9 months ago (2017-03-17 13:54:43 UTC) #32
Peter Beverloo
Ilya - mind taking another look? https://codereview.chromium.org/2748213003/diff/100001/content/browser/background_fetch/background_fetch_event_dispatcher.cc File content/browser/background_fetch/background_fetch_event_dispatcher.cc (right): https://codereview.chromium.org/2748213003/diff/100001/content/browser/background_fetch/background_fetch_event_dispatcher.cc#newcode56 content/browser/background_fetch/background_fetch_event_dispatcher.cc:56: SERVICE_WORKER_ERROR_MAX_VALUE); isherman@ - ...
3 years, 9 months ago (2017-03-17 14:17:01 UTC) #33
Avi (use Gerrit)
lgtm build stamp
3 years, 9 months ago (2017-03-17 16:37:52 UTC) #38
Ilya Sherman
Metrics LGTM, thanks for double-checking and clarifying. https://codereview.chromium.org/2748213003/diff/100001/content/browser/background_fetch/background_fetch_event_dispatcher.cc File content/browser/background_fetch/background_fetch_event_dispatcher.cc (right): https://codereview.chromium.org/2748213003/diff/100001/content/browser/background_fetch/background_fetch_event_dispatcher.cc#newcode56 content/browser/background_fetch/background_fetch_event_dispatcher.cc:56: SERVICE_WORKER_ERROR_MAX_VALUE); On ...
3 years, 9 months ago (2017-03-17 19:52:08 UTC) #39
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/2748213003/100001
3 years, 9 months ago (2017-03-19 01:58:53 UTC) #42
commit-bot: I haz the power
3 years, 9 months ago (2017-03-19 04:08:09 UTC) #45
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ef079770a54afefdb2248ad47143...

Powered by Google App Engine
This is Rietveld 408576698