New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 675540 link

Starred by 17 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 678905



Sign in to add a comment

Implement updateViaCache flag and cache imports only by default for service worker scripts

Project Member Reported by falken@chromium.org, Dec 19 2016

Issue description

Comment 1 by n...@fb.com, Dec 19 2016

Labels: DevRel-Facebook

Comment 2 by falken@chromium.org, Jan 10 2017

Labels: -Pri-3 M-58 Pri-2
Firefox 53 will have this (stable in April). We could match by landing in M58.

Comment 3 by falken@chromium.org, Feb 16 2017

Labels: WorkerPainPoint
Cc: nhiroki@chromium.org
Owner: yuryu@chromium.org
Status: Assigned (was: Available)
yuryu@ is now planning to work on this.
The entry on chromestatus: https://www.chromestatus.com/feature/6059838387781632
Status: Started (was: Assigned)
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/420b56c73fae6392e98998f0588af0f54d79436d

commit 420b56c73fae6392e98998f0588af0f54d79436d
Author: mike <mike@mikepennisi.com>
Date: Fri Mar 24 20:31:33 2017

Upstream service worker `claim` tests to WPT

BUG= 688116 ,  675540 
R=falken@chromium.org

Review-Url: https://codereview.chromium.org/2763123002
Cr-Commit-Position: refs/heads/master@{#459538}

[modify] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-not-using-registration.https.html
[modify] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-using-registration.https.html
[rename] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/claim-with-redirect.https.html
[copy] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/claim-with-redirect-iframe.html
[add] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/update-claim-worker.py
[copy] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/claim-with-redirect.html
[rename] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/claim-with-redirect-iframe.html
[add] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/redirect.php
[rename] https://crrev.com/420b56c73fae6392e98998f0588af0f54d79436d/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/resources/update-claim-worker.php
[delete] https://crrev.com/22f8c680aa180e30b0bb41ecbd6a38af2eccad7a/third_party/WebKit/LayoutTests/http/tests/serviceworker/claim-not-using-registration.html
[delete] https://crrev.com/22f8c680aa180e30b0bb41ecbd6a38af2eccad7a/third_party/WebKit/LayoutTests/http/tests/serviceworker/claim-using-registration.html

Comment 8 by falken@chromium.org, Jun 13 2017

FYI: web-platform-tests are being written here:
https://github.com/w3c/web-platform-tests/pull/5515

For implementing, you should be able to test against these tests once they land (they will get imported into the directory third_party/LayoutTests/external/wpt/service-workers/service-worker)

Comment 9 by yuryu@chromium.org, Jun 13 2017

Summary: Implement updateViaCache flag and cache imports only by default for service worker scripts (was: Implement useCache flag and no-cache by default for service worker scripts)
Labels: -M-58
Project Member

Comment 11 by bugdroid1@chromium.org, Jul 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/85a04df639d3e3c05220e7bdb311b05a9470e0f1

commit 85a04df639d3e3c05220e7bdb311b05a9470e0f1
Author: yuryu <yuryu@chromium.org>
Date: Mon Jul 10 10:43:06 2017

Introduce ServiceWorkerRegistrationOptions struct for service worker options

This patch introduces ServiceWorkerRegistrationOptions struct to
the ServiceWorkerRegistration IPC message. The service worker spec has
a couple of options that need to be passed between the browser and blink.
It allows future implementation of other options, as currently
ServiceWorkerRegistration has the maximum number of arguments.

BUG= 675540 

Review-Url: https://codereview.chromium.org/2968123002
Cr-Commit-Position: refs/heads/master@{#485227}

[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/chrome/browser/android/webapps/add_to_homescreen_data_fetcher_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/background_fetch/background_fetch_test_base.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/background_sync/background_sync_service_impl_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/notifications/platform_notification_context_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/foreign_fetch_request_handler_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/link_header_support_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_context_core.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_context_core.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_context_request_handler_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_context_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_data_pipe_reader_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_dispatcher_host.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_dispatcher_host.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_handle_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_job_coordinator.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_job_coordinator.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_provider_host_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_register_job.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_registration_handle.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_version_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/child/service_worker/service_worker_dispatcher.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/child/service_worker/service_worker_registration_handle_reference.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/common/service_worker/service_worker_messages.h
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/common/service_worker/service_worker_types.cc
[modify] https://crrev.com/85a04df639d3e3c05220e7bdb311b05a9470e0f1/content/common/service_worker/service_worker_types.h

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f47e86d3b1166586f5e2cae798edeaad37910979

commit f47e86d3b1166586f5e2cae798edeaad37910979
Author: Emma Haruka Iwao <yuryu@chromium.org>
Date: Tue Nov 14 21:36:44 2017

Implement service worker updateViaCache interface in Blink

updateViaCache is an attribute on ServiceWorkerRegistration that
controls whether the browser cache (the HTTP cache) is used when
performing an update check.

Using Cache-control: no-cache or max-age: 0 on their service worker
script resources has been a best practice among developers in order to
detect script updates. The spec is updated to reflect this practice and
now includes a new parameter, updateViaCache for cache control for
service worker registrations.

This patch implements the interface in blink.

Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/RwjXGTAbuuA/7Q3NPlJ4BAAJ
Split from the original patch: https://chromium-review.googlesource.com/c/chromium/src/+/618076

Bug:  675540 
Change-Id: Ia36b2a813f70ccc9ee1a99530926ab6e78d76357
Reviewed-on: https://chromium-review.googlesource.com/752703
Commit-Queue: Emma Haruka Iwao <yuryu@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516435}
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/interfaces-sw.https-expected.txt
[delete] https://crrev.com/411ba939f5619378bfcedf0eefc2d646a2573a86/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/interfaces-window.https-expected.txt
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-updateviacache.https-expected.txt
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/interfaces-idls.js
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/core/html/HTMLLinkElement.idl
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/RegistrationOptions.idl
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.h
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerLinkResource.cpp
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.idl
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/Source/platform/runtime_enabled_features.json5
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[modify] https://crrev.com/f47e86d3b1166586f5e2cae798edeaad37910979/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 13 by bugdroid1@chromium.org, Dec 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/bc30210a545fe367ecb64129f504c971bd71e1b7

commit bc30210a545fe367ecb64129f504c971bd71e1b7
Author: Emma Haruka Iwao <yuryu@chromium.org>
Date: Tue Dec 05 02:33:08 2017

Add ServiceWorkerUpdateViaCache to mojom::ServiceWorkerRegistrationOptions

This patch adds updateViaCache to ServiceWorkerRegistrationOptions
struct in mojom and ServiceWorkerContext.

Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/RwjXGTAbuuA/7Q3NPlJ4BAAJ
Split from the original patch: https://chromium-review.googlesource.com/c/chromium/src/+/618076

Bug:  675540 
Change-Id: I199357745605ebf43a82adfd30b2fbfd5e18e4b4
Reviewed-on: https://chromium-review.googlesource.com/792810
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521595}
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/chrome/browser/chrome_service_worker_browsertest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/background_fetch/background_fetch_test_base.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/background_sync/background_sync_manager_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/background_sync/background_sync_service_impl_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/browsing_data/clear_site_data_throttle_browsertest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/notifications/platform_notification_context_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/payments/payment_app_content_unittest_base.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/embedded_worker_instance_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_browsertest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_context_request_handler_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_context_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_context_watcher_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_context_wrapper.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_context_wrapper.h
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_controllee_request_handler_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_data_pipe_reader_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_dispatcher_host_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_handle_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_installed_scripts_sender_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_provider_host_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_read_from_cache_job_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_script_url_loader_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_storage_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_url_loader_job_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_url_request_job_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_version_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/browser/service_worker/service_worker_write_to_cache_job_unittest.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/public/browser/service_worker_context.h
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/public/test/fake_service_worker_context.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/public/test/fake_service_worker_context.h
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/renderer/service_worker/web_service_worker_provider_impl.cc
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/content/renderer/service_worker/web_service_worker_provider_impl.h
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainer.cpp
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerContainerTest.cpp
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerProvider.h
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h
[modify] https://crrev.com/bc30210a545fe367ecb64129f504c971bd71e1b7/third_party/WebKit/public/platform/modules/serviceworker/service_worker_registration.mojom

Project Member

Comment 14 by bugdroid1@chromium.org, Jan 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/04f0f00fed84e150e24519510119424b9fbd41f3

commit 04f0f00fed84e150e24519510119424b9fbd41f3
Author: Emma Haruka Iwao <yuryu@chromium.org>
Date: Tue Jan 23 16:07:32 2018

Implement updateViaCache in service workers

updateViaCache is an attribute on ServiceWorkerRegistration that
controls whether the browser cache (the HTTP cache) is used when
performing an update check.

This patch persists the updateViaCache value into service worker
registration storage, and makes the service worker update check
take the value into account. Since the default value of
updateViaCache is 'imports', this makes it so the update check
bypasses the cache for the main script by default.

Intent to implement and ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/RwjXGTAbuuA/7Q3NPlJ4BAAJ
Migrated from original Rietveld codereview: https://codereview.chromium.org/2771823002/

Bug:  675540 
Change-Id: Ib8efcce0220d394ee254ff221bb844eccf596b51
Reviewed-on: https://chromium-review.googlesource.com/618076
Commit-Queue: Emma Haruka Iwao <yuryu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531252}
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_context_request_handler.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_context_request_handler_unittest.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_context_unittest.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_database.h
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_database.proto
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_database_unittest.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_info.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_info.h
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_job_unittest.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_provider_host.h
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_register_job.h
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_storage.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/browser/service_worker/service_worker_write_to_cache_job.h
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/content/renderer/service_worker/web_service_worker_registration_impl.h
[delete] https://crrev.com/97b6d97173a5445ac037604e0435759676f2d275/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-updateviacache.https-expected.txt
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium.update-served-from-cache.html
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/test-helpers.js
[modify] https://crrev.com/04f0f00fed84e150e24519510119424b9fbd41f3/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerRegistration.h

