Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Unified Diff: chromeos/network/shill_property_handler.cc

Issue 14813021: Observe property updates for all Network Services (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chromeos/network/shill_property_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/shill_property_handler.cc
diff --git a/chromeos/network/shill_property_handler.cc b/chromeos/network/shill_property_handler.cc
index e6efd65920689a105bf81ded15f88d5fcdd28491..968b9bc7941f2859b13c4c295b4a30d6ab08f0da 100644
--- a/chromeos/network/shill_property_handler.cc
+++ b/chromeos/network/shill_property_handler.cc
@@ -205,9 +205,9 @@ void ShillPropertyHandler::OnPropertyChanged(const std::string& key,
const base::Value& value) {
if (ManagerPropertyChanged(key, value))
listener_->ManagerPropertyChanged();
- // If the service watch or device list changed and there are no pending
+ // If the service or device list changed and there are no pending
// updates, signal the state list changed callback.
- if ((key == flimflam::kServiceWatchListProperty) &&
+ if ((key == flimflam::kServicesProperty) &&
pending_updates_[ManagedState::MANAGED_TYPE_NETWORK].size() == 0) {
listener_->ManagedStateListChanged(ManagedState::MANAGED_TYPE_NETWORK);
}
@@ -258,11 +258,12 @@ bool ShillPropertyHandler::ManagerPropertyChanged(const std::string& key,
bool notify_manager_changed = false;
if (key == flimflam::kServicesProperty) {
const base::ListValue* vlist = GetListValue(key, value);
- if (vlist)
- listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
- } else if (key == flimflam::kServiceWatchListProperty) {
- const base::ListValue* vlist = GetListValue(key, value);
if (vlist) {
+ listener_->UpdateManagedList(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
+ // UpdateObserved used to use kServiceWatchListProperty for TYPE_NETWORK,
pneubeck (no reviews) 2013/05/13 10:21:03 shouldn't this be a method comment?
stevenjb 2013/05/13 21:31:40 No, it's really an implementation detail. I'd rath
+ // however that prevents us from receiving Strength updates from inactive
+ // networks. The overhead for observing all services is not unreasonable
+ // (and we limit the max number of observed services to kMaxObserved).
UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
}
} else if (key == flimflam::kDevicesProperty) {
« no previous file with comments | « no previous file | chromeos/network/shill_property_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698