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

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

Issue 10829160: Created a helper function "FindDiskBySourcePath" in DiskMountManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_chromeos.cc
diff --git a/chrome/browser/media_gallery/media_device_notifications_chromeos.cc b/chrome/browser/media_gallery/media_device_notifications_chromeos.cc
index f8bb783faee3b50d9487b42f756a8025b1451759..ac4486276bc3ef436100bad2409dc13bdb5b4068 100644
--- a/chrome/browser/media_gallery/media_device_notifications_chromeos.cc
+++ b/chrome/browser/media_gallery/media_device_notifications_chromeos.cc
@@ -21,10 +21,9 @@ namespace {
std::string GetDeviceUuid(const std::string& source_path) {
// Get the media device uuid if exists.
- const disks::DiskMountManager::DiskMap& disks =
- disks::DiskMountManager::GetInstance()->disks();
- disks::DiskMountManager::DiskMap::const_iterator it = disks.find(source_path);
- return it == disks.end() ? std::string() : it->second->fs_uuid();
+ const disks::DiskMountManager::Disk* disk =
+ disks::DiskMountManager::GetInstance()->FindDiskBySourcePath(source_path);
+ return disk == NULL ? std::string() : disk->fs_uuid();
Ben Chan 2012/08/03 15:04:55 return disk ? disk->fs_uuid() : std::string();
kmadhusu 2012/08/03 18:13:52 Fixed.
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698