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

Unified Diff: base/system_monitor/system_monitor.cc

Issue 10829384: SystemMonitor: Pull device type into the device id (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comment 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
« no previous file with comments | « base/system_monitor/system_monitor.h ('k') | base/system_monitor/system_monitor_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/system_monitor/system_monitor.cc
diff --git a/base/system_monitor/system_monitor.cc b/base/system_monitor/system_monitor.cc
index 5df0557f19be209036a7af25216bef09192fe7e7..8cff63be19a92e03d55d8350a1cb070c0b3c0e40 100644
--- a/base/system_monitor/system_monitor.cc
+++ b/base/system_monitor/system_monitor.cc
@@ -25,11 +25,9 @@ static int kDelayedBatteryCheckMs = 10 * 1000;
SystemMonitor::MediaDeviceInfo::MediaDeviceInfo(
const std::string& id,
const string16& device_name,
- MediaDeviceType device_type,
const FilePath::StringType& device_location)
: unique_id(id),
name(device_name),
- type(device_type),
location(device_location) {
}
@@ -101,16 +99,15 @@ void SystemMonitor::ProcessDevicesChanged(DeviceType device_type) {
void SystemMonitor::ProcessMediaDeviceAttached(
const std::string& id,
const string16& name,
- MediaDeviceType type,
const FilePath::StringType& location) {
- MediaDeviceInfo info(id, name, type, location);
+ MediaDeviceInfo info(id, name, location);
if (ContainsKey(media_device_map_, id)) {
// This can happen if our unique id scheme fails. Ignore the incoming
// non-unique attachment.
return;
}
media_device_map_.insert(std::make_pair(id, info));
- NotifyMediaDeviceAttached(id, name, type, location);
+ NotifyMediaDeviceAttached(id, name, location);
}
void SystemMonitor::ProcessMediaDeviceDetached(const std::string& id) {
@@ -157,12 +154,11 @@ void SystemMonitor::NotifyDevicesChanged(DeviceType device_type) {
void SystemMonitor::NotifyMediaDeviceAttached(
const std::string& id,
const string16& name,
- MediaDeviceType type,
const FilePath::StringType& location) {
DVLOG(1) << "MediaDeviceAttached with name " << UTF16ToUTF8(name)
<< " and id " << id;
devices_changed_observer_list_->Notify(
- &DevicesChangedObserver::OnMediaDeviceAttached, id, name, type, location);
+ &DevicesChangedObserver::OnMediaDeviceAttached, id, name, location);
}
void SystemMonitor::NotifyMediaDeviceDetached(const std::string& id) {
« no previous file with comments | « base/system_monitor/system_monitor.h ('k') | base/system_monitor/system_monitor_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698