Cc: yuryu@chromium.org
Owner: leon....@intel.com
Project Member

Comment 16 by bugdroid1@chromium.org, May 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/774147f892bb972fd5b4cf743760fc02575fc9bd

commit 774147f892bb972fd5b4cf743760fc02575fc9bd
Author: Han Leon <leon.han@intel.com>
Date: Sun May 13 12:22:54 2018

[ServiceWorker] Propagate change for ServiceWorkerRegistration#updateViaCache

This CL propagates change of registration's `updateViaCache` to
corresponding registration objects in the renderer process to set their
ServiceWorkerRegistration#updateViaCache attribute.

BUG= 675540 

Change-Id: I6bb80dacbdd6a276f7ba8eb95f9f1e5379fbf03b
Reviewed-on: https://chromium-review.googlesource.com/1002732
Reviewed-by: Makoto Shimazu <shimazu@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558157}
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_context_request_handler_unittest.cc
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_register_job.cc
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_registration.cc
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_registration.h
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_registration_object_host.cc
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_registration_object_host.h
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/browser/service_worker/service_worker_registration_unittest.cc
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/renderer/service_worker/web_service_worker_registration_impl.cc
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/content/renderer/service_worker/web_service_worker_registration_impl.h
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/activation.https.html
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/detached-context.https.html
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/registration-updateviacache.https.html
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/test-helpers.sub.js
[modify] https://crrev.com/774147f892bb972fd5b4cf743760fc02575fc9bd/third_party/blink/public/mojom/service_worker/service_worker_registration.mojom

