Skip to content

Commit

Permalink
Ignore Manager.Services list in ShillPropertyHandler
Browse files Browse the repository at this point in the history
We were calling UpdateObserved() for both Manager.Services and
ServiceCompleteList which was incorrect.

It turns out that Shill may push the Service.Visible property before
adding a service to Manager.Services, so if we only observer entries in
Manager.Services we will miss the update.

The easiest (and possibly only robust) fix is to call UpdateObserved()
for ServiceCompleteList and ignore Services entirely. This means that we
observe all services, even non-visible ones, but the extra overhead
should be negligible.

BUG=388423
R=armansito@chromium.org

Review URL: https://codereview.chromium.org/355573004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@279900 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
stevenjb@chromium.org committed Jun 26, 2014
1 parent 180fa2d commit 9679003
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions chromeos/network/shill_property_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -272,15 +272,6 @@ void ShillPropertyHandler::ManagerPropertyChanged(const std::string& key,
std::string service_path;
value.GetAsString(&service_path);
listener_->DefaultNetworkServiceChanged(service_path);
} else if (key == shill::kServicesProperty) {
const base::ListValue* vlist = GetListValue(key, value);
if (vlist) {
// We only use the Services property to determine which networks we
// observe. This is more convenient and reliable than waiting to revceive
// the Visible property of each kServiceCompleteList entry. We limit the
// number of observed networks to kMaxObserved.
UpdateObserved(ManagedState::MANAGED_TYPE_NETWORK, *vlist);
}
} else if (key == shill::kServiceCompleteListProperty) {
const base::ListValue* vlist = GetListValue(key, value);
if (vlist) {
Expand Down

0 comments on commit 9679003

Please sign in to comment.