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

Unified Diff: chrome/browser/media_gallery/media_device_notifications_linux.h

Issue 10829228: [LINUX] Extract the name and id of the device and send it along the device attach message. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 4 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/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..542f8ece49574ef9e02948cae227b959a30c6f48 100644
--- a/chrome/browser/media_gallery/media_device_notifications_linux.h
+++ b/chrome/browser/media_gallery/media_device_notifications_linux.h
@@ -56,13 +56,22 @@ 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;
+
+ // Get mounted device properties. This function is exposed for unit test.
+ virtual bool GetDeviceInfo(const std::string& dev_path,
kmadhusu 2012/08/09 23:41:29 Moved this function to anonymous namespace and inc
+ std::string* device_label,
+ string16* device_name);
+
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_;
vandebo (ex-Chrome) 2012/08/09 17:52:35 This is more than the mtab now, right? mtab_ -> m
kmadhusu 2012/08/09 23:41:29 Done.
- // 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_;

Powered by Google App Engine
This is Rietveld 408576698