Blocking: 678905
Project Member

Comment 18 by bugdroid1@chromium.org, May 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e94550266a3048654dc0c544020e5fbb5593afc8

commit e94550266a3048654dc0c544020e5fbb5593afc8
Author: Matt Falkenhagen <falken@chromium.org>
Date: Mon May 14 07:37:26 2018

service worker: Enable 'claim-with-redirect' WPT test.

The test was disabled because Chrome didn't implement updateViaCache and
the expected default behavior, but that has been enabled as an
experimental feature for a while.

Also, delete the corresponding version in http/tests, which used
cache-control headers to workaround the lack of updateViaCache/expected
behavior.

Bug:  675540 
Change-Id: Id95750c5c3a6d4c4d86d307bbce4477b9ee53df1
Reviewed-on: https://chromium-review.googlesource.com/1056755
Reviewed-by: Han Leon <leon.han@intel.com>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558223}
[modify] https://crrev.com/e94550266a3048654dc0c544020e5fbb5593afc8/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/cb08c0af3301b826d14612e90741ca30c3ed192c/third_party/WebKit/LayoutTests/http/tests/serviceworker/claim-with-redirect.html
[delete] https://crrev.com/cb08c0af3301b826d14612e90741ca30c3ed192c/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/claim-with-redirect-iframe.html
[delete] https://crrev.com/cb08c0af3301b826d14612e90741ca30c3ed192c/third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/update-claim-worker.php

