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

Unified Diff: chromeos/network/network_state_handler.cc

Issue 2883283004: Merged Tether and cellular network types in System Tray. (Closed)
Patch Set: fixed failing TetherServiceTest Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/tether/tether_service_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/network_state_handler.cc
diff --git a/chromeos/network/network_state_handler.cc b/chromeos/network/network_state_handler.cc
index 6bf34633966a6ab6f7c18cac0380f20c4218571e..fbc3612cfd91deb06ed95adcd5debbd747ceddbc 100644
--- a/chromeos/network/network_state_handler.cc
+++ b/chromeos/network/network_state_handler.cc
@@ -423,9 +423,8 @@ void NetworkStateHandler::GetNetworkListByType(const NetworkTypePattern& type,
if (!network_list_sorted_)
SortNetworkList();
- if (type.MatchesPattern(NetworkTypePattern::Tether())) {
+ if (type.MatchesPattern(NetworkTypePattern::Tether()))
GetTetherNetworkList(limit, list);
- }
int count = list->size();
@@ -461,8 +460,11 @@ void NetworkStateHandler::GetTetherNetworkList(int limit,
NetworkStateList* list) {
DCHECK(list);
list->clear();
- int count = 0;
+ if (!IsTechnologyEnabled(NetworkTypePattern::Tether()))
+ return;
+
+ int count = 0;
for (auto iter = tether_network_list_.begin();
iter != tether_network_list_.end(); ++iter) {
list->push_back((*iter)->AsNetworkState());
« no previous file with comments | « chrome/browser/chromeos/tether/tether_service_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698