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

Unified Diff: chrome/browser/chromeos/extensions/file_browser_event_router.cc

Issue 10829160: Created a helper function "FindDiskBySourcePath" in DiskMountManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser test 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/extensions/file_browser_event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_browser_event_router.cc b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
index 585897826ac78b85c5f1579eba6f254fee28db27..01dd0ddc605a13bbdd8388faa44f6b70803d5a60 100644
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc
@@ -340,12 +340,10 @@ void FileBrowserEventRouter::MountCompleted(
if (mount_info.mount_type == chromeos::MOUNT_TYPE_DEVICE &&
event_type == DiskMountManager::MOUNTING) {
DiskMountManager* disk_mount_manager = DiskMountManager::GetInstance();
- DiskMountManager::DiskMap::const_iterator disk_it =
- disk_mount_manager->disks().find(mount_info.source_path);
- if (disk_it == disk_mount_manager->disks().end()) {
+ const DiskMountManager::Disk* disk =
+ disk_mount_manager->FindDiskBySourcePath(mount_info.source_path);
+ if (!disk)
return;
- }
- DiskMountManager::Disk* disk = disk_it->second;
notifications_->ManageNotificationsOnMountCompleted(
disk->system_path_prefix(), disk->drive_label(), disk->is_parent(),

Powered by Google App Engine
This is Rietveld 408576698