| 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/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 const base::ListValue* vlist = GetListValue(key, value); | 275 const base::ListValue* vlist = GetListValue(key, value); |
| 276 if (vlist) { | 276 if (vlist) { |
| 277 listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist); | 277 listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist); |
| 278 // UpdateObserved used to use kServiceWatchListProperty for TYPE_NETWORK, | 278 // UpdateObserved used to use kServiceWatchListProperty for TYPE_NETWORK, |
| 279 // however that prevents us from receiving Strength updates from inactive | 279 // however that prevents us from receiving Strength updates from inactive |
| 280 // networks. The overhead for observing all services is not unreasonable | 280 // networks. The overhead for observing all services is not unreasonable |
| 281 // (and we limit the max number of observed services to kMaxObserved). | 281 // (and we limit the max number of observed services to kMaxObserved). |
| 282 UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist); | 282 UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist); |
| 283 } | 283 } |
| 284 } else if (key == flimflam::kDevicesProperty) { | 284 } else if (key == flimflam::kDevicesProperty) { |
| 285 const ListValue* vlist = GetListValue(key, value); | 285 const base::ListValue* vlist = GetListValue(key, value); |
| 286 if (vlist) { | 286 if (vlist) { |
| 287 listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_DEVICE, *vlist); | 287 listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_DEVICE, *vlist); |
| 288 UpdateObserved(ManagedState::MANAGED_TYPE_DEVICE, *vlist); | 288 UpdateObserved(ManagedState::MANAGED_TYPE_DEVICE, *vlist); |
| 289 } | 289 } |
| 290 } else if (key == flimflam::kAvailableTechnologiesProperty) { | 290 } else if (key == flimflam::kAvailableTechnologiesProperty) { |
| 291 const base::ListValue* vlist = GetListValue(key, value); | 291 const base::ListValue* vlist = GetListValue(key, value); |
| 292 if (vlist) { | 292 if (vlist) { |
| 293 UpdateAvailableTechnologies(*vlist); | 293 UpdateAvailableTechnologies(*vlist); |
| 294 notify_manager_changed = true; | 294 notify_manager_changed = true; |
| 295 } | 295 } |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 504 |
| 505 void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( | 505 void ShillPropertyHandler::NetworkDevicePropertyChangedCallback( |
| 506 const std::string& path, | 506 const std::string& path, |
| 507 const std::string& key, | 507 const std::string& key, |
| 508 const base::Value& value) { | 508 const base::Value& value) { |
| 509 listener_->UpdateDeviceProperty(path, key, value); | 509 listener_->UpdateDeviceProperty(path, key, value); |
| 510 } | 510 } |
| 511 | 511 |
| 512 } // namespace internal | 512 } // namespace internal |
| 513 } // namespace chromeos | 513 } // namespace chromeos |
| OLD | NEW |