Project Member

Comment 19 by bugdroid1@chromium.org, May 15 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/39970a79fb0f27170b039a0eb371ed8c36ece484

commit 39970a79fb0f27170b039a0eb371ed8c36ece484
Author: Matt Falkenhagen <falken@chromium.org>
Date: Tue May 15 08:03:00 2018

service worker: Enable ServiceWorkerRegistration#updateViaCache by default.

This ships updateViaCache which controls whether the browser cache is
used for service worker update checks. Importantly, this changes the
default behavior, since the default value of updateViaCache is 'imports',
which skips the browser cache for the main service worker script and
uses it only for import scripts. However, actually checking import
script contents for updates is not yet implemented, so effectively the
default is 'none': https://crbug.com/648295.

Thanks to Emma Haruka Iwao (yuryu@) for doing the bulk of the
implementation work.

Intent to ship: https://groups.google.com/a/chromium.org/d/msg/blink-dev/RwjXGTAbuuA/7Q3NPlJ4BAAJ

Bug:  675540 
Change-Id: Ifdbaaa76b028e07ac26b9db28d9c59c7b8bd055f
Reviewed-on: https://chromium-review.googlesource.com/1056756
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#558639}
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/content/browser/service_worker/service_worker_context_request_handler_unittest.cc
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/content/browser/service_worker/service_worker_database.cc
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/content/browser/service_worker/service_worker_write_to_cache_job.h
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/content/common/service_worker/service_worker_utils.cc
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt
[modify] https://crrev.com/39970a79fb0f27170b039a0eb371ed8c36ece484/third_party/blink/renderer/platform/runtime_enabled_features.json5

Labels: M-68
Status: Fixed (was: Started)
Cc: -yuryu@chromium.org leon....@intel.com
Owner: yuryu@chromium.org
Setting owner to yuryu@ who did most of the implementation work. Thanks!
Project Member

Comment 22 by bugdroid1@chromium.org, Sep 28

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af56e4ce66db0815457ea7c76fea6ede27d39e21

commit af56e4ce66db0815457ea7c76fea6ede27d39e21
Author: Hiroki Nakagawa <nhiroki@chromium.org>
Date: Fri Sep 28 04:59:51 2018

ServiceWorker: Remove the runtime flag for updateViaCache

This flag is no longer necessary because updateViaCache was enabled by default
in M68:
https://www.chromestatus.com/feature/6059838387781632

Bug:  675540 
Change-Id: I03c5e00b83b150f83edd7022dd38d1fa657d324f
TBR: kinuko@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/1249471
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594984}
[modify] https://crrev.com/af56e4ce66db0815457ea7c76fea6ede27d39e21/content/browser/service_worker/service_worker_database_unittest.cc
[modify] https://crrev.com/af56e4ce66db0815457ea7c76fea6ede27d39e21/third_party/blink/renderer/modules/service_worker/service_worker_registration.idl
[modify] https://crrev.com/af56e4ce66db0815457ea7c76fea6ede27d39e21/third_party/blink/renderer/platform/runtime_enabled_features.json5

Sign in to add a comment