OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/network/network_state_handler.h" | 5 #include "chromeos/network/network_state_handler.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
416 bool visible_only, | 416 bool visible_only, |
417 int limit, | 417 int limit, |
418 NetworkStateList* list) { | 418 NetworkStateList* list) { |
419 DCHECK(list); | 419 DCHECK(list); |
420 list->clear(); | 420 list->clear(); |
421 | 421 |
422 // Sort the network list if necessary. | 422 // Sort the network list if necessary. |
423 if (!network_list_sorted_) | 423 if (!network_list_sorted_) |
424 SortNetworkList(); | 424 SortNetworkList(); |
425 | 425 |
426 if (type.MatchesPattern(NetworkTypePattern::Tether())) { | 426 if (type.MatchesPattern(NetworkTypePattern::Tether()) && |
427 IsTechnologyEnabled(NetworkTypePattern::Tether())) { | |
khorimoto
2017/05/30 22:35:16
I don't think this CL is the right place for this
stevenjb
2017/05/30 23:23:14
I think changing the behavior in this CL is OK, bu
lesliewatkins
2017/05/31 00:43:27
If this change isn't implemented, then the Tether
lesliewatkins
2017/05/31 00:43:59
Done.
| |
427 GetTetherNetworkList(limit, list); | 428 GetTetherNetworkList(limit, list); |
428 } | 429 } |
429 | 430 |
430 int count = list->size(); | 431 int count = list->size(); |
431 | 432 |
432 if (type.Equals(NetworkTypePattern::Tether()) || | 433 if (type.Equals(NetworkTypePattern::Tether()) || |
433 (limit != 0 && count >= limit)) { | 434 (limit != 0 && count >= limit)) { |
434 // If only searching for Tether networks, there is no need to continue | 435 // If only searching for Tether networks, there is no need to continue |
435 // searching through other network types; likewise, if the limit has already | 436 // searching through other network types; likewise, if the limit has already |
436 // been reached, there is no need to continue searching. | 437 // been reached, there is no need to continue searching. |
(...skipping 1045 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1482 if (type.MatchesType(shill::kTypeVPN)) | 1483 if (type.MatchesType(shill::kTypeVPN)) |
1483 technologies.emplace_back(shill::kTypeVPN); | 1484 technologies.emplace_back(shill::kTypeVPN); |
1484 if (type.MatchesType(kTypeTether)) | 1485 if (type.MatchesType(kTypeTether)) |
1485 technologies.emplace_back(kTypeTether); | 1486 technologies.emplace_back(kTypeTether); |
1486 | 1487 |
1487 CHECK_GT(technologies.size(), 0ul); | 1488 CHECK_GT(technologies.size(), 0ul); |
1488 return technologies; | 1489 return technologies; |
1489 } | 1490 } |
1490 | 1491 |
1491 } // namespace chromeos | 1492 } // namespace chromeos |
OLD | NEW |