Index: chrome/browser/media_gallery/media_device_notifications_chromeos.cc |
=================================================================== |
--- chrome/browser/media_gallery/media_device_notifications_chromeos.cc (revision 147551) |
+++ chrome/browser/media_gallery/media_device_notifications_chromeos.cc (working copy) |
@@ -9,6 +9,7 @@ |
#include "base/file_path.h" |
#include "base/logging.h" |
#include "base/stl_util.h" |
+#include "base/string_number_conversions.h" |
#include "chrome/browser/media_gallery/media_device_notifications_utils.h" |
#include "content/public/browser/browser_thread.h" |
@@ -17,7 +18,7 @@ |
using content::BrowserThread; |
MediaDeviceNotifications::MediaDeviceNotifications() |
- : current_device_id_(0U) { |
+ : current_device_id_(0) { |
DCHECK(disks::DiskMountManager::GetInstance()); |
disks::DiskMountManager::GetInstance()->AddObserver(this); |
} |
@@ -99,11 +100,14 @@ |
NOTREACHED(); |
return; |
} |
- mount_map_.insert(std::make_pair(mount_info.mount_path, current_device_id_)); |
+ const std::string16 device_id_str = |
+ base::IntToString16(current_device_id_++); |
+ mount_map_.insert(std::make_pair(mount_info.mount_path, device_id_str)); |
base::SystemMonitor::Get()->ProcessMediaDeviceAttached( |
- current_device_id_++, |
+ device_id_str, |
FilePath(mount_info.source_path).BaseName().value(), |
- FilePath(mount_info.mount_path)); |
+ base::SystemMonitor::TYPE_PATH, |
+ mount_info.mount_path); |
} |
} // namespace chrome |