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

Issue 2103323007: Exposing NQE on the Browser UI thread (Closed)

Created:
4 years, 5 months ago by RyanSturm
Modified:
4 years, 5 months ago
Reviewers:
mmenke, tbansal1
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Exposing NQE on the Browser UI thread This involves an IO base observer which passes messages to the UI thread using a KeyedService. Consumers should be able to consume this similarly to the way the NQE is already consumed. BUG=615563 Committed: https://crrev.com/a699b6ea04c4e2d1413babc597fb2e01bc0261ec Cr-Commit-Position: refs/heads/master@{#406630}

Patch Set 1 #

Total comments: 16

Patch Set 2 : tbansal comments + threadChecker #

Patch Set 3 : rebase #

Total comments: 22

Patch Set 4 : tbansal comments #

Total comments: 4

Patch Set 5 : tbansal nits #

Patch Set 6 : tbansal comment #

Patch Set 7 : removing weakPtr #

Total comments: 2

Patch Set 8 : changing OWNERS to map to net/nqe/OWNERS #

Total comments: 16

Patch Set 9 : rebase #

Patch Set 10 : Addressed mmenke comments #

Patch Set 11 : rebase #

Patch Set 12 : Adding browsertest #

Patch Set 13 : typo #

Total comments: 10

Patch Set 14 : nits #

Total comments: 31

Patch Set 15 : tbansal comments #

Total comments: 10

Patch Set 16 : mmenke comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -2 lines) Patch
A chrome/browser/net/nqe/OWNERS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +51 lines, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +100 lines, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +38 lines, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +21 lines, -0 lines 0 comments Download
A chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +47 lines, -0 lines 0 comments Download
M chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M net/nqe/network_quality_estimator.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -2 lines 0 comments Download
M net/nqe/network_quality_estimator.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (31 generated)
tbansal1
https://codereview.chromium.org/2103323007/diff/1/chrome/browser/net/nqe/io_network_quality_observer.cc File chrome/browser/net/nqe/io_network_quality_observer.cc (right): https://codereview.chromium.org/2103323007/diff/1/chrome/browser/net/nqe/io_network_quality_observer.cc#newcode24 chrome/browser/net/nqe/io_network_quality_observer.cc:24: DCHECK(io_thread->globals()->network_quality_estimator); Is it guaranteed that nqe will be initialized ...
4 years, 5 months ago (2016-07-01 22:22:03 UTC) #2
RyanSturm
https://codereview.chromium.org/2103323007/diff/1/chrome/browser/net/nqe/io_network_quality_observer.cc File chrome/browser/net/nqe/io_network_quality_observer.cc (right): https://codereview.chromium.org/2103323007/diff/1/chrome/browser/net/nqe/io_network_quality_observer.cc#newcode24 chrome/browser/net/nqe/io_network_quality_observer.cc:24: DCHECK(io_thread->globals()->network_quality_estimator); On 2016/07/01 22:22:02, tbansal1 wrote: > Is it ...
4 years, 5 months ago (2016-07-11 22:00:19 UTC) #3
tbansal1
https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode15 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:15: class UINetworkQualityEstimatorService::IONetworkQualityObserver Add class comments. Something along the lines ...
4 years, 5 months ago (2016-07-13 00:07:28 UTC) #4
RyanSturm
https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode15 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:15: class UINetworkQualityEstimatorService::IONetworkQualityObserver On 2016/07/13 00:07:27, tbansal1 wrote: > Add ...
4 years, 5 months ago (2016-07-13 17:28:15 UTC) #5
tbansal1
Can you also add an OWNERS file to chrome/browser/net/nqe/, and point it to //net/nqe/OWNERS. Something ...
4 years, 5 months ago (2016-07-13 17:56:11 UTC) #6
RyanSturm
https://codereview.chromium.org/2103323007/diff/60001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/60001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode27 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:27: // This is created on the UI thread, but ...
4 years, 5 months ago (2016-07-13 18:03:45 UTC) #7
tbansal1
https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode37 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:37: io_thread->globals()->network_quality_estimator->GetWeakPtr(); On 2016/07/13 17:56:11, tbansal1 wrote: > On 2016/07/13 ...
4 years, 5 months ago (2016-07-13 18:08:13 UTC) #8
RyanSturm
On 2016/07/13 18:08:13, tbansal1 wrote: > https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc > File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): > > https://codereview.chromium.org/2103323007/diff/40001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode37 > ...
4 years, 5 months ago (2016-07-13 18:12:23 UTC) #9
tbansal1
lgtm % nit. Thanks for doing this. https://codereview.chromium.org/2103323007/diff/120001/chrome/browser/net/nqe/OWNERS File chrome/browser/net/nqe/OWNERS (right): https://codereview.chromium.org/2103323007/diff/120001/chrome/browser/net/nqe/OWNERS#newcode1 chrome/browser/net/nqe/OWNERS:1: bengr@chromium.org nit: ...
4 years, 5 months ago (2016-07-13 18:27:23 UTC) #10
RyanSturm
https://codereview.chromium.org/2103323007/diff/120001/chrome/browser/net/nqe/OWNERS File chrome/browser/net/nqe/OWNERS (right): https://codereview.chromium.org/2103323007/diff/120001/chrome/browser/net/nqe/OWNERS#newcode1 chrome/browser/net/nqe/OWNERS:1: bengr@chromium.org On 2016/07/13 18:27:23, tbansal1 wrote: > nit: Can ...
4 years, 5 months ago (2016-07-13 18:32:41 UTC) #11
RyanSturm
mmenke: PTAL at *, thanks
4 years, 5 months ago (2016-07-13 21:05:09 UTC) #13
mmenke
https://codereview.chromium.org/2103323007/diff/140001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/140001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode39 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:39: if (!io_thread->globals()->network_quality_estimator) Hrm...Is there any plan to use per-profile ...
4 years, 5 months ago (2016-07-14 19:10:12 UTC) #14
mmenke
One other thing...Speaking of tests...Have you thought about testing this class?
4 years, 5 months ago (2016-07-14 19:11:43 UTC) #15
RyanSturm
I can't think of a good way to test this. At best, I could create ...
4 years, 5 months ago (2016-07-14 21:42:12 UTC) #20
mmenke
On 2016/07/14 21:42:12, RyanSturm wrote: > I can't think of a good way to test ...
4 years, 5 months ago (2016-07-18 21:34:18 UTC) #23
RyanSturm
tbansal, mmenke: PTAL On 2016/07/18 21:34:18, mmenke wrote: > On 2016/07/14 21:42:12, RyanSturm wrote: > ...
4 years, 5 months ago (2016-07-19 19:48:06 UTC) #26
tbansal1
Thanks for writing the tests. still lgtm. https://codereview.chromium.org/2103323007/diff/240001/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h File chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h (right): https://codereview.chromium.org/2103323007/diff/240001/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h#newcode15 chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h:15: // |type| ...
4 years, 5 months ago (2016-07-19 23:05:22 UTC) #31
RyanSturm
https://codereview.chromium.org/2103323007/diff/240001/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h File chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h (right): https://codereview.chromium.org/2103323007/diff/240001/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h#newcode15 chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.h:15: // |type| to all observers, including the UINetworkQualityEstimatorService. On ...
4 years, 5 months ago (2016-07-19 23:31:03 UTC) #36
tbansal1
Looked a bit more carefully. https://codereview.chromium.org/2103323007/diff/260001/chrome/browser/net/nqe/ui_network_quality_estimator_service.h File chrome/browser/net/nqe/ui_network_quality_estimator_service.h (right): https://codereview.chromium.org/2103323007/diff/260001/chrome/browser/net/nqe/ui_network_quality_estimator_service.h#newcode8 chrome/browser/net/nqe/ui_network_quality_estimator_service.h:8: #include <memory> include probably ...
4 years, 5 months ago (2016-07-20 03:32:36 UTC) #41
RyanSturm
tbansal: PTAL, thanks https://codereview.chromium.org/2103323007/diff/260001/chrome/browser/net/nqe/ui_network_quality_estimator_service.h File chrome/browser/net/nqe/ui_network_quality_estimator_service.h (right): https://codereview.chromium.org/2103323007/diff/260001/chrome/browser/net/nqe/ui_network_quality_estimator_service.h#newcode8 chrome/browser/net/nqe/ui_network_quality_estimator_service.h:8: #include <memory> On 2016/07/20 03:32:35, tbansal1 ...
4 years, 5 months ago (2016-07-20 16:36:47 UTC) #44
mmenke
LGTM https://codereview.chromium.org/2103323007/diff/280001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/280001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode69 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:69: UINetworkQualityEstimatorService::UINetworkQualityEstimatorService( Are you thinking this class won't need ...
4 years, 5 months ago (2016-07-20 17:11:34 UTC) #45
tbansal1
lgtm. https://codereview.chromium.org/2103323007/diff/260001/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc (right): https://codereview.chromium.org/2103323007/diff/260001/chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc#newcode42 chrome/browser/net/nqe/ui_network_quality_estimator_service_test_util.cc:42: content::BrowserThread::PostTaskAndReply( On 2016/07/20 16:36:46, RyanSturm wrote: > On ...
4 years, 5 months ago (2016-07-20 17:14:18 UTC) #46
RyanSturm
https://codereview.chromium.org/2103323007/diff/280001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc File chrome/browser/net/nqe/ui_network_quality_estimator_service.cc (right): https://codereview.chromium.org/2103323007/diff/280001/chrome/browser/net/nqe/ui_network_quality_estimator_service.cc#newcode69 chrome/browser/net/nqe/ui_network_quality_estimator_service.cc:69: UINetworkQualityEstimatorService::UINetworkQualityEstimatorService( On 2016/07/20 17:11:33, mmenke wrote: > Are you ...
4 years, 5 months ago (2016-07-20 17:37:38 UTC) #48
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/2103323007/300001
4 years, 5 months ago (2016-07-20 18:51:04 UTC) #54
commit-bot: I haz the power
Committed patchset #16 (id:300001)
4 years, 5 months ago (2016-07-20 18:56:59 UTC) #55
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-20 18:57:25 UTC) #56
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 19:02:23 UTC) #58
Message was sent while issue was closed.
Patchset 16 (id:??) landed as
https://crrev.com/a699b6ea04c4e2d1413babc597fb2e01bc0261ec
Cr-Commit-Position: refs/heads/master@{#406630}

Powered by Google App Engine
This is Rietveld 408576698