New issue
Advanced search Search tips

Issue 722774 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Requests originating from within a shared worker should add Save-Data header

Project Member Reported by horo@chromium.org, May 16 2017

Issue description

 Issue 587242  was the same bug for service workers.

We should pipe the flag to the shared workers as well as service workers. 
 

Comment 1 by horo@chromium.org, May 16 2017

Cc: igrigo...@chromium.org

Comment 2 by horo@chromium.org, May 16 2017

This cl https://codereview.chromium.org/2884183002/ will add http/tests/fetch/chromium/data-saver.html LayoutTests which fails testing SharedWorker.
Project Member

Comment 4 by bugdroid1@chromium.org, May 16 2017

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

Comment 5 by bengr@chromium.org, May 16 2017

Status: Started (was: Assigned)
Project Member

Comment 6 by bugdroid1@chromium.org, May 17 2017

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

Project Member

Comment 7 by bugdroid1@chromium.org, May 21 2017

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

Comment 8 by bengr@chromium.org, Nov 29 2017

Cc: tbansal@chromium.org
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? 

Comment 10 by horo@chromium.org, Nov 30 2017

Labels: M-60
Status: Fixed (was: Started)
Ah sorry. I have already fixed by #7.

$ git find-releases ed54f8394f536183a96aa9678483e94282d07044
commit ed54f8394f536183a96aa9678483e94282d07044 was:
  initially in 60.0.3107.0

Sign in to add a comment