Index: base/system_monitor/system_monitor.cc |
diff --git a/base/system_monitor/system_monitor.cc b/base/system_monitor/system_monitor.cc |
index 6db1db582646ad2b8d1b0b39cc7c0ebeb7a136b4..a4666c17aeecb8e161d6994f319f3fe106a441a7 100644 |
--- a/base/system_monitor/system_monitor.cc |
+++ b/base/system_monitor/system_monitor.cc |
@@ -104,9 +104,10 @@ void SystemMonitor::ProcessMediaDeviceAttached( |
void SystemMonitor::ProcessMediaDeviceDetached(const std::string& id) { |
MediaDeviceMap::iterator it = media_device_map_.find(id); |
+ const FilePath::StringType location = it->second.location; |
if (it != media_device_map_.end()) |
media_device_map_.erase(it); |
- NotifyMediaDeviceDetached(id); |
+ NotifyMediaDeviceDetached(id, location); |
} |
std::vector<SystemMonitor::MediaDeviceInfo> |
@@ -153,10 +154,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() { |