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

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: 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/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..3900e36e2256282ef0ec7dc177d5b329aeee4f54 100644
--- a/chrome/browser/system_monitor/volume_mount_watcher_win.cc
+++ b/chrome/browser/system_monitor/volume_mount_watcher_win.cc
@@ -15,7 +15,6 @@
#include "chrome/browser/system_monitor/media_storage_util.h"
#include "content/public/browser/browser_thread.h"
-using base::SystemMonitor;
using content::BrowserThread;
namespace {
@@ -240,11 +239,13 @@ void VolumeMountWatcherWin::HandleDeviceAttachEventOnUIThread(
info.device_id = device_id;
device_metadata_[device_path.value()] = info;
- SystemMonitor* monitor = SystemMonitor::Get();
- if (monitor) {
+ device_ids_[device_location] = device_id;
+ RemovableStoragNotifications* notifications =
+ RemovableStorageNotifications::Get();
+ if (notifications) {
string16 display_name = GetDisplayNameForDevice(0, device_name);
- monitor->ProcessRemovableStorageAttached(device_id, display_name,
- device_path.value());
+ notifications->ProcessRemovableStorageAttached(device_id, display_name,
+ device_path.value());
}
}
@@ -257,8 +258,9 @@ void VolumeMountWatcherWin::HandleDeviceDetachEventOnUIThread(
if (device_info == device_metadata_.end())
return;
- SystemMonitor* monitor = SystemMonitor::Get();
- if (monitor)
+ RemovableStoragNotifications* notifications =
+ RemovableStorageNotifications::Get();
+ if (notifications)
monitor->ProcessRemovableStorageDetached(device_info->second.device_id);
device_metadata_.erase(device_info);
}

Powered by Google App Engine
This is Rietveld 408576698