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

Issue 2945643002: [CrOS Tether] Sort Tether network lists. (Closed)

Created:
3 years, 6 months ago by Kyle Horimoto
Modified:
3 years, 6 months ago
CC:
chromium-reviews, jlklein+watch-tether_chromium.org, tengs+watch-tether_chromium.org, stevenjb+watch_chromium.org, hansberry+watch-tether_chromium.org, jhawkins+watch-tether_chromium.org, oshima+watch_chromium.org, lesliewatkins+watch-tether_chromium.org, khorimoto+watch-tether_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

[CrOS Tether] Sort Tether network lists. With this change, Tether networks in the networking UI (i.e., settings and quick settings) are sorted in the same order that the Tether component prioritizes them when performing a host scan. The sorting rules are as follows: (1) The device which has most recently sent a successful ConnectTetheringResponse is always at the front of the queue. (2) Devices which have most recently sent a successful TetherAvailabilityResponse are next in the order, as long as they do not violate the first rule. (3) All other devices are left in the order they are passed. This CL also updates the GetNetworkListByType() logic in NetworkStateHandler; after this change, all connected/connecting networks are listed before non-active networks, and Wi-Fi networks associated with Tether networks are no longer returned since they are supposed to be obscured behind their associated Tether networks. BUG=672263, 729796, 729801 Review-Url: https://codereview.chromium.org/2945643002 Cr-Commit-Position: refs/heads/master@{#481621} Committed: https://chromium.googlesource.com/chromium/src/+/5a0eba4b0089554977fde98d3a30d3ca74a750a0

Patch Set 1 #

Patch Set 2 : Add tests, remove mock class. #

Patch Set 3 : Cleanup - now ready for review. #

Total comments: 16

Patch Set 4 : hansberry@ comments. #

Patch Set 5 : Order active networks before non-active. #

Total comments: 14

Patch Set 6 : stevenjb@ comments. #

Total comments: 20

Patch Set 7 : stevenjb@ comments. #

Total comments: 8

Patch Set 8 : stevenjb@ comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+717 lines, -305 lines) Patch
M chromeos/components/tether/BUILD.gn View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M chromeos/components/tether/host_scan_device_prioritizer.h View 1 2 3 2 chunks +3 lines, -8 lines 0 comments Download
M chromeos/components/tether/host_scan_device_prioritizer.cc View 1 2 3 1 chunk +0 lines, -63 lines 0 comments Download
A chromeos/components/tether/host_scan_device_prioritizer_impl.h View 1 2 3 4 5 1 chunk +60 lines, -0 lines 0 comments Download
A chromeos/components/tether/host_scan_device_prioritizer_impl.cc View 1 2 3 4 5 1 chunk +105 lines, -0 lines 0 comments Download
A chromeos/components/tether/host_scan_device_prioritizer_impl_unittest.cc View 1 2 3 4 5 6 1 chunk +255 lines, -0 lines 0 comments Download
M chromeos/components/tether/host_scan_device_prioritizer_unittest.cc View 1 2 3 1 chunk +0 lines, -120 lines 0 comments Download
M chromeos/components/tether/host_scanner_operation_unittest.cc View 1 2 3 4 chunks +7 lines, -6 lines 0 comments Download
M chromeos/components/tether/host_scanner_unittest.cc View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M chromeos/components/tether/initializer.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chromeos/components/tether/initializer.cc View 1 2 3 4 5 6 4 chunks +10 lines, -5 lines 0 comments Download
M chromeos/components/tether/mock_host_scan_device_prioritizer.h View 1 1 chunk +0 lines, -36 lines 0 comments Download
M chromeos/components/tether/mock_host_scan_device_prioritizer.cc View 1 1 chunk +0 lines, -18 lines 0 comments Download
M chromeos/network/network_state_handler.h View 1 2 3 4 5 6 7 5 chunks +27 lines, -8 lines 0 comments Download
M chromeos/network/network_state_handler.cc View 1 2 3 4 5 6 7 9 chunks +83 lines, -30 lines 0 comments Download
M chromeos/network/network_state_handler_unittest.cc View 1 2 3 4 5 6 5 chunks +161 lines, -3 lines 0 comments Download

Messages

