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

Unified Diff: chrome/browser/chromeos/disks/disk_mount_manager.cc

Issue 10829160: Created a helper function "FindDiskBySourcePath" in DiskMountManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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/chromeos/disks/disk_mount_manager.cc
diff --git a/chrome/browser/chromeos/disks/disk_mount_manager.cc b/chrome/browser/chromeos/disks/disk_mount_manager.cc
index 98e24ac92405d89a489cf84ec2d15ba4b40416c5..388259c4e48af3222ec7a9be6471cab55d5b7ab9 100644
--- a/chrome/browser/chromeos/disks/disk_mount_manager.cc
+++ b/chrome/browser/chromeos/disks/disk_mount_manager.cc
@@ -230,6 +230,12 @@ class DiskMountManagerImpl : public DiskMountManager {
// DiskMountManager override.
const DiskMap& disks() const OVERRIDE { return disks_; }
+ // DiskMountManager override.
+ virtual const Disk* FindDiskBySourcePath(const std::string& source_path)
+ const OVERRIDE {
+ DiskMap::const_iterator disk_it = disks_.find(source_path);
+ return disk_it == disks_.end() ? NULL : disk_it->second;
+ }
// DiskMountManager override.
const MountPointMap& mount_points() const OVERRIDE { return mount_points_; }

Powered by Google App Engine
This is Rietveld 408576698