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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/guid.h" | 9 #include "base/guid.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
371 if (network) | 371 if (network) |
372 network->clear_last_error(); | 372 network->clear_last_error(); |
373 } | 373 } |
374 | 374 |
375 void NetworkStateHandler::SetCheckPortalList( | 375 void NetworkStateHandler::SetCheckPortalList( |
376 const std::string& check_portal_list) { | 376 const std::string& check_portal_list) { |
377 NET_LOG_EVENT("SetCheckPortalList", check_portal_list); | 377 NET_LOG_EVENT("SetCheckPortalList", check_portal_list); |
378 shill_property_handler_->SetCheckPortalList(check_portal_list); | 378 shill_property_handler_->SetCheckPortalList(check_portal_list); |
379 } | 379 } |
380 | 380 |
| 381 void NetworkStateHandler::SetWakeOnLanEnabled(bool enabled) { |
| 382 NET_LOG_EVENT("SetWakeOnLanEnabled", |
| 383 base::StringPrintf("%s", enabled ? "true" : "false")); |
| 384 shill_property_handler_->SetWakeOnLanEnabled(enabled); |
| 385 } |
| 386 |
381 const NetworkState* NetworkStateHandler::GetEAPForEthernet( | 387 const NetworkState* NetworkStateHandler::GetEAPForEthernet( |
382 const std::string& service_path) { | 388 const std::string& service_path) { |
383 const NetworkState* network = GetNetworkState(service_path); | 389 const NetworkState* network = GetNetworkState(service_path); |
384 if (!network) { | 390 if (!network) { |
385 NET_LOG_ERROR("GetEAPForEthernet", "Unknown service path " + service_path); | 391 NET_LOG_ERROR("GetEAPForEthernet", "Unknown service path " + service_path); |
386 return NULL; | 392 return NULL; |
387 } | 393 } |
388 if (network->type() != shill::kTypeEthernet) { | 394 if (network->type() != shill::kTypeEthernet) { |
389 NET_LOG_ERROR("GetEAPForEthernet", "Not of type Ethernet: " + service_path); | 395 NET_LOG_ERROR("GetEAPForEthernet", "Not of type Ethernet: " + service_path); |
390 return NULL; | 396 return NULL; |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 if (type.MatchesType(shill::kTypeBluetooth)) | 964 if (type.MatchesType(shill::kTypeBluetooth)) |
959 technologies.push_back(new std::string(shill::kTypeBluetooth)); | 965 technologies.push_back(new std::string(shill::kTypeBluetooth)); |
960 if (type.MatchesType(shill::kTypeVPN)) | 966 if (type.MatchesType(shill::kTypeVPN)) |
961 technologies.push_back(new std::string(shill::kTypeVPN)); | 967 technologies.push_back(new std::string(shill::kTypeVPN)); |
962 | 968 |
963 CHECK_GT(technologies.size(), 0ul); | 969 CHECK_GT(technologies.size(), 0ul); |
964 return technologies.Pass(); | 970 return technologies.Pass(); |
965 } | 971 } |
966 | 972 |
967 } // namespace chromeos | 973 } // namespace chromeos |
OLD | NEW |