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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 } | 156 } |
157 | 157 |
158 void ShillPropertyHandler::RequestScan() const { | 158 void ShillPropertyHandler::RequestScan() const { |
159 shill_manager_->RequestScan( | 159 shill_manager_->RequestScan( |
160 "", | 160 "", |
161 base::Bind(&base::DoNothing), | 161 base::Bind(&base::DoNothing), |
162 base::Bind(&network_handler::ShillErrorCallbackFunction, | 162 base::Bind(&network_handler::ShillErrorCallbackFunction, |
163 kLogModule, "", network_handler::ErrorCallback())); | 163 kLogModule, "", network_handler::ErrorCallback())); |
164 } | 164 } |
165 | 165 |
| 166 void ShillPropertyHandler::ConnectToBestServices() const { |
| 167 network_event_log::AddEntry(kLogModule, "ConnectToBestServices", ""); |
| 168 shill_manager_->ConnectToBestServices( |
| 169 base::Bind(&base::DoNothing), |
| 170 base::Bind(&network_handler::ShillErrorCallbackFunction, |
| 171 kLogModule, "", network_handler::ErrorCallback())); |
| 172 } |
| 173 |
166 void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type, | 174 void ShillPropertyHandler::RequestProperties(ManagedState::ManagedType type, |
167 const std::string& path) { | 175 const std::string& path) { |
168 if (pending_updates_[type].find(path) != pending_updates_[type].end()) | 176 if (pending_updates_[type].find(path) != pending_updates_[type].end()) |
169 return; // Update already requested. | 177 return; // Update already requested. |
170 | 178 |
171 pending_updates_[type].insert(path); | 179 pending_updates_[type].insert(path); |
172 if (type == ManagedState::MANAGED_TYPE_NETWORK) { | 180 if (type == ManagedState::MANAGED_TYPE_NETWORK) { |
173 DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( | 181 DBusThreadManager::Get()->GetShillServiceClient()->GetProperties( |
174 dbus::ObjectPath(path), | 182 dbus::ObjectPath(path), |
175 base::Bind(&ShillPropertyHandler::GetPropertiesCallback, | 183 base::Bind(&ShillPropertyHandler::GetPropertiesCallback, |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
442 | 450 |
443 void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( | 451 void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( |
444 const std::string& path, | 452 const std::string& path, |
445 const std::string& key, | 453 const std::string& key, |
446 const base::Value& value) { | 454 const base::Value& value) { |
447 listener_->UpdateDeviceProperty(path, key, value); | 455 listener_->UpdateDeviceProperty(path, key, value); |
448 } | 456 } |
449 | 457 |
450 } // namespace internal | 458 } // namespace internal |
451 } // namespace chromeos | 459 } // namespace chromeos |
OLD | NEW |