Commit d832cbe6 authored by Jun Choi's avatar Jun Choi Committed by Commit Bot

Remove DCHECK on device removal

DCHECK on FidoRequestHandlerBase::OnDeviceRemoved will always fail if
user removes a device that has already been removed due to processing
error.

Bug: 780078
Change-Id: Ica0ee018645936706f1691378e9c7f0ad3fd0ca4
Reviewed-on: https://chromium-review.googlesource.com/1006492
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550139}
parent 488accfc
......@@ -62,8 +62,10 @@ void FidoRequestHandlerBase::DeviceAdded(FidoDiscovery* discovery,
void FidoRequestHandlerBase::DeviceRemoved(FidoDiscovery* discovery,
FidoDevice* device) {
// Device connection has been lost or device has already been removed.
// Thus, calling CancelTask() is not necessary.
DCHECK(base::ContainsKey(ongoing_tasks_, device->GetId()));
// Thus, calling CancelTask() is not necessary. Also, below
// ongoing_tasks_.erase() will have no effect for the devices that have been
// already removed due to processing error or due to invocation of
// CancelOngoingTasks().
ongoing_tasks_.erase(device->GetId());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment