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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
524 | 524 |
525 tether_network_state->set_name(name); | 525 tether_network_state->set_name(name); |
526 tether_network_state->set_type(kTypeTether); | 526 tether_network_state->set_type(kTypeTether); |
527 tether_network_state->SetGuid(guid); | 527 tether_network_state->SetGuid(guid); |
528 tether_network_state->set_visible(true); | 528 tether_network_state->set_visible(true); |
529 tether_network_state->set_update_received(); | 529 tether_network_state->set_update_received(); |
530 tether_network_state->set_update_requested(false); | 530 tether_network_state->set_update_requested(false); |
531 tether_network_state->set_connectable(true); | 531 tether_network_state->set_connectable(true); |
532 tether_network_state->set_carrier(carrier); | 532 tether_network_state->set_carrier(carrier); |
533 tether_network_state->set_battery_percentage(battery_percentage); | 533 tether_network_state->set_battery_percentage(battery_percentage); |
534 // TODO(khorimoto): Add this field as a parameter to this function and set it | |
535 // accordingly from the Tether component. | |
stevenjb
2017/04/27 19:28:53
Are we really going to want/need to pass this as a
Kyle Horimoto
2017/04/27 19:40:23
I think that it makes sense to send it at the same
stevenjb
2017/04/27 19:47:32
Acknowledged.
| |
536 tether_network_state->set_has_connected_as_tether_client(false); | |
534 tether_network_state->set_signal_strength(signal_strength); | 537 tether_network_state->set_signal_strength(signal_strength); |
535 | 538 |
536 tether_network_list_.push_back(std::move(tether_network_state)); | 539 tether_network_list_.push_back(std::move(tether_network_state)); |
537 NotifyNetworkListChanged(); | 540 NotifyNetworkListChanged(); |
538 } | 541 } |
539 | 542 |
540 bool NetworkStateHandler::UpdateTetherNetworkProperties( | 543 bool NetworkStateHandler::UpdateTetherNetworkProperties( |
541 const std::string& guid, | 544 const std::string& guid, |
542 const std::string& carrier, | 545 const std::string& carrier, |
543 int battery_percentage, | 546 int battery_percentage, |
(...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1418 if (type.MatchesType(shill::kTypeVPN)) | 1421 if (type.MatchesType(shill::kTypeVPN)) |
1419 technologies.emplace_back(shill::kTypeVPN); | 1422 technologies.emplace_back(shill::kTypeVPN); |
1420 if (type.MatchesType(kTypeTether)) | 1423 if (type.MatchesType(kTypeTether)) |
1421 technologies.emplace_back(kTypeTether); | 1424 technologies.emplace_back(kTypeTether); |
1422 | 1425 |
1423 CHECK_GT(technologies.size(), 0ul); | 1426 CHECK_GT(technologies.size(), 0ul); |
1424 return technologies; | 1427 return technologies; |
1425 } | 1428 } |
1426 | 1429 |
1427 } // namespace chromeos | 1430 } // namespace chromeos |
OLD | NEW |