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

Unified Diff: chrome/browser/system_monitor/removable_device_notifications_linux.cc

Issue 12147002: Add a receiver interface to RemovableStorageNotifications. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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/removable_device_notifications_linux.cc
diff --git a/chrome/browser/system_monitor/removable_device_notifications_linux.cc b/chrome/browser/system_monitor/removable_device_notifications_linux.cc
index af787a5cadfc8b1f80b0fab80e86fdf93a86b548..646ab1f1aaa9ed68a01f33d78481506295082826 100644
--- a/chrome/browser/system_monitor/removable_device_notifications_linux.cc
+++ b/chrome/browser/system_monitor/removable_device_notifications_linux.cc
@@ -351,7 +351,7 @@ void RemovableDeviceNotificationsLinux::UpdateMtab() {
if (MediaStorageUtil::IsRemovableDevice(old_iter->second.device_id)) {
DCHECK(has_priority != priority->second.end());
if (has_priority->second) {
- ProcessDetach(old_iter->second.device_id);
+ receiver_->ProcessDetach(old_iter->second.device_id);
}
if (priority->second.size() > 1)
multiple_mounted_devices_needing_reattachment.push_back(mount_device);
@@ -387,8 +387,8 @@ void RemovableDeviceNotificationsLinux::UpdateMtab() {
const MountPointInfo& mount_info =
mount_info_map_.find(mount_point)->second;
DCHECK(MediaStorageUtil::IsRemovableDevice(mount_info.device_id));
- ProcessAttach(
- mount_info.device_id, mount_info.device_name, mount_point.value());
+ receiver_->ProcessAttach(StorageInfo(
+ mount_info.device_id, mount_info.device_name, mount_point.value()));
}
// Check new mtab entries against existing ones.
@@ -453,9 +453,9 @@ void RemovableDeviceNotificationsLinux::AddNewMount(
mount_priority_map_[mount_device][mount_point] = removable;
if (removable) {
- ProcessAttach(
+ receiver_->ProcessAttach(StorageInfo(
device_id, GetDisplayNameForDevice(partition_size_in_bytes, name),
- mount_point.value());
+ mount_point.value()));
}
}

Powered by Google App Engine
This is Rietveld 408576698