Total messages: 20 (7 generated)
Kyle Horimoto
stevenjb: for //chromeos/network hansberry: for //chromeos/components/tether
3 years, 6 months ago (2017-06-16 20:51:48 UTC) #2
Ryan Hansberry
https://codereview.chromium.org/2945643002/diff/40001/chromeos/components/tether/host_scan_device_prioritizer.h File chromeos/components/tether/host_scan_device_prioritizer.h (right): https://codereview.chromium.org/2945643002/diff/40001/chromeos/components/tether/host_scan_device_prioritizer.h#newcode59 chromeos/components/tether/host_scan_device_prioritizer.h:59: std::unique_ptr<ManagedState> Move( Why ManagedState instead of NetworkState? https://codereview.chromium.org/2945643002/diff/40001/chromeos/components/tether/host_scanner_operation_unittest.cc File ...
3 years, 6 months ago (2017-06-19 19:17:49 UTC) #3
Kyle Horimoto
https://codereview.chromium.org/2945643002/diff/40001/chromeos/components/tether/host_scan_device_prioritizer.h File chromeos/components/tether/host_scan_device_prioritizer.h (right): https://codereview.chromium.org/2945643002/diff/40001/chromeos/components/tether/host_scan_device_prioritizer.h#newcode59 chromeos/components/tether/host_scan_device_prioritizer.h:59: std::unique_ptr<ManagedState> Move( On 2017/06/19 19:17:48, Ryan Hansberry wrote: > ...
3 years, 6 months ago (2017-06-20 23:44:55 UTC) #4
Ryan Hansberry
lgtm. Have you tested this change with a combination of a cellular network and tether ...
3 years, 6 months ago (2017-06-21 17:05:37 UTC) #5
Kyle Horimoto
On 2017/06/21 17:05:37, Ryan Hansberry wrote: > lgtm. Have you tested this change with a ...
3 years, 6 months ago (2017-06-21 19:02:14 UTC) #7
stevenjb
https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.cc File chromeos/components/tether/host_scan_device_prioritizer_impl.cc (right): https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.cc#newcode28 chromeos/components/tether/host_scan_device_prioritizer_impl.cc:28: network_state_handler_->SetTetherNetworkListSorter(this); We shouldn't do this here. Have whatever code ...
3 years, 6 months ago (2017-06-21 20:59:04 UTC) #8
Kyle Horimoto
https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.cc File chromeos/components/tether/host_scan_device_prioritizer_impl.cc (right): https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.cc#newcode28 chromeos/components/tether/host_scan_device_prioritizer_impl.cc:28: network_state_handler_->SetTetherNetworkListSorter(this); On 2017/06/21 20:59:03, stevenjb wrote: > We shouldn't ...
3 years, 6 months ago (2017-06-21 22:17:07 UTC) #10
stevenjb
https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.h File chromeos/components/tether/host_scan_device_prioritizer_impl.h (right): https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.h#newcode55 chromeos/components/tether/host_scan_device_prioritizer_impl.h:55: std::unique_ptr<ManagedState>& tether_network_state) const; On 2017/06/21 22:17:07, Kyle Horimoto wrote: ...
3 years, 6 months ago (2017-06-22 00:25:20 UTC) #11
Kyle Horimoto
https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.h File chromeos/components/tether/host_scan_device_prioritizer_impl.h (right): https://codereview.chromium.org/2945643002/diff/80001/chromeos/components/tether/host_scan_device_prioritizer_impl.h#newcode55 chromeos/components/tether/host_scan_device_prioritizer_impl.h:55: std::unique_ptr<ManagedState>& tether_network_state) const; On 2017/06/22 00:25:19, stevenjb wrote: > ...
3 years, 6 months ago (2017-06-22 02:08:01 UTC) #12
stevenjb
Thanks, I think this is a lot cleaner than what we had before. lgtm w/ ...
3 years, 6 months ago (2017-06-22 16:44:38 UTC) #13
Kyle Horimoto
https://codereview.chromium.org/2945643002/diff/120001/chromeos/network/network_state_handler.cc File chromeos/network/network_state_handler.cc (right): https://codereview.chromium.org/2945643002/diff/120001/chromeos/network/network_state_handler.cc#newcode73 chromeos/network/network_state_handler.cc:73: bool active) { On 2017/06/22 16:44:38, stevenjb wrote: > ...
3 years, 6 months ago (2017-06-22 17:27:22 UTC) #14
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/2945643002/140001
3 years, 6 months ago (2017-06-22 17:27:58 UTC) #17
commit-bot: I haz the power
3 years, 6 months ago (2017-06-22 19:17:21 UTC) #20
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/5a0eba4b0089554977fde98d3a30...

Powered by Google App Engine
This is Rietveld 408576698