diff options
author | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-03 07:31:12 +0000 |
---|---|---|
committer | kmadhusu@chromium.org <kmadhusu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-08-03 07:31:12 +0000 |
commit | cf4b6d6d8a47f92b87674420c11f986239c51f99 (patch) | |
tree | fe4e403a914f00704904bad8bfaa7e9d0a32de6b /base | |
parent | eca0309696107bfe15da47f43b67c36d6790f1f8 (diff) | |
download | chromium_src-cf4b6d6d8a47f92b87674420c11f986239c51f99.zip chromium_src-cf4b6d6d8a47f92b87674420c11f986239c51f99.tar.gz chromium_src-cf4b6d6d8a47f92b87674420c11f986239c51f99.tar.bz2 |
Isolated FS for Media devices.
Implemented a skeleton code to handle media file systems.
BUG=140332
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10781014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149807 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r-- | base/system_monitor/system_monitor.cc | 5 | ||||
-rw-r--r-- | base/system_monitor/system_monitor_unittest.cc | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/base/system_monitor/system_monitor.cc b/base/system_monitor/system_monitor.cc index 22f91d7..d1dd439 100644 --- a/base/system_monitor/system_monitor.cc +++ b/base/system_monitor/system_monitor.cc @@ -104,8 +104,9 @@ void SystemMonitor::ProcessMediaDeviceAttached( void SystemMonitor::ProcessMediaDeviceDetached(const std::string& id) { MediaDeviceMap::iterator it = media_device_map_.find(id); - if (it != media_device_map_.end()) - media_device_map_.erase(it); + if (it == media_device_map_.end()) + return; + media_device_map_.erase(it); NotifyMediaDeviceDetached(id); } diff --git a/base/system_monitor/system_monitor_unittest.cc b/base/system_monitor/system_monitor_unittest.cc index d3a99fb..e724e83 100644 --- a/base/system_monitor/system_monitor_unittest.cc +++ b/base/system_monitor/system_monitor_unittest.cc @@ -131,7 +131,7 @@ TEST_F(SystemMonitorTest, DeviceChangeNotifications) { EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId1)) .InSequence(mock_sequencer[index]); EXPECT_CALL(observers[index], OnMediaDeviceDetached(kDeviceId2)) - .InSequence(mock_sequencer[index]); + .Times(0).InSequence(mock_sequencer[index]); } system_monitor_->ProcessDevicesChanged(base::SystemMonitor::DEVTYPE_UNKNOWN); |