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

Unified Diff: chrome/browser/media_gallery/media_device_notifications_chromeos.cc

Issue 10780023: Change base::SystemMonitor's media device functions to take a type and string16 instead of a FilePa… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix cros Created 8 years, 5 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_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,8 @@
#include "base/file_path.h"
#include "base/logging.h"
#include "base/stl_util.h"
+#include "base/string_number_conversions.h"
+#include "base/utf_string_conversions.h"
#include "chrome/browser/media_gallery/media_device_notifications_utils.h"
#include "content/public/browser/browser_thread.h"
@@ -17,7 +19,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 +101,13 @@
NOTREACHED();
return;
}
- mount_map_.insert(std::make_pair(mount_info.mount_path, current_device_id_));
+ const std::string device_id_str = base::IntToString(current_device_id_++);
+ mount_map_.insert(std::make_pair(mount_info.mount_path, device_id_str));
base::SystemMonitor::Get()->ProcessMediaDeviceAttached(
- current_device_id_++,
- FilePath(mount_info.source_path).BaseName().value(),
- FilePath(mount_info.mount_path));
+ device_id_str,
+ UTF8ToUTF16(FilePath(mount_info.source_path).BaseName().value()),
+ base::SystemMonitor::TYPE_PATH,
+ mount_info.mount_path);
}
} // namespace chrome

Powered by Google App Engine
This is Rietveld 408576698