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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 enabled_technologies_.erase(technology); | 195 enabled_technologies_.erase(technology); |
196 shill_manager_->DisableTechnology( | 196 shill_manager_->DisableTechnology( |
197 technology, base::Bind(&base::DoNothing), | 197 technology, base::Bind(&base::DoNothing), |
198 base::Bind(&network_handler::ShillErrorCallbackFunction, | 198 base::Bind(&network_handler::ShillErrorCallbackFunction, |
199 "DisableTechnology Failed", technology, error_callback)); | 199 "DisableTechnology Failed", technology, error_callback)); |
200 } | 200 } |
201 | 201 |
202 // Send updated prohibited technology list to shill. | 202 // Send updated prohibited technology list to shill. |
203 const std::string prohibited_list = | 203 const std::string prohibited_list = |
204 base::JoinString(prohibited_technologies, ","); | 204 base::JoinString(prohibited_technologies, ","); |
205 base::StringValue value(prohibited_list); | 205 base::Value value(prohibited_list); |
206 shill_manager_->SetProperty( | 206 shill_manager_->SetProperty( |
207 "ProhibitedTechnologies", value, base::Bind(&base::DoNothing), | 207 "ProhibitedTechnologies", value, base::Bind(&base::DoNothing), |
208 base::Bind(&network_handler::ShillErrorCallbackFunction, | 208 base::Bind(&network_handler::ShillErrorCallbackFunction, |
209 "SetTechnologiesProhibited Failed", prohibited_list, | 209 "SetTechnologiesProhibited Failed", prohibited_list, |
210 error_callback)); | 210 error_callback)); |
211 } | 211 } |
212 | 212 |
213 void ShillPropertyHandler::SetCheckPortalList( | 213 void ShillPropertyHandler::SetCheckPortalList( |
214 const std::string& check_portal_list) { | 214 const std::string& check_portal_list) { |
215 base::StringValue value(check_portal_list); | 215 base::Value value(check_portal_list); |
216 shill_manager_->SetProperty( | 216 shill_manager_->SetProperty( |
217 shill::kCheckPortalListProperty, value, base::Bind(&base::DoNothing), | 217 shill::kCheckPortalListProperty, value, base::Bind(&base::DoNothing), |
218 base::Bind(&network_handler::ShillErrorCallbackFunction, | 218 base::Bind(&network_handler::ShillErrorCallbackFunction, |
219 "SetCheckPortalList Failed", "Manager", | 219 "SetCheckPortalList Failed", "Manager", |
220 network_handler::ErrorCallback())); | 220 network_handler::ErrorCallback())); |
221 } | 221 } |
222 | 222 |
223 void ShillPropertyHandler::SetWakeOnLanEnabled(bool enabled) { | 223 void ShillPropertyHandler::SetWakeOnLanEnabled(bool enabled) { |
224 base::Value value(enabled); | 224 base::Value value(enabled); |
225 shill_manager_->SetProperty( | 225 shill_manager_->SetProperty( |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
565 NET_LOG(EVENT) << "Failed to get IP Config properties: " << ip_config_path | 565 NET_LOG(EVENT) << "Failed to get IP Config properties: " << ip_config_path |
566 << ": " << call_status << ", For: " << path; | 566 << ": " << call_status << ", For: " << path; |
567 return; | 567 return; |
568 } | 568 } |
569 NET_LOG(EVENT) << "IP Config properties received: " << path; | 569 NET_LOG(EVENT) << "IP Config properties received: " << path; |
570 listener_->UpdateIPConfigProperties(type, path, ip_config_path, properties); | 570 listener_->UpdateIPConfigProperties(type, path, ip_config_path, properties); |
571 } | 571 } |
572 | 572 |
573 } // namespace internal | 573 } // namespace internal |
574 } // namespace chromeos | 574 } // namespace chromeos |
OLD | NEW |