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

Issue 2881073003: Support DataSaver for SharedWorker (Closed)

Created:
3 years, 7 months ago by horo
Modified:
3 years, 7 months ago
Reviewers:
falken, kinuko, Mike West
CC:
bengr, blink-reviews, blink-reviews-api_chromium.org, blink-worker-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, dglazkov+blink, jam, kinuko+watch, mlamouri+watch-content_chromium.org, Raj
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/ed54f8394f536183a96aa9678483e94282d07044

Patch Set 1 #

Patch Set 2 : rebase on https://codereview.chromium.org/2884183002/#ps1 #

Patch Set 3 : with https://codereview.chromium.org/2884183002/ #

Patch Set 4 : diff from https://codereview.chromium.org/2884183002/#ps40001 #

Patch Set 5 : rebase #

Total comments: 7

Patch Set 6 : add /* data_saver_enabled */ #

Patch Set 7 : rebase on https://codereview.chromium.org/2886663002/#ps80001 #

Patch Set 8 : rebase on TOT #

Patch Set 9 : introduce WebDataSaverFlag #

Patch Set 10 : fix #include "public/web/WebDataSaverFlag.h" #

Total comments: 3

Patch Set 11 : same as PS6 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+55 lines, -41 lines) Patch
M content/browser/devtools/shared_worker_devtools_manager_unittest.cc View 1 2 3 4 5 9 10 4 chunks +10 lines, -5 lines 0 comments Download
M content/browser/shared_worker/shared_worker_host.cc View 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/shared_worker/shared_worker_instance.h View 9 10 3 chunks +4 lines, -1 line 0 comments Download
M content/browser/shared_worker/shared_worker_instance.cc View 9 10 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/shared_worker/shared_worker_instance_unittest.cc View 1 2 3 4 5 9 10 3 chunks +6 lines, -3 lines 0 comments Download
M content/browser/shared_worker/shared_worker_service_impl.cc View 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/worker_messages.h View 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 9 10 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/shared_worker/embedded_shared_worker_stub.h View 9 10 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/shared_worker/embedded_shared_worker_stub.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/shared_worker/shared_worker_repository.h View 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/shared_worker/shared_worker_repository.cc View 9 10 2 chunks +2 lines, -0 lines 0 comments Download
D third_party/WebKit/LayoutTests/http/tests/fetch/chromium/data-saver-expected.txt View 1 3 1 chunk +0 lines, -9 lines 0 comments Download
D third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/data-saver-expected.txt View 1 2 3 4 5 6 1 chunk +0 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/exported/SharedWorkerRepositoryClientImpl.cpp View 9 10 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.h View 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/WebSharedWorkerImpl.cpp View 1 2 3 4 5 6 9 10 3 chunks +5 lines, -3 lines 0 comments Download
M third_party/WebKit/public/web/WebSharedWorker.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h View 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 70 (45 generated)
horo
falken@ Please review this.
3 years, 7 months ago (2017-05-16 08:40:05 UTC) #9
falken1
Wow, fast fix :) Can we link to a dedicated bug instead of as part ...
3 years, 7 months ago (2017-05-16 08:47:04 UTC) #13
falken
sent from wrong account
3 years, 7 months ago (2017-05-16 08:47:33 UTC) #15
horo
On 2017/05/16 08:47:04, falken1 wrote: > Wow, fast fix :) > > Can we link ...
3 years, 7 months ago (2017-05-16 10:36:14 UTC) #19
falken
https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h File content/browser/shared_worker/shared_worker_instance.h (right): https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h#newcode33 content/browser/shared_worker/shared_worker_instance.h:33: bool data_saver_enabled); consider an enum like WebDataSaverFlag { Enabled, ...
3 years, 7 months ago (2017-05-17 00:54:53 UTC) #24
kinuko
https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h File content/browser/shared_worker/shared_worker_instance.h (right): https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h#newcode33 content/browser/shared_worker/shared_worker_instance.h:33: bool data_saver_enabled); On 2017/05/17 00:54:53, falken wrote: > consider ...
3 years, 7 months ago (2017-05-17 02:13:15 UTC) #27
horo
https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h File content/browser/shared_worker/shared_worker_instance.h (right): https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h#newcode33 content/browser/shared_worker/shared_worker_instance.h:33: bool data_saver_enabled); On 2017/05/17 00:54:53, falken wrote: > consider ...
3 years, 7 months ago (2017-05-17 02:15:42 UTC) #28
horo
Uploaded Patchset 7 which is a diff from https://codereview.chromium.org/2886663002 which I'm submitting now. https://codereview.chromium.org/2881073003/diff/80001/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/fetch/chromium/data-saver-expected.txt File ...
3 years, 7 months ago (2017-05-17 02:22:47 UTC) #31
kinuko
https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h File content/browser/shared_worker/shared_worker_instance.h (right): https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h#newcode33 content/browser/shared_worker/shared_worker_instance.h:33: bool data_saver_enabled); On 2017/05/17 02:15:42, horo wrote: > On ...
3 years, 7 months ago (2017-05-17 06:13:22 UTC) #37
horo
On 2017/05/17 06:13:22, kinuko wrote: > https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h > File content/browser/shared_worker/shared_worker_instance.h (right): > > https://codereview.chromium.org/2881073003/diff/80001/content/browser/shared_worker/shared_worker_instance.h#newcode33 > ...
3 years, 7 months ago (2017-05-17 09:23:05 UTC) #39
falken
lgtm, thanks for the enum
3 years, 7 months ago (2017-05-18 01:24:33 UTC) #47
kinuko
https://codereview.chromium.org/2881073003/diff/180001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2881073003/diff/180001/chrome/browser/chrome_content_browser_client.cc#newcode2713 chrome/browser/chrome_content_browser_client.cc:2713: : blink::WebDataSaverFlag::kDisabled; Ah sorry- I hadn't realized this change ...
3 years, 7 months ago (2017-05-18 03:48:21 UTC) #48
horo
https://codereview.chromium.org/2881073003/diff/180001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/2881073003/diff/180001/chrome/browser/chrome_content_browser_client.cc#newcode2713 chrome/browser/chrome_content_browser_client.cc:2713: : blink::WebDataSaverFlag::kDisabled; On 2017/05/18 03:48:21, kinuko wrote: > Ah ...
3 years, 7 months ago (2017-05-18 05:08:27 UTC) #49
kinuko
On 2017/05/18 05:08:27, horo wrote: > https://codereview.chromium.org/2881073003/diff/180001/chrome/browser/chrome_content_browser_client.cc > File chrome/browser/chrome_content_browser_client.cc (right): > > https://codereview.chromium.org/2881073003/diff/180001/chrome/browser/chrome_content_browser_client.cc#newcode2713 > ...
3 years, 7 months ago (2017-05-18 05:18:19 UTC) #50
horo
> 2) use settings bag type struct + boolean field everywhere (like we do in ...
3 years, 7 months ago (2017-05-18 06:01:06 UTC) #51
kinuko
On 2017/05/18 06:01:06, horo wrote: > > 2) use settings bag type struct + boolean ...
3 years, 7 months ago (2017-05-18 06:47:16 UTC) #52
horo
On 2017/05/18 06:47:16, kinuko wrote: > On 2017/05/18 06:01:06, horo wrote: > > > 2) ...
3 years, 7 months ago (2017-05-18 07:28:41 UTC) #53
kinuko
On 2017/05/18 07:28:41, horo wrote: > On 2017/05/18 06:47:16, kinuko wrote: > > On 2017/05/18 ...
3 years, 7 months ago (2017-05-18 07:54:42 UTC) #54
kinuko
On 2017/05/18 07:54:42, kinuko wrote: > On 2017/05/18 07:28:41, horo wrote: > > On 2017/05/18 ...
3 years, 7 months ago (2017-05-18 08:00:42 UTC) #55
horo
Binding WebContentSecurityPolicyType, WebAddressSpace, WebSharedWorkerCreationContextType and data saver flag sounds good to me. (We should send ...
3 years, 7 months ago (2017-05-18 08:12:57 UTC) #57
horo
mkwst@ Could you please review content/common/view_messages.h and content/common/worker_messages.h?
3 years, 7 months ago (2017-05-18 08:17:08 UTC) #60
horo
On 2017/05/18 08:17:08, horo wrote: > mkwst@ > Could you please review content/common/view_messages.h and > ...
3 years, 7 months ago (2017-05-19 23:13:50 UTC) #63
Mike West
IPC LGTM.
3 years, 7 months ago (2017-05-20 20:49:18 UTC) #64
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/2881073003/200001
3 years, 7 months ago (2017-05-21 03:29:25 UTC) #67
commit-bot: I haz the power
3 years, 7 months ago (2017-05-21 05:26:02 UTC) #70
Message was sent while issue was closed.
Committed patchset #11 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/ed54f8394f536183a96aa9678483...

Powered by Google App Engine
This is Rietveld 408576698