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

Issue 2767093004: Implement the BackgroundFetch{Fail,ed} Service Worker events (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, darin-cc_chromium.org, harkness+watch_chromium.org, blink-worker-reviews_chromium.org, mlamouri+watch-content_chromium.org, Peter Beverloo, nhiroki, asvitkine+watch_chromium.org, michaeln, shimazu+serviceworker_chromium.org, serviceworker-reviews, Aaron Boodman, kinuko+serviceworker, horo+watch_chromium.org, darin (slow to review)
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement the BackgroundFetch{Fail,ed} Service Worker events This CL implements the two final events part of the Background Fetch API: backgroundfetchfail and backgroundfetched. They'll be dispatched from the BackgroundFetchEventDispatcher, through the ServiceWorkerEventDispatcher, to the renderer, where they'll run. The BackgroundFetchSettledFetch structure has been defined in the SWEventDispatcher's mojom file, but will move to its more appropriate location in Blink when the ServiceWorkerFetchRequest/Response types have been migrated to Mojo proper. This is in-progress. BUG=692534, 692581 Review-Url: https://codereview.chromium.org/2767093004 Cr-Commit-Position: refs/heads/master@{#459469} Committed: https://chromium.googlesource.com/chromium/src/+/4b613c4cd7c83a70d4f176bcb6394b2a800bbd4d

Patch Set 1 #

Patch Set 2 : Implement the BackgroundFetch{Fail,ed} Service Worker events #

Patch Set 3 : add missing file #

Patch Set 4 : add missing uma #

Total comments: 9

Patch Set 5 : Implement the BackgroundFetch{Fail,ed} Service Worker events #

Patch Set 6 : forward declare the data view #

Unified diffs Side-by-side diffs Delta from patch set Stats (+831 lines, -47 lines) Patch
M content/browser/background_fetch/background_fetch_event_dispatcher.h View 4 chunks +30 lines, -3 lines 0 comments Download
M content/browser/background_fetch/background_fetch_event_dispatcher.cc View 2 chunks +56 lines, -0 lines 0 comments Download
M content/browser/background_fetch/background_fetch_event_dispatcher_unittest.cc View 1 4 chunks +162 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.h View 3 chunks +21 lines, -0 lines 0 comments Download
M content/browser/service_worker/embedded_worker_test_helper.cc View 1 4 chunks +56 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_metrics.cc View 3 chunks +16 lines, -0 lines 0 comments Download
M content/common/background_fetch/background_fetch_struct_traits.h View 1 2 3 4 5 2 chunks +23 lines, -0 lines 0 comments Download
M content/common/background_fetch/background_fetch_struct_traits.cc View 1 2 3 4 5 2 chunks +11 lines, -0 lines 0 comments Download
M content/common/background_fetch/background_fetch_types.h View 2 chunks +13 lines, -0 lines 0 comments Download
M content/common/background_fetch/background_fetch_types.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M content/common/background_fetch/background_fetch_types.typemap View 1 chunk +1 line, -0 lines 0 comments Download
M content/common/service_worker/service_worker_event_dispatcher.mojom View 1 2 chunks +18 lines, -0 lines 0 comments Download
M content/common/service_worker/service_worker_event_dispatcher.typemap View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.h View 1 2 chunks +14 lines, -0 lines 0 comments Download
M content/renderer/service_worker/service_worker_context_client.cc View 1 2 3 4 9 chunks +152 lines, -28 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.h View 1 3 chunks +22 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchFailEvent.cpp View 1 1 chunk +23 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.h View 1 3 chunks +19 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/modules/background_fetch/BackgroundFetchedEvent.cpp View 1 1 chunk +25 lines, -4 lines 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 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 +15 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp View 1 2 3 4 2 chunks +46 lines, -0 lines 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/background_fetch/WebBackgroundFetchSettledFetch.h View 1 2 3 4 1 chunk +27 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextClient.h View 1 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/modules/serviceworker/WebServiceWorkerContextProxy.h View 1 2 chunks +9 lines, -1 line 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 3 chunks +22 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 31 (17 generated)
Peter Beverloo
+shimazu for Service Workers (2 new events) +haraken for Source/Web/ +tsepez for Mojo additions Note ...
3 years, 9 months ago (2017-03-23 20:03:40 UTC) #8
Ilya Sherman
Metrics LGTM, thanks.
3 years, 9 months ago (2017-03-23 20:08:42 UTC) #9
Tom Sepez
lgtm
3 years, 9 months ago (2017-03-23 20:40:27 UTC) #12
shimazu
Just one comment: https://codereview.chromium.org/2767093004/diff/60001/content/renderer/service_worker/service_worker_context_client.cc File content/renderer/service_worker/service_worker_context_client.cc (right): https://codereview.chromium.org/2767093004/diff/60001/content/renderer/service_worker/service_worker_context_client.cc#newcode223 content/renderer/service_worker/service_worker_context_client.cc:223: // response_time Could you set the ...
3 years, 9 months ago (2017-03-24 00:19:27 UTC) #13
Peter Beverloo
https://codereview.chromium.org/2767093004/diff/60001/content/renderer/service_worker/service_worker_context_client.cc File content/renderer/service_worker/service_worker_context_client.cc (right): https://codereview.chromium.org/2767093004/diff/60001/content/renderer/service_worker/service_worker_context_client.cc#newcode223 content/renderer/service_worker/service_worker_context_client.cc:223: // response_time On 2017/03/24 00:19:27, shimazu wrote: > Could ...
3 years, 9 months ago (2017-03-24 00:55:16 UTC) #14
haraken
WebKit LGTM https://codereview.chromium.org/2767093004/diff/60001/third_party/WebKit/public/platform/modules/background_fetch/WebBackgroundFetchSettledFetch.h File third_party/WebKit/public/platform/modules/background_fetch/WebBackgroundFetchSettledFetch.h (right): https://codereview.chromium.org/2767093004/diff/60001/third_party/WebKit/public/platform/modules/background_fetch/WebBackgroundFetchSettledFetch.h#newcode14 third_party/WebKit/public/platform/modules/background_fetch/WebBackgroundFetchSettledFetch.h:14: // Represents a request/response pair for a ...
3 years, 9 months ago (2017-03-24 02:15:40 UTC) #15
kinuko
drive-by lgtm (trying to capture what's happening around) https://codereview.chromium.org/2767093004/diff/60001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp File third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp (right): https://codereview.chromium.org/2767093004/diff/60001/third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp#newcode165 third_party/WebKit/Source/web/ServiceWorkerGlobalScopeProxy.cpp:165: workerGlobalScope()->scriptController()->getScriptState(); ...
3 years, 9 months ago (2017-03-24 03:40:03 UTC) #17
kinuko
On 2017/03/24 03:40:03, kinuko wrote: > drive-by lgtm (trying to capture what's happening around) (After ...
3 years, 9 months ago (2017-03-24 03:40:24 UTC) #18
kinuko
https://codereview.chromium.org/2767093004/diff/60001/content/renderer/service_worker/service_worker_context_client.cc File content/renderer/service_worker/service_worker_context_client.cc (right): https://codereview.chromium.org/2767093004/diff/60001/content/renderer/service_worker/service_worker_context_client.cc#newcode201 content/renderer/service_worker/service_worker_context_client.cc:201: blink::WebServiceWorkerResponse* web_response) { How long do you expect before ...
3 years, 9 months ago (2017-03-24 04:04:00 UTC) #19
Peter Beverloo
Thank you - all done! I'll put this on the CQ. Happy to migrate CacheStorageDispatcher::PopulateWebResponseFromResonse ...
3 years, 9 months ago (2017-03-24 14:11:09 UTC) #20
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/2767093004/80001
3 years, 9 months ago (2017-03-24 14:11:38 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: win_clang on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_clang/builds/193731)
3 years, 9 months ago (2017-03-24 14:56:47 UTC) #25
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/2767093004/100001
3 years, 9 months ago (2017-03-24 16:00:15 UTC) #28
commit-bot: I haz the power
3 years, 9 months ago (2017-03-24 17:40:27 UTC) #31
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/4b613c4cd7c83a70d4f176bcb639...

Powered by Google App Engine
This is Rietveld 408576698