Issue 587242 was the same bug for service workers. We should pipe the flag to the shared workers as well as service workers.
This cl https://codereview.chromium.org/2884183002/ will add http/tests/fetch/chromium/data-saver.html LayoutTests which fails testing SharedWorker.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e commit a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e Author: horo <horo@chromium.org> Date: Tue May 16 13:18:25 2017 Add Data-Saver LayoutTest for Worker and SharedWorker While implementing off-main-thread fetch ( crbug.com/443374 ), I noticed that there is no tests for Data-Saver for Worker and SharedWorker. And currently Data-Saver doesn't work with SharedWorker. ( crbug.com/722774 ) BUG= 443374 , 722774 Review-Url: https://codereview.chromium.org/2884183002 Cr-Commit-Position: refs/heads/master@{#472075} [add] https://crrev.com/a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/data-saver-expected.txt [add] https://crrev.com/a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/data-saver.html [add] https://crrev.com/a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/resources/check-save-data-header.php [add] https://crrev.com/a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/resources/data-saver-worker.php [add] https://crrev.com/a0f1fee8fc23618dd72f5f0bad1d2e3a8e0c623e/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/data-saver-expected.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3c5da4ae54598b8ebed887a52ee9b2763abb0047 commit 3c5da4ae54598b8ebed887a52ee9b2763abb0047 Author: Tsuyoshi Horo <horo@chromium.org> Date: Tue May 16 14:57:44 2017 Add non-utf8-header-name.php of off-main-thread-fetch virtual test to TestExpectations BUG= 443374 , 722774 , 720511 TBR=falken Review-Url: https://codereview.chromium.org/2887753002 . Cr-Commit-Position: refs/heads/master@{#472105} [modify] https://crrev.com/3c5da4ae54598b8ebed887a52ee9b2763abb0047/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/137e05d0105abedb195dae64225b1f7b954da5e5 commit 137e05d0105abedb195dae64225b1f7b954da5e5 Author: horo <horo@chromium.org> Date: Wed May 17 02:27:50 2017 DataSaver support for off-main-thread-fetch This CL gets the DataSaver setting on the main thread and pass it to WebWorkerFetchContext (WorkerFetchContextImpl, ServiceWorkerFetchContextImpl). WorkerFetchContext::AddAdditionalRequestHeaders() will check the flag on the worker thread and set "Save-Data" header if enabled. BUG= 443374 , 722774 Review-Url: https://codereview.chromium.org/2886663002 Cr-Commit-Position: refs/heads/master@{#472288} [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/browser/service_worker/service_worker_browsertest.cc [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/service_worker_fetch_context_impl.cc [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/service_worker_fetch_context_impl.h [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/worker_fetch_context_impl.cc [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/content/renderer/service_worker/worker_fetch_context_impl.h [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/data-saver-expected.txt [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/core/loader/WorkerFetchContext.h [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/web/DedicatedWorkerMessagingProxyProviderImpl.cpp [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/web/WebEmbeddedWorkerImpl.cpp [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp [modify] https://crrev.com/137e05d0105abedb195dae64225b1f7b954da5e5/third_party/WebKit/public/platform/WebWorkerFetchContext.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ed54f8394f536183a96aa9678483e94282d07044 commit ed54f8394f536183a96aa9678483e94282d07044 Author: horo <horo@chromium.org> Date: Sun May 21 05:25:47 2017 Support DataSaver for SharedWorker This CL pipes the DataSaver flag from the renderer process which creates a Shared Worker to the shared worker process. After this CL, both the worker script request and the fetch request from the shared worker will have "Save-Data: on" HTTP header if DataSaver is enabled. BUG= 722774 Review-Url: https://codereview.chromium.org/2881073003 Cr-Commit-Position: refs/heads/master@{#473461} [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/browser/devtools/shared_worker_devtools_manager_unittest.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/browser/shared_worker/shared_worker_host.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/browser/shared_worker/shared_worker_instance.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/browser/shared_worker/shared_worker_instance.h [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/browser/shared_worker/shared_worker_instance_unittest.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/browser/shared_worker/shared_worker_service_impl.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/common/view_messages.h [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/common/worker_messages.h [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/renderer/render_thread_impl.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/renderer/shared_worker/embedded_shared_worker_stub.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/renderer/shared_worker/embedded_shared_worker_stub.h [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/renderer/shared_worker/shared_worker_repository.cc [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/content/renderer/shared_worker/shared_worker_repository.h [delete] https://crrev.com/cb23bc6b0dae9c82bb9845b4ea367d72e8c2edaf/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/data-saver-expected.txt [delete] https://crrev.com/cb23bc6b0dae9c82bb9845b4ea367d72e8c2edaf/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/data-saver-expected.txt [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/third_party/WebKit/Source/core/exported/SharedWorkerRepositoryClientImpl.cpp [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/third_party/WebKit/Source/web/WebSharedWorkerImpl.h [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/third_party/WebKit/public/web/WebSharedWorker.h [modify] https://crrev.com/ed54f8394f536183a96aa9678483e94282d07044/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h
What's the status of this? tbansal@, how does this interact with your refactor for saveData?
horo: Has this been fixed? Going by the CL description in #7, looks like it already was before I refactored the saveData code?
Ah sorry. I have already fixed by #7. $ git find-releases ed54f8394f536183a96aa9678483e94282d07044 commit ed54f8394f536183a96aa9678483e94282d07044 was: initially in 60.0.3107.0
Comment 1 by horo@chromium.org
, May 16 2017