| Index: chrome/browser/media_gallery/media_galleries_dialog_controller.cc
|
| diff --git a/chrome/browser/media_gallery/media_galleries_dialog_controller.cc b/chrome/browser/media_gallery/media_galleries_dialog_controller.cc
|
| index a5aabbbce25a7a96992e94257fcb7aa12dc8e251..c950a17fc78d7733a7d321d6e879c014d739bfb3 100644
|
| --- a/chrome/browser/media_gallery/media_galleries_dialog_controller.cc
|
| +++ b/chrome/browser/media_gallery/media_galleries_dialog_controller.cc
|
| @@ -28,8 +28,9 @@ bool IsAttachedDevice(const std::string& device_id) {
|
| if (!MediaStorageUtil::IsRemovableDevice(device_id))
|
| return false;
|
|
|
| - std::vector<base::SystemMonitor::RemovableStorageInfo> removable_storages =
|
| - base::SystemMonitor::Get()->GetAttachedRemovableStorage();
|
| + std::vector<RemovableStorageNotifications::RemovableStorageInfo>
|
| + removable_storages = RemovableStorageNotifications::GetInstance()->
|
| + GetAttachedRemovableStorage();
|
| for (size_t i = 0; i < removable_storages.size(); ++i) {
|
| if (removable_storages[i].device_id == device_id)
|
| return true;
|
| @@ -54,9 +55,10 @@ MediaGalleriesDialogController::MediaGalleriesDialogController(
|
|
|
| dialog_.reset(MediaGalleriesDialog::Create(this));
|
|
|
| - base::SystemMonitor* monitor = base::SystemMonitor::Get();
|
| - if (monitor)
|
| - monitor->AddDevicesChangedObserver(this);
|
| + RemovableStorageNotifications* notifications =
|
| + RemovableStorageNotifications::GetInstance();
|
| + if (notifications)
|
| + notifications->AddRemovableStorageObserver(this);
|
| }
|
|
|
| MediaGalleriesDialogController::MediaGalleriesDialogController()
|
| @@ -65,9 +67,10 @@ MediaGalleriesDialogController::MediaGalleriesDialogController()
|
| preferences_(NULL) {}
|
|
|
| MediaGalleriesDialogController::~MediaGalleriesDialogController() {
|
| - base::SystemMonitor* monitor = base::SystemMonitor::Get();
|
| - if (monitor)
|
| - monitor->RemoveDevicesChangedObserver(this);
|
| + RemovableStorageNotifications* notifications =
|
| + RemovableStorageNotifications::GetInstance();
|
| + if (notifications)
|
| + notifications->RemoveRemovableStorageObserver(this);
|
|
|
| if (select_folder_dialog_.get())
|
| select_folder_dialog_->ListenerDestroyed();
|
|
|