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

Unified Diff: ui/file_manager/file_manager/background/js/device_handler.js

Issue 668013004: Add a has_media flag to VolumeMetadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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: ui/file_manager/file_manager/background/js/device_handler.js
diff --git a/ui/file_manager/file_manager/background/js/device_handler.js b/ui/file_manager/file_manager/background/js/device_handler.js
index bf79b40c4fb6918d3a92c5b10f0c1c496c7af246..2405b39fb1eed8ef80ac935bc069a1e42fdad65d 100644
--- a/ui/file_manager/file_manager/background/js/device_handler.js
+++ b/ui/file_manager/file_manager/background/js/device_handler.js
@@ -308,8 +308,13 @@ DeviceHandler.prototype.onMountCompleted_ = function(event) {
// If the current volume status is succeed and it should be handled in
// Files.app, show the notification to navigate the volume.
if (event.eventType === 'mount' && event.status === 'success') {
- DeviceHandler.Notification.DEVICE_NAVIGATION.show(
- event.volumeMetadata.devicePath);
+ if (!volume.hasMedia) {
+ DeviceHandler.Notification.DEVICE_NAVIGATION.show(
+ event.volumeMetadata.devicePath);
+ } else {
+ DeviceHandler.Notification.DEVICE_IMPORT.show(
+ event.volumeMetadata.devicePath);
+ }
} else if (event.eventType === 'unmount') {
DeviceHandler.Notification.DEVICE_NAVIGATION.hide(volume.devicePath);
}

Powered by Google App Engine
This is Rietveld 408576698