cashew: SeviceManager: remove incorrect assert
In ServiceManager::ClearDefaultCellularService, we have the following
assert:
DCHECK(GetService(default_cellular_service_->GetPath()) != NULL);
This checks that we can look up the service pointed to by
|default_cellular_service_| with GetService, meaning that it's in our
|services_| collection.
The intent was to check that |default_cellular_service_| points to a
valid service before we attempt to interact with it, but this check is
inappropriate, because it is not always true that the default service is
in the |services_| collection.
In OnServicesUpdate, it's possible for ClearDefaultCellularService to be
called after the default service has been moved from |services_| to
|old_services| in preparation for its deletion. In this scenario,
GetService will fail to locate it and trip the assert even though
|default_cellular_service_| still points to a valid Service object.
Resolution:
Remove the assert. Our expectation was incorrect.
BUG=chromium-os:8935
TEST=Manual testing on device
Change-Id: I941b9dd06985b92737f553b215924792c7748575
Review URL: http://codereview.chromium.org/4746002
1 file changed