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

Unified Diff: chrome/browser/system_monitor/volume_mount_watcher_win.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: Make singleton pointer live in base class. Created 7 years, 11 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/system_monitor/volume_mount_watcher_win.cc
diff --git a/chrome/browser/system_monitor/volume_mount_watcher_win.cc b/chrome/browser/system_monitor/volume_mount_watcher_win.cc
index 41b757429421f16aa4c80a578396651bf4ca7986..d9e65c51fad949e4669449573fcd57d04c87a3ba 100644
--- a/chrome/browser/system_monitor/volume_mount_watcher_win.cc
+++ b/chrome/browser/system_monitor/volume_mount_watcher_win.cc
@@ -13,9 +13,9 @@
#include "base/utf_string_conversions.h"
#include "chrome/browser/system_monitor/media_device_notifications_utils.h"
#include "chrome/browser/system_monitor/media_storage_util.h"
+#include "chrome/browser/system_monitor/removable_storage_notifications.h"
#include "content/public/browser/browser_thread.h"
-using base::SystemMonitor;
using content::BrowserThread;
namespace {
@@ -240,11 +240,11 @@ void VolumeMountWatcherWin::HandleDeviceAttachEventOnUIThread(
info.device_id = device_id;
device_metadata_[device_path.value()] = info;
- SystemMonitor* monitor = SystemMonitor::Get();
- if (monitor) {
+ RemovableStorageNotifications* notifications =
+ RemovableStorageNotifications::GetInstance();
+ if (notifications) {
string16 display_name = GetDisplayNameForDevice(0, device_name);
- monitor->ProcessRemovableStorageAttached(device_id, display_name,
- device_path.value());
+ notifications->ProcessAttach(device_id, display_name, device_path.value());
}
}
@@ -257,9 +257,10 @@ void VolumeMountWatcherWin::HandleDeviceDetachEventOnUIThread(
if (device_info == device_metadata_.end())
return;
- SystemMonitor* monitor = SystemMonitor::Get();
- if (monitor)
- monitor->ProcessRemovableStorageDetached(device_info->second.device_id);
+ RemovableStorageNotifications* notifications =
+ RemovableStorageNotifications::GetInstance();
+ if (notifications)
+ notifications->ProcessDetach(device_info->second.device_id);
device_metadata_.erase(device_info);
}

Powered by Google App Engine
This is Rietveld 408576698