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

Issue 2925963002: Create NetworkQuietDetector. (Closed)

Created:
3 years, 6 months ago by lpy
Modified:
3 years, 6 months ago
CC:
blink-reviews, chromium-reviews, Yoav Weiss
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Create NetworkQuietDetector. This patch implements network quiet detection associated to Document, it observes active network connection, and signals network quiet signal to GRC when there are no more than 2 connections in 1 second. We want to eventually make FMPDetector use NetworkQuietDetector, but we split the patch to make sure the network quiet signal won't be affected on the merge, and vice versa. Follow-up patches will decouple the network quiet detection from FMPDetector, and make FMPDetector as a client of NetworkQuietDetector. BUG=730098 Review-Url: https://codereview.chromium.org/2925963002 Cr-Commit-Position: refs/heads/master@{#479540} Committed: https://chromium.googlesource.com/chromium/src/+/36cd3153a788c9cb0ccfce928d5aef91504acc95

Patch Set 1 #

Patch Set 2 : Fix nullptr crash #

Patch Set 3 : Send network idle signal to GRC #

Total comments: 4

Patch Set 4 : NetworkQuietDetector as Supplement<Document> #

Patch Set 5 : Updated comments and rebased #

Total comments: 2

Patch Set 6 : Add kNetworkIdle state. #

Total comments: 12

Patch Set 7 : Addressed comments and rebased #

Total comments: 9

Patch Set 8 : Addressed comments #

