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

Issue 2863973003: Expose RTT and downlink bandwidth using experimental Javascript API (Closed)

Created:
3 years, 7 months ago by tbansal1
Modified:
3 years, 7 months ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, cbentzel+watch_chromium.org, qsr+mojo_chromium.org, kinuko+watch, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, dglazkov+blink, darin-cc_chromium.org, jkarlin+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, darin (slow to review), net-reviews_chromium.org, tbansal+watch-nqe_chromium.org, blink-reviews-frames_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Expose RTT and downlink bandwidth using experimental Javascript API Initial draft spec is here: https://cdn.rawgit.com/WICG/netinfo/ect/index.html The API is runtime enabled feature, and is currently set to "experimental". This CL only implements "rtt" and "downlink" attributes. "ect" and callback (when there is a change in network quality) will be implemented in forthcoming CLs. BUG=719108 Review-Url: https://codereview.chromium.org/2863973003 Cr-Commit-Position: refs/heads/master@{#473649} Committed: https://chromium.googlesource.com/chromium/src/+/99d8aeb59f72b051b8f4b4af8a55b54c22dedfda

Patch Set 1 : ps #

Total comments: 20

Patch Set 2 : bengr comments #

Total comments: 6

Patch Set 3 : nasko comments and rebased #

Total comments: 6

Patch Set 4 : jkarlin comments #

Total comments: 4

Patch Set 5 : jkarlin comments #

Patch Set 6 : jkarlin comments #

Total comments: 4

Patch Set 7 : kinuko comments #

Total comments: 16

Patch Set 8 : Rebased, dcheng, jkarlin comments #

Total comments: 2

Patch Set 9 : Rebase, haraken's comment #

Total comments: 5

Patch Set 10 : Rebased #

Patch Set 11 : Yet another rebase #

