| 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/shill_property_handler.h" | 5 #include "chromeos/network/shill_property_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <sstream> | 9 #include <sstream> |
| 10 | 10 |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 | 222 |
| 223 void ShillPropertyHandler::SetWakeOnLanEnabled(bool enabled) { | 223 void ShillPropertyHandler::SetWakeOnLanEnabled(bool enabled) { |
| 224 base::FundamentalValue value(enabled); | 224 base::FundamentalValue value(enabled); |
| 225 shill_manager_->SetProperty( | 225 shill_manager_->SetProperty( |
| 226 shill::kWakeOnLanEnabledProperty, value, base::Bind(&base::DoNothing), | 226 shill::kWakeOnLanEnabledProperty, value, base::Bind(&base::DoNothing), |
| 227 base::Bind(&network_handler::ShillErrorCallbackFunction, | 227 base::Bind(&network_handler::ShillErrorCallbackFunction, |
| 228 "SetWakeOnLanEnabled Failed", "Manager", | 228 "SetWakeOnLanEnabled Failed", "Manager", |
| 229 network_handler::ErrorCallback())); | 229 network_handler::ErrorCallback())); |
| 230 } | 230 } |
| 231 | 231 |
| 232 void ShillPropertyHandler::SetNetworkThrottlingStatus( | |
| 233 bool throttling_enabled, | |
| 234 uint32_t upload_rate_kbits, | |
| 235 uint32_t download_rate_kbits) { | |
| 236 shill_manager_->SetNetworkThrottlingStatus( | |
| 237 throttling_enabled, upload_rate_kbits, download_rate_kbits, | |
| 238 base::Bind(&base::DoNothing), | |
| 239 base::Bind(&network_handler::ShillErrorCallbackFunction, | |
| 240 "SetNetworkThrottlingStatus failed", "Manager", | |
| 241 network_handler::ErrorCallback())); | |
| 242 } | |
| 243 | |
| 244 void ShillPropertyHandler::RequestScan() const { | 232 void ShillPropertyHandler::RequestScan() const { |
| 245 shill_manager_->RequestScan( | 233 shill_manager_->RequestScan( |
| 246 "", base::Bind(&base::DoNothing), | 234 "", base::Bind(&base::DoNothing), |
| 247 base::Bind(&network_handler::ShillErrorCallbackFunction, | 235 base::Bind(&network_handler::ShillErrorCallbackFunction, |
| 248 "RequestScan Failed", "", network_handler::ErrorCallback())); | 236 "RequestScan Failed", "", network_handler::ErrorCallback())); |
| 249 } | 237 } |
| 250 | 238 |
| 251 void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type, | 239 void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type, |
| 252 const std::string& path) { | 240 const std::string& path) { |
| 253 if (pending_updates_[type].find(path) != pending_updates_[type].end()) | 241 if (pending_updates_[type].find(path) != pending_updates_[type].end()) |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 NET_LOG(EVENT) << "Failed to get IP Config properties: " << ip_config_path | 553 NET_LOG(EVENT) << "Failed to get IP Config properties: " << ip_config_path |
| 566 << ": " << call_status << ", For: " << path; | 554 << ": " << call_status << ", For: " << path; |
| 567 return; | 555 return; |
| 568 } | 556 } |
| 569 NET_LOG(EVENT) << "IP Config properties received: " << path; | 557 NET_LOG(EVENT) << "IP Config properties received: " << path; |
| 570 listener_->UpdateIPConfigProperties(type, path, ip_config_path, properties); | 558 listener_->UpdateIPConfigProperties(type, path, ip_config_path, properties); |
| 571 } | 559 } |
| 572 | 560 |
| 573 } // namespace internal | 561 } // namespace internal |
| 574 } // namespace chromeos | 562 } // namespace chromeos |
| OLD | NEW |