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 a9084fd1991d544b71684d2f4d775ef679601ffc..c4182e574202ba9b7ee1c22227da8e867fbc9fe7 100644 |
--- a/chrome/browser/chromeos/extensions/file_browser_event_router.cc |
+++ b/chrome/browser/chromeos/extensions/file_browser_event_router.cc |
@@ -333,16 +333,10 @@ void ExtensionFileBrowserEventRouter::DispatchMountCompletedEvent( |
FilePath relative_mount_path; |
bool relative_mount_path_set = false; |
- // If the device is corrupted but it's still possible to format it, it will |
- // be fake mounted. |
- // TODO(sidor): Write more general condition when it will possible. |
- bool mount_corrupted_device = |
- (error_code == chromeos::MOUNT_ERROR_UNKNOWN_FILESYSTEM || |
- error_code == chromeos::MOUNT_ERROR_UNSUPORTED_FILESYSTEM) && |
- mount_info.mount_type == chromeos::MOUNT_TYPE_DEVICE; |
- |
- // If there were no error, add mountPath to the event. |
- if (error_code == chromeos::MOUNT_ERROR_NONE || mount_corrupted_device) { |
+ // If there were no error or some special conditions occured, add mountPath |
+ // to the event. |
+ if (error_code == chromeos::MOUNT_ERROR_NONE || |
+ !mount_info.special_data.empty()) { |
// Convert mount point path to relative path with the external file system |
// exposed within File API. |
if (FileManagerUtil::ConvertFileToRelativeFileSystemPath(profile_, |
@@ -362,7 +356,8 @@ void ExtensionFileBrowserEventRouter::DispatchMountCompletedEvent( |
if (relative_mount_path_set && |
mount_info.mount_type == chromeos::MOUNT_TYPE_DEVICE && |
- !mount_corrupted_device && // User should not be bothered by that. |
+ mount_info.special_data != "unreadable_unknown_filesystem" && |
tbarzic
2011/08/24 03:59:44
why not use mount_info.special_data.empty()
sidor
2011/08/24 04:26:06
hmm... I was thinking that in case of some other f
|
+ mount_info.special_data != "unreadable_unsupported_filesystem" && |
event == chromeos::MountLibrary::MOUNTING) { |
FileManagerUtil::ShowFullTabUrl(profile_, FilePath(mount_info.mount_path)); |
} |