Patch Set 12 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+669 lines, -127 lines) Patch
M content/browser/net/network_quality_observer_impl.cc View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/net_info_browsertest.cc View 1 2 3 4 5 3 chunks +140 lines, -5 lines 0 comments Download
M content/common/renderer.mojom View 1 2 3 4 5 6 7 2 chunks +8 lines, -6 lines 0 comments Download
M content/renderer/render_thread_impl.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M content/renderer/render_thread_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +4 lines, -4 lines 0 comments Download
M content/test/data/net_info.html View 1 chunk +8 lines, -0 lines 0 comments Download
M net/nqe/network_quality_estimator.h View 1 2 3 4 5 6 7 8 2 chunks +8 lines, -8 lines 0 comments Download
M net/nqe/network_quality_estimator_test_util.h View 1 5 chunks +18 lines, -1 line 0 comments Download
M net/nqe/network_quality_estimator_test_util.cc View 1 4 chunks +35 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-properties-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-navigated-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-and-gced-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/dom/Window/resources/window-property-collector.js View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/netinfo/basic-operation.html View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/netinfo/basic-operation-expected.txt View 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload/http/tests/serviceworker/webexposed/global-interface-listing-service-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-dedicated-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-shared-worker-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/UseCounter.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/netinfo/NetworkInformation.h View 1 2 3 4 5 3 chunks +17 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp View 1 2 3 4 5 6 7 4 chunks +60 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5 View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkStateNotifier.h View 1 2 3 4 5 6 4 chunks +41 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkStateNotifier.cpp View 1 2 3 4 5 6 7 3 chunks +32 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/network/NetworkStateNotifierTest.cpp View 1 2 3 4 5 6 24 chunks +231 lines, -81 lines 0 comments Download
M third_party/WebKit/public/platform/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/WebNetworkStateNotifier.h View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/enums.xml View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 142 (106 generated)
tbansal1
ryansturm: ptal. Thanks.
3 years, 7 months ago (2017-05-11 22:34:01 UTC) #25
tbansal1
bengr: ptal. Thanks.
3 years, 7 months ago (2017-05-11 22:43:26 UTC) #28
tbansal1
jkarlin: third_party/WebKit/Source/modules/netinfo/* and third_party/WebKit/Source/platform/network/*. Thanks.
3 years, 7 months ago (2017-05-12 16:11:57 UTC) #55
tbansal1
nasko: ptal at content/*. Thanks.
3 years, 7 months ago (2017-05-12 16:12:47 UTC) #57
bengr
https://codereview.chromium.org/2863973003/diff/240001/content/browser/net_info_browsertest.cc File content/browser/net_info_browsertest.cc (right): https://codereview.chromium.org/2863973003/diff/240001/content/browser/net_info_browsertest.cc#newcode197 content/browser/net_info_browsertest.cc:197: base::TimeDelta::FromMilliseconds(123), I would also test value of -1 since ...
3 years, 7 months ago (2017-05-12 19:09:55 UTC) #58
tbansal1
ptal. Thanks. https://codereview.chromium.org/2863973003/diff/240001/content/browser/net_info_browsertest.cc File content/browser/net_info_browsertest.cc (right): https://codereview.chromium.org/2863973003/diff/240001/content/browser/net_info_browsertest.cc#newcode197 content/browser/net_info_browsertest.cc:197: base::TimeDelta::FromMilliseconds(123), On 2017/05/12 19:09:54, bengr wrote: > ...
3 years, 7 months ago (2017-05-12 22:18:17 UTC) #61
nasko
I would leave the more in-depth review of the content test to bengr@, but left ...
3 years, 7 months ago (2017-05-12 23:29:54 UTC) #66
tbansal1
bengr, jkarlin, nasko: ptal. Thanks. https://codereview.chromium.org/2863973003/diff/290001/content/browser/net_info_browsertest.cc File content/browser/net_info_browsertest.cc (right): https://codereview.chromium.org/2863973003/diff/290001/content/browser/net_info_browsertest.cc#newcode161 content/browser/net_info_browsertest.cc:161: NavigateToURL(shell(), content::GetTestUrl("", "net_info.html")); On ...
3 years, 7 months ago (2017-05-15 18:05:03 UTC) #76
bengr
lgtm
3 years, 7 months ago (2017-05-15 21:20:01 UTC) #77
jkarlin
Looks good! https://codereview.chromium.org/2863973003/diff/240001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp File third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp (right): https://codereview.chromium.org/2863973003/diff/240001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp#newcode44 third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp:44: int roundRtt(int rtt_msec) { RoundRtt https://codereview.chromium.org/2863973003/diff/240001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp#newcode49 third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp:49: ...
3 years, 7 months ago (2017-05-16 14:32:59 UTC) #78
tbansal1
jkarlin: ptal at third_party/WebKit/Source/modules/netinfo/* and third_party/WebKit/Source/platform/network/*. I have also added myself to netinfo OWNERS, but ...
3 years, 7 months ago (2017-05-16 18:23:28 UTC) #80
tbansal1
PTAL. kinuko: third_party/WebKit/Source/platform/* dcheng: third_party/WebKit/Source/core/frame/* Thanks.
3 years, 7 months ago (2017-05-16 18:28:09 UTC) #82
jkarlin
https://codereview.chromium.org/2863973003/diff/370001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl File third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl (right): https://codereview.chromium.org/2863973003/diff/370001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl#newcode19 third_party/WebKit/Source/modules/netinfo/NetworkInformation.idl:19: typedef unrestricted double Milliseconds; On 2017/05/16 18:23:28, tbansal1 wrote: ...
3 years, 7 months ago (2017-05-16 18:37:19 UTC) #85
tbansal1
jkarlin: Thanks for the comments. PTAL. I have also update NetworkStateNotifier to use Optional and ...
3 years, 7 months ago (2017-05-16 21:34:30 UTC) #87
kinuko
https://codereview.chromium.org/2863973003/diff/470001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2863973003/diff/470001/content/renderer/render_thread_impl.cc#newcode2130 content/renderer/render_thread_impl.cc:2130: downlink_throughput_kbps); So we're downcasting double to int here? Why ...
3 years, 7 months ago (2017-05-17 02:05:45 UTC) #90
tbansal1
kinuko. dcheng: ptal. Thanks. https://codereview.chromium.org/2863973003/diff/470001/content/renderer/render_thread_impl.cc File content/renderer/render_thread_impl.cc (right): https://codereview.chromium.org/2863973003/diff/470001/content/renderer/render_thread_impl.cc#newcode2130 content/renderer/render_thread_impl.cc:2130: downlink_throughput_kbps); On 2017/05/17 02:05:45, kinuko ...
3 years, 7 months ago (2017-05-17 05:25:27 UTC) #93
dcheng
https://codereview.chromium.org/2863973003/diff/490001/content/common/renderer.mojom File content/common/renderer.mojom (right): https://codereview.chromium.org/2863973003/diff/490001/content/common/renderer.mojom#newcode166 content/common/renderer.mojom:166: OnNetworkQualityChanged(mojo.common.mojom.TimeDelta http_rtt, mojo.common.mojom.TimeDelta transport_rtt, double bandwidth_kbps); Nit: 80 characters ...
3 years, 7 months ago (2017-05-17 12:27:47 UTC) #98
jkarlin
https://codereview.chromium.org/2863973003/diff/490001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp File third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp (right): https://codereview.chromium.org/2863973003/diff/490001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp#newcode47 third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp:47: return 0; This behavior isn't mentioned in the spec. ...
3 years, 7 months ago (2017-05-17 12:59:15 UTC) #99
tbansal1
ptal. Thanks. https://codereview.chromium.org/2863973003/diff/490001/content/common/renderer.mojom File content/common/renderer.mojom (right): https://codereview.chromium.org/2863973003/diff/490001/content/common/renderer.mojom#newcode166 content/common/renderer.mojom:166: OnNetworkQualityChanged(mojo.common.mojom.TimeDelta http_rtt, mojo.common.mojom.TimeDelta transport_rtt, double bandwidth_kbps); On ...
3 years, 7 months ago (2017-05-18 00:10:30 UTC) #100
tbansal1
kinuko, dcheng: ping. Thanks!!
3 years, 7 months ago (2017-05-19 03:46:21 UTC) #105
kinuko
lgtm
3 years, 7 months ago (2017-05-19 15:09:55 UTC) #106
haraken
https://codereview.chromium.org/2863973003/diff/510001/third_party/WebKit/Source/modules/netinfo/OWNERS File third_party/WebKit/Source/modules/netinfo/OWNERS (right): https://codereview.chromium.org/2863973003/diff/510001/third_party/WebKit/Source/modules/netinfo/OWNERS#newcode2 third_party/WebKit/Source/modules/netinfo/OWNERS:2: tbansal@chromium.org Nit: Blink normally doesn't add a person to ...
3 years, 7 months ago (2017-05-19 16:10:08 UTC) #108
tbansal1
On 2017/05/19 16:10:08, haraken wrote: > https://codereview.chromium.org/2863973003/diff/510001/third_party/WebKit/Source/modules/netinfo/OWNERS > File third_party/WebKit/Source/modules/netinfo/OWNERS (right): > > https://codereview.chromium.org/2863973003/diff/510001/third_party/WebKit/Source/modules/netinfo/OWNERS#newcode2 > ...
3 years, 7 months ago (2017-05-19 17:18:40 UTC) #109
tbansal1
jkarlin, nasko: ptal. Thanks.
3 years, 7 months ago (2017-05-19 17:19:00 UTC) #110
jkarlin
lgtm with comment https://codereview.chromium.org/2863973003/diff/510001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp File third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp (right): https://codereview.chromium.org/2863973003/diff/510001/third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp#newcode49 third_party/WebKit/Source/modules/netinfo/NetworkInformation.cpp:49: return 0; Please create an issue ...
3 years, 7 months ago (2017-05-19 17:29:07 UTC) #111
haraken
WebKit LGTM
3 years, 7 months ago (2017-05-19 17:29:52 UTC) #112
dcheng
https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp File third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp (right): https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp#newcode46 third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp:46: void WebNetworkStateNotifier::SetNetworkQuality(TimeDelta http_rtt, The header declares this as base::TimeDelta ...
3 years, 7 months ago (2017-05-19 19:19:18 UTC) #113
tbansal1
https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp File third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp (right): https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp#newcode46 third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp:46: void WebNetworkStateNotifier::SetNetworkQuality(TimeDelta http_rtt, On 2017/05/19 19:19:18, dcheng (in AEST) ...
3 years, 7 months ago (2017-05-19 19:28:59 UTC) #114
nasko
content/ mostly rubberstamp LGTM. Deferring to bengr@ on the correctness of the tests. https://codereview.chromium.org/2863973003/diff/530001/content/common/renderer.mojom File ...
3 years, 7 months ago (2017-05-19 19:36:29 UTC) #115
dcheng
https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp File third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp (right): https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp#newcode46 third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp:46: void WebNetworkStateNotifier::SetNetworkQuality(TimeDelta http_rtt, On 2017/05/19 19:28:59, tbansal1 wrote: > ...
3 years, 7 months ago (2017-05-19 19:40:14 UTC) #116
haraken
On 2017/05/19 19:40:14, dcheng (in AEST) wrote: > https://codereview.chromium.org/2863973003/diff/530001/third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp > File third_party/WebKit/Source/platform/exported/WebNetworkStateNotifier.cpp > (right): > ...
3 years, 7 months ago (2017-05-19 20:11:34 UTC) #117
tbansal1
https://codereview.chromium.org/2863973003/diff/530001/content/common/renderer.mojom File content/common/renderer.mojom (right): https://codereview.chromium.org/2863973003/diff/530001/content/common/renderer.mojom#newcode167 content/common/renderer.mojom:167: mojo.common.mojom.TimeDelta transport_rtt, On 2017/05/19 19:36:29, nasko wrote: > No ...
3 years, 7 months ago (2017-05-19 20:16:28 UTC) #118
tbansal1
dcheng: comments? Thanks.
3 years, 7 months ago (2017-05-22 04:23:26 UTC) #127
dcheng
sorry was travelling lgtm
3 years, 7 months ago (2017-05-22 09:36:32 UTC) #128
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/2863973003/590001
3 years, 7 months ago (2017-05-22 19:06:34 UTC) #139
commit-bot: I haz the power
3 years, 7 months ago (2017-05-22 19:13:21 UTC) #142
Message was sent while issue was closed.
Committed patchset #12 (id:590001) as
https://chromium.googlesource.com/chromium/src/+/99d8aeb59f72b051b8f4b4af8a55...

Powered by Google App Engine
This is Rietveld 408576698