Index: chrome/browser/media_gallery/media_device_notifications_linux.h |
diff --git a/chrome/browser/media_gallery/media_device_notifications_linux.h b/chrome/browser/media_gallery/media_device_notifications_linux.h |
index 67393ae70615f59c88d5702b265075b70fb74386..dccb9a6a55ba811aca7a1bee687e01a4b87ab9b8 100644 |
--- a/chrome/browser/media_gallery/media_device_notifications_linux.h |
+++ b/chrome/browser/media_gallery/media_device_notifications_linux.h |
@@ -45,6 +45,11 @@ class MediaDeviceNotificationsLinux |
virtual void OnFilePathChanged(const FilePath& path, bool error); |
+ // Get mounted device properties. This function is exposed for unit test. |
+ virtual bool GetDeviceInfo(const std::string& dev_path, |
Lei Zhang
2012/08/09 03:47:16
I suspect you can make this private.
kmadhusu
2012/08/09 08:10:03
Done.
|
+ std::string* device_label, |
+ string16* device_name); |
+ |
private: |
friend class base::RefCountedThreadSafe<MediaDeviceNotificationsLinux>; |
friend class base::DeleteHelper<MediaDeviceNotificationsLinux>; |
@@ -56,13 +61,17 @@ class MediaDeviceNotificationsLinux |
// Mapping of mount points to MountDeviceAndId. |
typedef std::map<std::string, MountDeviceAndId> MountMap; |
+ // (mount point, mount device) |
+ // Helper map to get new entries from mtab file. |
+ typedef std::map<std::string, std::string> MountPointDeviceMap; |
+ |
void InitOnFileThread(); |
// Parse the mtab file and find all changes. |
void UpdateMtab(); |
// Read the mtab file entries into |mtab|. |
- void ReadMtab(MountMap* mtab); |
+ void ReadMtab(MountPointDeviceMap* mtab); |
// Add a media device with a given device and mount device. Assign it a device |
// id as well. |
@@ -87,10 +96,6 @@ class MediaDeviceNotificationsLinux |
// and multiple devices can be mounted at a mount point. |
MountMap mtab_; |
- // The lowest available device id number. |
- // TODO(thestig) Remove this and use a real per-device unique id instead. |
- int current_device_id_; |
- |
// Set of known file systems that we care about. |
std::set<std::string> known_file_systems_; |