Patch Set 9 : Dont create NetworkQuietDetector when FrameResourceCoordinator is not enabled #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -0 lines) Patch
M services/resource_coordinator/coordination_unit/coordination_unit_impl.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M services/resource_coordinator/coordination_unit/coordination_unit_impl.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M services/resource_coordinator/public/interfaces/events.mojom View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/BUILD.gn View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/loader/FrameFetchContext.cpp View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/loader/NetworkQuietDetector.h View 1 2 3 4 5 6 7 1 chunk +56 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp View 1 2 3 4 5 6 7 1 chunk +84 lines, -0 lines 1 comment Download
A third_party/WebKit/Source/core/loader/NetworkQuietDetectorTest.cpp View 1 2 3 4 5 6 7 1 chunk +80 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/instrumentation/resource_coordinator/FrameResourceCoordinator.cpp View 1 2 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 67 (42 generated)
lpy
PTAL
3 years, 6 months ago (2017-06-06 22:47:47 UTC) #6
zhenw
It is probably better to split this CL into 2 CLs. The 1st one creates ...
3 years, 6 months ago (2017-06-07 17:32:56 UTC) #16
lpy
On 2017/06/07 17:32:56, zhenw wrote: > It is probably better to split this CL into ...
3 years, 6 months ago (2017-06-07 17:47:23 UTC) #17
lpy
I updated the patch to reflect our discussion offline. https://codereview.chromium.org/2925963002/diff/40001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp File third_party/WebKit/Source/core/loader/FrameFetchContext.cpp (right): https://codereview.chromium.org/2925963002/diff/40001/third_party/WebKit/Source/core/loader/FrameFetchContext.cpp#newcode176 third_party/WebKit/Source/core/loader/FrameFetchContext.cpp:176: ...
3 years, 6 months ago (2017-06-07 18:32:46 UTC) #21
lpy
+japhet@ for Blink review on loader/ +oysteine@ for GRC Nate, Oystein, ptal.
3 years, 6 months ago (2017-06-07 18:34:36 UTC) #23
zhenw
https://codereview.chromium.org/2925963002/diff/80001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): https://codereview.chromium.org/2925963002/diff/80001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode34 third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:34: SetNetworkQuietTimers(ActiveConnections()); Does it mean ActiveConnections() will decrease monotonically here? ...
3 years, 6 months ago (2017-06-07 22:23:50 UTC) #32
lpy
On 2017/06/07 22:23:50, zhenw wrote: > https://codereview.chromium.org/2925963002/diff/80001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp > File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): > > https://codereview.chromium.org/2925963002/diff/80001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode34 > ...
3 years, 6 months ago (2017-06-08 04:59:51 UTC) #35
Zhen Wang
> https://codereview.chromium.org/2925963002/diff/80001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode54 > > third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:54: if > > (network2_quiet_reached_ || active_connections > 2) > > ...
3 years, 6 months ago (2017-06-08 06:14:15 UTC) #36
lpy
On 2017/06/08 06:14:15, Zhen Wang wrote: > > > https://codereview.chromium.org/2925963002/diff/80001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode54 > > > third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:54: if ...
3 years, 6 months ago (2017-06-08 06:42:39 UTC) #37
Zhen Wang
> This is not possible, when the timer fired, we check the number of active ...
3 years, 6 months ago (2017-06-08 06:52:00 UTC) #38
Zhen Wang
lgtm with nit https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/frame/LocalFrame.h File third_party/WebKit/Source/core/frame/LocalFrame.h (right): https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/frame/LocalFrame.h#newcode240 third_party/WebKit/Source/core/frame/LocalFrame.h:240: FrameResourceCoordinator* GetFrameResourceCoordinator() { // can be ...
3 years, 6 months ago (2017-06-08 16:25:56 UTC) #39
lpy
Nate, gentle ping for review :)
3 years, 6 months ago (2017-06-08 22:20:59 UTC) #40
Nate Chapin
https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode38 third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:38: network2_quiet_timer_( What's the significance of '2' in this variable ...
3 years, 6 months ago (2017-06-12 17:16:39 UTC) #41
lpy
Thanks for the feedback, I updated the patch and addressed comments. PTAL. https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/frame/LocalFrame.h File third_party/WebKit/Source/core/frame/LocalFrame.h ...
3 years, 6 months ago (2017-06-12 18:06:29 UTC) #43
Nate Chapin
lgtm LGTM w/nit https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode38 third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:38: network2_quiet_timer_( On 2017/06/12 18:06:29, lpy wrote: ...
3 years, 6 months ago (2017-06-12 18:12:17 UTC) #45
oystein (OOO til 10th of July)
lgtm w/comment https://codereview.chromium.org/2925963002/diff/120001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.h File third_party/WebKit/Source/core/loader/NetworkQuietDetector.h (right): https://codereview.chromium.org/2925963002/diff/120001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.h#newcode31 third_party/WebKit/Source/core/loader/NetworkQuietDetector.h:31: virtual ~NetworkQuietDetector() {} ~NetworkQuietDetector() override; instead of ...
3 years, 6 months ago (2017-06-12 21:20:02 UTC) #48
lpy
+dcheng@ for security review on mojom files.
3 years, 6 months ago (2017-06-12 21:26:19 UTC) #50
dcheng
https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): https://codereview.chromium.org/2925963002/diff/100001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode38 third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:38: network2_quiet_timer_( On 2017/06/12 18:12:17, Nate Chapin wrote: > On ...
3 years, 6 months ago (2017-06-14 00:12:52 UTC) #51
dcheng
Forgot to mention... ipc lgtm. So just some incidental comments.
3 years, 6 months ago (2017-06-14 00:13:06 UTC) #52
lpy
Thanks for all the feedback/comments. I addressed the issue of using 2 by removing 2, ...
3 years, 6 months ago (2017-06-14 18:19:35 UTC) #56
dcheng
https://codereview.chromium.org/2925963002/diff/120001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): https://codereview.chromium.org/2925963002/diff/120001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode68 third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:68: if (frame_resource_coordinator) { On 2017/06/14 18:19:35, lpy wrote: > ...
3 years, 6 months ago (2017-06-14 18:32:40 UTC) #57
lpy
On 2017/06/14 18:32:40, dcheng wrote: > https://codereview.chromium.org/2925963002/diff/120001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp > File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): > > https://codereview.chromium.org/2925963002/diff/120001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode68 > ...
3 years, 6 months ago (2017-06-14 21:27:44 UTC) #60
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/2925963002/160001
3 years, 6 months ago (2017-06-14 21:28:20 UTC) #63
dcheng
https://codereview.chromium.org/2925963002/diff/160001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp File third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp (right): https://codereview.chromium.org/2925963002/diff/160001/third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp#newcode74 third_party/WebKit/Source/core/loader/NetworkQuietDetector.cpp:74: if (frame_resource_coordinator) { Note: I believe that by installing ...
3 years, 6 months ago (2017-06-14 21:34:43 UTC) #64
commit-bot: I haz the power
3 years, 6 months ago (2017-06-14 23:24:42 UTC) #67
Message was sent while issue was closed.
Committed patchset #9 (id:160001) as
https://chromium.googlesource.com/chromium/src/+/36cd3153a788c9cb0ccfce928d5a...

Powered by Google App Engine
This is Rietveld 408576698