Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1844)

Unified Diff: chrome/browser/media_gallery/media_galleries_dialog_controller.cc

Issue 11573048: [Media Galleries] Move RemovableStorageInfo notifications to chrome namespace (part 2) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to head Created 7 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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();

Powered by Google App Engine
This is Rietveld 408576698