| Index: base/system_monitor/system_monitor.cc
|
| diff --git a/base/system_monitor/system_monitor.cc b/base/system_monitor/system_monitor.cc
|
| index 22f91d777108649c90c97915ce471b724c243304..9ec7c026bd21e6d909e936c9ce8d953a65549491 100644
|
| --- a/base/system_monitor/system_monitor.cc
|
| +++ b/base/system_monitor/system_monitor.cc
|
| @@ -104,9 +104,11 @@ void SystemMonitor::ProcessMediaDeviceAttached(
|
|
|
| void SystemMonitor::ProcessMediaDeviceDetached(const std::string& id) {
|
| MediaDeviceMap::iterator it = media_device_map_.find(id);
|
| - if (it != media_device_map_.end())
|
| - media_device_map_.erase(it);
|
| - NotifyMediaDeviceDetached(id);
|
| + if (it == media_device_map_.end())
|
| + return;
|
| +
|
| + NotifyMediaDeviceDetached(id, it->second.location);
|
| + media_device_map_.erase(it);
|
| }
|
|
|
| std::vector<SystemMonitor::MediaDeviceInfo>
|
| @@ -153,10 +155,12 @@ void SystemMonitor::NotifyMediaDeviceAttached(
|
| &DevicesChangedObserver::OnMediaDeviceAttached, id, name, type, location);
|
| }
|
|
|
| -void SystemMonitor::NotifyMediaDeviceDetached(const std::string& id) {
|
| +void SystemMonitor::NotifyMediaDeviceDetached(
|
| + const std::string& id,
|
| + const FilePath::StringType& location) {
|
| DVLOG(1) << "MediaDeviceDetached for id " << id;
|
| devices_changed_observer_list_->Notify(
|
| - &DevicesChangedObserver::OnMediaDeviceDetached, id);
|
| + &DevicesChangedObserver::OnMediaDeviceDetached, id, location);
|
| }
|
|
|
| void SystemMonitor::NotifyPowerStateChange() {
|
|
|