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

Issue 2776523003: Expose connection subtype from NetworkChangeNotifier (Closed)

Created:
3 years, 9 months ago by tbansal1
Modified:
3 years, 7 months ago
Reviewers:
pauljensen
CC:
chromium-reviews, cbentzel+watch_chromium.org, bnc+watch_chromium.org, stevenjb+watch_chromium.org, oshima+watch_chromium.org, net-reviews_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Expose connection subtype from NetworkChangeNotifier It will be consumed by NQE in the next CL. BUG=704998 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester Review-Url: https://codereview.chromium.org/2776523003 Cr-Commit-Position: refs/heads/master@{#459638} Committed: https://chromium.googlesource.com/chromium/src/+/880e49e7bf7d6d11f23d7d4dcd8e2e21b9c142b5

Patch Set 1 : ps #

Total comments: 6

Patch Set 2 : ps #

Patch Set 3 : Add test #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+36 lines, -4 lines) Patch
M net/android/network_change_notifier_android.h View 1 chunk +2 lines, -0 lines 0 comments Download
M net/android/network_change_notifier_android.cc View 1 chunk +5 lines, -0 lines 2 comments Download
M net/base/network_change_notifier.h View 1 2 chunks +11 lines, -4 lines 0 comments Download
M net/base/network_change_notifier.cc View 2 chunks +13 lines, -0 lines 0 comments Download
M net/base/network_change_notifier_unittest.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 43 (34 generated)
tbansal1
pauljensen: ptal. Thanks.
3 years, 9 months ago (2017-03-24 18:03:06 UTC) #23
pauljensen
are you aware this will only allow differentiating between cellular connections, and not WiFi or ...
3 years, 9 months ago (2017-03-24 18:38:59 UTC) #26
tbansal1
ptal. Thanks. https://codereview.chromium.org/2776523003/diff/100001/net/base/network_change_notifier.h File net/base/network_change_notifier.h (right): https://codereview.chromium.org/2776523003/diff/100001/net/base/network_change_notifier.h#newcode279 net/base/network_change_notifier.h:279: // Returns the connection subtype of the ...
3 years, 9 months ago (2017-03-24 23:22:24 UTC) #29
pauljensen
lgtm, just please add a tiny test in network_change_notifier_unittest.cc that just calls this new API ...
3 years, 9 months ago (2017-03-25 00:55:09 UTC) #30
tbansal1
Added the test. Thanks for the review.
3 years, 9 months ago (2017-03-25 01:11:40 UTC) #32
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/2776523003/140001
3 years, 9 months ago (2017-03-25 04:37:50 UTC) #38
commit-bot: I haz the power
Committed patchset #3 (id:140001) as https://chromium.googlesource.com/chromium/src/+/880e49e7bf7d6d11f23d7d4dcd8e2e21b9c142b5
3 years, 9 months ago (2017-03-25 04:45:48 UTC) #41
pauljensen
https://codereview.chromium.org/2776523003/diff/140001/net/android/network_change_notifier_android.cc File net/android/network_change_notifier_android.cc (right): https://codereview.chromium.org/2776523003/diff/140001/net/android/network_change_notifier_android.cc#newcode165 net/android/network_change_notifier_android.cc:165: return delegate_->GetCurrentConnectionSubtype(); Hmm this is a potential threading violation. ...
3 years, 7 months ago (2017-05-10 16:47:07 UTC) #42
tbansal1
3 years, 7 months ago (2017-05-11 01:08:52 UTC) #43
Message was sent while issue was closed.
https://codereview.chromium.org/2776523003/diff/140001/net/android/network_ch...
File net/android/network_change_notifier_android.cc (right):

https://codereview.chromium.org/2776523003/diff/140001/net/android/network_ch...
net/android/network_change_notifier_android.cc:165: return
delegate_->GetCurrentConnectionSubtype();
On 2017/05/10 16:47:07, pauljensen wrote:
> Hmm this is a potential threading violation.  NCN::GetConnectionSubtype() is
> advertised as thread-safe, but here we're implementing it by calling a
function
> that can only be called on the NCN's thread.  In Chrome this will be the UI
> thread, in Cronet this will be an obscure initialization thread.

I will send a CL tomorrow to fix this. Thanks for noticing this.

Powered by Google App Engine
This is Rietveld 408576698