| Index: chrome/browser/system_monitor/portable_device_watcher_win.cc
|
| diff --git a/chrome/browser/system_monitor/portable_device_watcher_win.cc b/chrome/browser/system_monitor/portable_device_watcher_win.cc
|
| index 60baedfdea4ba77d7782582acf4859852ad32870..b755bfbe39857fc02f2fe8c93db039bb3587e7aa 100644
|
| --- a/chrome/browser/system_monitor/portable_device_watcher_win.cc
|
| +++ b/chrome/browser/system_monitor/portable_device_watcher_win.cc
|
| @@ -565,8 +565,9 @@ void PortableDeviceWatcherWin::OnDidHandleDeviceAttachEvent(
|
| const string16& name = device_details->name;
|
| const string16& location = device_details->location;
|
| DCHECK(!ContainsKey(device_map_, location));
|
| - base::SystemMonitor* system_monitor = base::SystemMonitor::Get();
|
| - DCHECK(system_monitor);
|
| + RemovableStorageNotifications* notifications =
|
| + RemovableStorageNotifications::Get();
|
| + DCHECK(notifications);
|
| for (StorageObjects::const_iterator storage_iter = storage_objects.begin();
|
| storage_iter != storage_objects.end(); ++storage_iter) {
|
| const std::string& storage_id = storage_iter->object_persistent_id;
|
| @@ -583,9 +584,9 @@ void PortableDeviceWatcherWin::OnDidHandleDeviceAttachEvent(
|
| string16 storage_name(name + L" (" + storage_iter->object_temporary_id +
|
| L')');
|
| storage_map_[storage_id] =
|
| - base::SystemMonitor::RemovableStorageInfo(storage_id, storage_name,
|
| - location);
|
| - system_monitor->ProcessRemovableStorageAttached(
|
| + RemovableStorageInfo(storage_id, storage_name,
|
| + location);
|
| + notifications->ProcessRemovableStorageAttached(
|
| storage_id, storage_name, GetStoragePathFromStorageId(storage_id));
|
| }
|
| device_map_[location] = storage_objects;
|
| @@ -598,8 +599,9 @@ void PortableDeviceWatcherWin::HandleDeviceDetachEvent(
|
| if (device_iter == device_map_.end())
|
| return;
|
|
|
| - base::SystemMonitor* system_monitor = base::SystemMonitor::Get();
|
| - DCHECK(system_monitor);
|
| + RemovableStorageNotifications* notifications =
|
| + RemovableStorageNotifications::Get();
|
| + DCHECK(notifications);
|
|
|
| const StorageObjects& storage_objects = device_iter->second;
|
| for (StorageObjects::const_iterator storage_object_iter =
|
| @@ -608,7 +610,7 @@ void PortableDeviceWatcherWin::HandleDeviceDetachEvent(
|
| std::string storage_id = storage_object_iter->object_persistent_id;
|
| MTPStorageMap::iterator storage_map_iter = storage_map_.find(storage_id);
|
| DCHECK(storage_map_iter != storage_map_.end());
|
| - system_monitor->ProcessRemovableStorageDetached(
|
| + notifications->ProcessRemovableStorageDetached(
|
| storage_map_iter->second.device_id);
|
| storage_map_.erase(storage_map_iter);
|
| }
|
|
|