|
|
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. |
DescriptionExpose 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
Messages
Total messages: 43 (34 generated)
Description was changed from ========== Expose connection subtype BUG= ========== to ========== Expose connection subtype BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester ==========
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Patchset #2 (id:20001) has been deleted
Patchset #1 (id:1) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_android on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/cast_shell_a...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Patchset #1 (id:40001) has been deleted
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Patchset #1 (id:60001) has been deleted
Description was changed from ========== Expose connection subtype BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester ========== to ========== 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 ==========
Patchset #1 (id:80001) has been deleted
tbansal@chromium.org changed reviewers: + pauljensen@chromium.org
pauljensen: ptal. Thanks.
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
are you aware this will only allow differentiating between cellular connections, and not WiFi or Ethernet or Bluetooth connection sub-types? https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... File net/base/network_change_notifier.h (right): https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... net/base/network_change_notifier.h:279: // Returns the connection subtype of the network the client is connected to. "the connection subtype of the network the client is connected to"->"the device's current default active network connection's subtype" https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... net/base/network_change_notifier.h:283: // the internet, the connection type is CONNECTION_WIFI. there is no sub-type for WiFi https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... net/base/network_change_notifier.h:283: // the internet, the connection type is CONNECTION_WIFI. The returned value only describes the connection currently used by the device, and does not take into account other machines on the network. For example, if the device is connected using Wifi to a 3G gateway to access the internet, the connection type is CONNECTION_WIFI. -> The returned value only describes the first-hop connection, for example if the device is connected via WiFi to a 4G hotspot, the returned value will reflect WiFi, not 4G. (Also please make this same replacement on line 273, but use CONNECTION_WIFI_there.)
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
ptal. Thanks. https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... File net/base/network_change_notifier.h (right): https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... net/base/network_change_notifier.h:279: // Returns the connection subtype of the network the client is connected to. On 2017/03/24 18:38:58, pauljensen wrote: > "the connection subtype of the network the client is connected to"->"the > device's current default active network connection's subtype" Done. https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... net/base/network_change_notifier.h:283: // the internet, the connection type is CONNECTION_WIFI. On 2017/03/24 18:38:59, pauljensen wrote: > The returned value only describes the connection currently used by the > device, and does not take into account other machines on the network. For > example, if the device is connected using Wifi to a 3G gateway to access the > internet, the connection type is CONNECTION_WIFI. > -> > The returned value only describes the first-hop connection, for example if the > device is connected via WiFi to a 4G hotspot, the returned value will reflect > WiFi, not 4G. > > (Also please make this same replacement on line 273, but use > CONNECTION_WIFI_there.) Done. https://codereview.chromium.org/2776523003/diff/100001/net/base/network_chang... net/base/network_change_notifier.h:283: // the internet, the connection type is CONNECTION_WIFI. On 2017/03/24 18:38:58, pauljensen wrote: > there is no sub-type for WiFi Thanks, I am more interested in cellular. If it proves useful, I may work on getting the subtype for WiFi, although IIRC, there are some issues there due to Android permissions. I have added one more statement to explain that this may return UNKNOWN more frequently. Let me know if it needs to be reworded.
lgtm, just please add a tiny test in network_change_notifier_unittest.cc that just calls this new API to make sure it doesn't crash.
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Added the test. Thanks for the review.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by tbansal@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from pauljensen@chromium.org Link to the patchset: https://codereview.chromium.org/2776523003/#ps140001 (title: "Add test")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 140001, "attempt_start_ts": 1490416658437430, "parent_rev": "69536d1f656f6e6258f8508929aaa57ae7831d48", "commit_rev": "880e49e7bf7d6d11f23d7d4dcd8e2e21b9c142b5"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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/+/880e49e7bf7d6d11f23d7d4dcd8e... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:140001) as https://chromium.googlesource.com/chromium/src/+/880e49e7bf7d6d11f23d7d4dcd8e...
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(); 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.
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. |