Feature description: The saveData attibute is a boolean in the Network Information API that indicates a client’s explicit opt-in for reduced data usage, due to high transfer costs, slow connection speeds, or other reasons. It's use allows JavaScript to make decisions that result in reduced data use, such as to load smaller images and video resources, or reduce buffering or predictive actions. Explainer: https://github.com/WICG/netinfo/issues/42 Spec: https://wicg.github.io/netinfo/#-dfn-savedata-dfn-attribute blink-dev i2i thread: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/IrIwAdMWhAE
Oops. :)
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66 commit abd3ef02fce9a4038eff7e5c5a379a4a148f2c66 Author: Tarun Bansal <tbansal@chromium.org> Date: Fri Nov 03 15:19:20 2017 Add saveData boolean to the NetInfo API Web platform tests (internal and external) will be added in the next CL. Also, remove the saveData boolean as a WebSetting, and store that as part of NetworkStateNotifier. Bug: 772566 Change-Id: I19385039fbdbdba6e6001ae54d5230af87e1aa93 Reviewed-on: https://chromium-review.googlesource.com/690318 Commit-Queue: Tarun Bansal <tbansal@chromium.org> Reviewed-by: Daniel Cheng <dcheng@chromium.org> Reviewed-by: Ben Greenstein <bengr@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Josh Karlin <jkarlin@chromium.org> Cr-Commit-Position: refs/heads/master@{#513780} [add] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/chrome/browser/data_saver/data_saver_webapis_browsertest.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/chrome/test/BUILD.gn [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/devtools/shared_worker_devtools_manager_unittest.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/service_worker/service_worker_browsertest.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/shared_worker/shared_worker_host.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/shared_worker/shared_worker_instance.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/shared_worker/shared_worker_instance.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/shared_worker/shared_worker_instance_unittest.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/shared_worker/shared_worker_service_impl.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/browser/shared_worker/shared_worker_service_impl_unittest.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/common/shared_worker/shared_worker_info.mojom [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/render_view_impl.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/service_worker/embedded_worker_instance_client_impl.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/service_worker/service_worker_fetch_context_impl.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/service_worker/service_worker_fetch_context_impl.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/service_worker/worker_fetch_context_impl.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/service_worker/worker_fetch_context_impl.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/shared_worker/embedded_shared_worker_stub.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/shared_worker/shared_worker_repository.cc [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/renderer/shared_worker/shared_worker_repository.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/content/test/data/net_info.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/http/tests/devtools/network/network-datasaver-warning.js [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/data-saver.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/http/tests/media/preload-conditions.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/chromium/access-control-preflight-data-saver.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/media/autoplay-muted-conditions.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-off.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/media/autoplay-muted-datasaver-on.html [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/exported/SharedWorkerRepositoryClientImpl.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/exported/WebSettingsImpl.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/exported/WebSettingsImpl.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/frame/Settings.json5 [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/html/media/AutoplayPolicy.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/html/media/AutoplayUmaHelper.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/html/media/HTMLMediaElement.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/html/media/HTMLMediaElementTest.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/loader/FrameFetchContext.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/loader/FrameFetchContextTest.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/loader/WorkerFetchContext.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/loader/WorkerFetchContext.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/testing/Internals.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/testing/Internals.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/testing/Internals.idl [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/core/workers/ThreadedMessagingProxyBase.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/modules/netinfo/NetworkInformation.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/platform/network/NetworkStateNotifier.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/platform/network/NetworkStateNotifierTest.cpp [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/Source/platform/runtime_enabled_features.json5 [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/platform/WebNetworkStateNotifier.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/platform/WebWorkerFetchContext.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/platform/web_feature.mojom [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/web/WebEmbeddedWorkerStartData.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/web/WebSettings.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/web/WebSharedWorker.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h [modify] https://crrev.com/abd3ef02fce9a4038eff7e5c5a379a4a148f2c66/tools/metrics/histograms/enums.xml
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1cc34e32773dca7a0bfbc25e86a730af507b274a commit 1cc34e32773dca7a0bfbc25e86a730af507b274a Author: Tarun Bansal <tbansal@chromium.org> Date: Tue Nov 07 23:00:17 2017 NetInfo: web platform tests for the saveData attribute Bug: 772566 Change-Id: I344664a446506885c692668f0fe3a8555b3ea49b Reviewed-on: https://chromium-review.googlesource.com/754161 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#514640} [modify] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/external/wpt/netinfo/netinfo-basics.html [modify] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/netinfo/basic-operation-expected.txt [modify] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/netinfo/basic-operation.html [modify] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/netinfo/estimate-basic-operation-expected.txt [modify] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/netinfo/estimate-basic-operation.html [add] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/netinfo/saveData-basic-operation-expected.txt [add] https://crrev.com/1cc34e32773dca7a0bfbc25e86a730af507b274a/third_party/WebKit/LayoutTests/netinfo/saveData-basic-operation.html
Reassigning to bengr@ for the next step (i2s consensus). Please reassign back when it's time to enable the attribute.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2 commit cd3e4bd0541d2fb98cf2693746fc25e1d5236be2 Author: Tarun Bansal <tbansal@chromium.org> Date: Wed Dec 13 17:17:03 2017 Enable NetInfo saveData attribute by default blink-dev i2s thread with 3 LGTMs: https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/AgonJunvfIE Bug: 772566 Change-Id: I09178ae913a513de7dc646b1dd43cdffafe1b3c5 Reviewed-on: https://chromium-review.googlesource.com/823252 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Commit-Queue: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#523798} [modify] https://crrev.com/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2/third_party/WebKit/LayoutTests/platform/mac/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2/third_party/WebKit/LayoutTests/virtual/stable/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt [modify] https://crrev.com/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-dedicated-worker-expected.txt [modify] https://crrev.com/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt [modify] https://crrev.com/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2/third_party/WebKit/LayoutTests/virtual/stable/webexposed/global-interface-listing-shared-worker-expected.txt [modify] https://crrev.com/cd3e4bd0541d2fb98cf2693746fc25e1d5236be2/third_party/WebKit/Source/platform/runtime_enabled_features.json5
chromestatus entry: https://www.chromestatus.com/feature/5076813940260864
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/993a3910d7e58ddcdb08de65373ce7bc466348b6 commit 993a3910d7e58ddcdb08de65373ce7bc466348b6 Author: Tarun Bansal <tbansal@chromium.org> Date: Tue Aug 14 06:35:51 2018 Remove the flags for NetInfo JavaScript APIs. The NetInfo network quality attributes have been enabled since M-61. NetInfo saveData attribute has been enabled since M-65. Change-Id: Ie4b005834e92180d080391ea7d00f4e57c8c5df3 Bug: 723068 , 772566 Reviewed-on: https://chromium-review.googlesource.com/1172087 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Tarun Bansal <tbansal@chromium.org> Cr-Commit-Position: refs/heads/master@{#582849} [modify] https://crrev.com/993a3910d7e58ddcdb08de65373ce7bc466348b6/third_party/blink/renderer/modules/netinfo/network_information.idl [modify] https://crrev.com/993a3910d7e58ddcdb08de65373ce7bc466348b6/third_party/blink/renderer/platform/runtime_enabled_features.json5
Comment 1 Deleted