| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // RemovableDeviceNotificationsLinux listens for mount point changes, notifies | 5 // RemovableDeviceNotificationsLinux listens for mount point changes, notifies |
| 6 // the SystemMonitor about the addition and deletion of media devices, and | 6 // the SystemMonitor about the addition and deletion of media devices, and |
| 7 // answers queries about mounted devices. | 7 // answers queries about mounted devices. |
| 8 | 8 |
| 9 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ | 9 #ifndef CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ |
| 10 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ | 10 #define CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 private: | 72 private: |
| 73 friend class base::RefCountedThreadSafe<RemovableDeviceNotificationsLinux>; | 73 friend class base::RefCountedThreadSafe<RemovableDeviceNotificationsLinux>; |
| 74 friend class base::DeleteHelper<RemovableDeviceNotificationsLinux>; | 74 friend class base::DeleteHelper<RemovableDeviceNotificationsLinux>; |
| 75 friend struct content::BrowserThread::DeleteOnThread< | 75 friend struct content::BrowserThread::DeleteOnThread< |
| 76 content::BrowserThread::FILE>; | 76 content::BrowserThread::FILE>; |
| 77 | 77 |
| 78 // Structure to save mounted device information such as device path and unique | 78 // Structure to save mounted device information such as device path and unique |
| 79 // identifier. | 79 // identifier. |
| 80 struct MountPointInfo { | 80 struct MountPointInfo { |
| 81 MountPointInfo(); | |
| 82 | |
| 83 FilePath mount_device; | 81 FilePath mount_device; |
| 84 std::string device_id; | 82 std::string device_id; |
| 85 string16 device_name; | 83 string16 device_name; |
| 86 }; | 84 }; |
| 87 | 85 |
| 88 // Mapping of mount points to MountPointInfo. | 86 // Mapping of mount points to MountPointInfo. |
| 89 typedef std::map<FilePath, MountPointInfo> MountMap; | 87 typedef std::map<FilePath, MountPointInfo> MountMap; |
| 90 | 88 |
| 91 // (mount point, priority) | 89 // (mount point, priority) |
| 92 // For devices that are mounted to multiple mount points, this helps us track | 90 // For devices that are mounted to multiple mount points, this helps us track |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 // to notify about it's departure and notify about another one of it's mount | 132 // to notify about it's departure and notify about another one of it's mount |
| 135 // points. | 133 // points. |
| 136 MountPriorityMap mount_priority_map_; | 134 MountPriorityMap mount_priority_map_; |
| 137 | 135 |
| 138 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsLinux); | 136 DISALLOW_COPY_AND_ASSIGN(RemovableDeviceNotificationsLinux); |
| 139 }; | 137 }; |
| 140 | 138 |
| 141 } // namespace chrome | 139 } // namespace chrome |
| 142 | 140 |
| 143 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ | 141 #endif // CHROME_BROWSER_SYSTEM_MONITOR_REMOVABLE_DEVICE_NOTIFICATIONS_LINUX_H_ |
| OLD | NEW |