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

Issue 2521793004: service worker: Persist NavigationPreloadState (Closed)

Created:
4 years, 1 month ago by falken
Modified:
4 years ago
Reviewers:
horo
CC:
chromium-reviews, michaeln, jsbell+serviceworker_chromium.org, kenjibaheux+watch_chromium.org, shimazu+serviceworker_chromium.org, serviceworker-reviews, jam, nhiroki, kinuko+serviceworker, horo+watch_chromium.org, blink-reviews, darin-cc_chromium.org, kinuko+watch, tzik, falken+watch_chromium.org, blink-worker-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

service worker: Persist NavigationPreloadState This writes NPS to storage. NPS is included as a field in ServiceWorkerRegistration. I was previously considering how to handle writing to storage before an active worker exists (and hence before a SWRegistration exists in storage), but the spec discussion is converging on requiring an active worker so this should be sufficient. BUG=649558 Committed: https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb Cr-Commit-Position: refs/heads/master@{#434411}

Patch Set 1 #

Total comments: 4

Patch Set 2 : add test and comment #

Total comments: 3

Patch Set 3 : expect_ name #

Unified diffs Side-by-side diffs Delta from patch set Stats (+491 lines, -74 lines) Patch
M content/browser/service_worker/service_worker_browsertest.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/service_worker/service_worker_database.h View 4 chunks +13 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.cc View 3 chunks +61 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_database.proto View 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.h View 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_dispatcher_host.cc View 1 7 chunks +74 lines, -10 lines 0 comments Download
M content/browser/service_worker/service_worker_info.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.h View 1 chunk +2 lines, -6 lines 0 comments Download
M content/browser/service_worker/service_worker_registration.cc View 2 chunks +0 lines, -4 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.h View 1 chunk +11 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage.cc View 4 chunks +48 lines, -0 lines 0 comments Download
M content/browser/service_worker/service_worker_storage_unittest.cc View 5 chunks +141 lines, -22 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/get-state.html View 1 2 12 chunks +75 lines, -31 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/wait-for-activate-worker.js View 1 2 1 chunk +40 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (16 generated)
falken
ptal
4 years, 1 month ago (2016-11-22 05:33:46 UTC) #3
horo
https://codereview.chromium.org/2521793004/diff/1/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/2521793004/diff/1/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode713 content/browser/service_worker/service_worker_dispatcher_host.cc:713: if (!registration->active_version()) { Please add comment about this behavior ...
4 years, 1 month ago (2016-11-22 14:28:23 UTC) #7
falken
Thanks. https://codereview.chromium.org/2521793004/diff/1/content/browser/service_worker/service_worker_dispatcher_host.cc File content/browser/service_worker/service_worker_dispatcher_host.cc (right): https://codereview.chromium.org/2521793004/diff/1/content/browser/service_worker/service_worker_dispatcher_host.cc#newcode713 content/browser/service_worker/service_worker_dispatcher_host.cc:713: if (!registration->active_version()) { On 2016/11/22 14:28:23, horo wrote: ...
4 years ago (2016-11-24 07:10:00 UTC) #9
horo
lgtm with a nit. https://codereview.chromium.org/2521793004/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js (right): https://codereview.chromium.org/2521793004/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js#newcode1 third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js:1: function expect_state(state, enabled, header, desc) ...
4 years ago (2016-11-24 08:59:46 UTC) #12
falken
Thanks. https://codereview.chromium.org/2521793004/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js File third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js (right): https://codereview.chromium.org/2521793004/diff/40001/third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js#newcode1 third_party/WebKit/LayoutTests/http/tests/serviceworker/navigation-preload/resources/helpers.js:1: function expect_state(state, enabled, header, desc) { On 2016/11/24 ...
4 years ago (2016-11-24 13:36:24 UTC) #15
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/2521793004/60001
4 years ago (2016-11-24 13:37:14 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/344231)
4 years ago (2016-11-24 15:27:28 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/2521793004/60001
4 years ago (2016-11-24 22:40:09 UTC) #22
commit-bot: I haz the power
Committed patchset #3 (id:60001)
4 years ago (2016-11-25 00:06:22 UTC) #24
commit-bot: I haz the power
4 years ago (2016-11-25 00:09:07 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/92636463938f6dafce67b97a884d2cb11f27a2cb
Cr-Commit-Position: refs/heads/master@{#434411}

Powered by Google App Engine
This is Rietveld 408576698