Include devices without media as auto-mountable devices.

This CL changes UdevDevice::IsAutoMountable() to include devices without
media such that a DiskAdded event will be sent to the file manager after
a DeviceAdded event for a device without media. The DiskAdded event is
needed by the file manager to dismiss the device notification UI
triggered by the DeviceAdded event. As a result of this change, the file
manager will check to make sure that a device has media before mounting
it.

BUG=chromium-os:27894
TEST=Tested the following:
1. Build cros-disks for {x86,amd64,arm}-generic.
2. Run cros-disks unit tests.
3. Manually insert a device without media to a Cr48 and observe the
   notification from the file manager.

Change-Id: I400db7277db010348dcb7babc6eb533a8846dc5b
Reviewed-on: https://gerrit.chromium.org/gerrit/20036
Tested-by: Ben Chan <benchan@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
1 file changed
tree: 6f19565b5c4dfa320857c74454e5c21c7cb8441f
  1. .gitignore
  2. archive-manager.cc
  3. archive-manager.h
  4. archive-manager_unittest.cc
  5. avfsd-seccomp-amd64.policy
  6. avfsd-seccomp-x86.policy
  7. common.mk
  8. cros-disks-server-impl.cc
  9. cros-disks-server-impl.h
  10. cros-disks.conf
  11. cros-disks.xml
  12. daemon.cc
  13. daemon.h
  14. device-ejector.cc
  15. device-ejector.h
  16. device-event-dispatcher-interface.h
  17. device-event-moderator.cc
  18. device-event-moderator.h
  19. device-event-moderator_unittest.cc
  20. device-event-queue.cc
  21. device-event-queue.h
  22. device-event-queue_unittest.cc
  23. device-event-source-interface.h
  24. device-event.cc
  25. device-event.h
  26. disk-manager.cc
  27. disk-manager.h
  28. disk-manager_unittest.cc
  29. disk.cc
  30. disk.h
  31. disk_unittest.cc
  32. disks_testrunner.cc
  33. external-mounter.cc
  34. external-mounter.h
  35. external-mounter_unittest.cc
  36. file-reader.cc
  37. file-reader.h
  38. file-reader_unittest.cc
  39. filesystem.cc
  40. filesystem.h
  41. format-manager-observer-interface.h
  42. format-manager.cc
  43. format-manager.h
  44. format-manager_unittest.cc
  45. glib-process.cc
  46. glib-process.h
  47. glib-process_unittest.cc
  48. inherit-review-settings-ok
  49. LICENSE
  50. main.cc
  51. Makefile
  52. metrics.cc
  53. metrics.h
  54. metrics_unittest.cc
  55. mount-info.cc
  56. mount-info.h
  57. mount-info_unittest.cc
  58. mount-manager.cc
  59. mount-manager.h
  60. mount-manager_unittest.cc
  61. mount-options.cc
  62. mount-options.h
  63. mount-options_unittest.cc
  64. mounter.cc
  65. mounter.h
  66. mounter_unittest.cc
  67. ntfs-mounter.cc
  68. ntfs-mounter.h
  69. org.chromium.CrosDisks.conf
  70. OWNERS
  71. platform.cc
  72. platform.h
  73. platform_unittest.cc
  74. power-manager-observer-interface.h
  75. power-manager-proxy.cc
  76. power-manager-proxy.h
  77. process.cc
  78. process.h
  79. process_unittest.cc
  80. sandboxed-process.cc
  81. sandboxed-process.h
  82. session-manager-observer-interface.h
  83. session-manager-proxy.cc
  84. session-manager-proxy.h
  85. system-mounter.cc
  86. system-mounter.h
  87. system-mounter_unittest.cc
  88. udev-device.cc
  89. udev-device.h
  90. udev-device_unittest.cc
  91. usb-device-info
  92. usb-device-info.cc
  93. usb-device-info.h
  94. usb-device-info_unittest.cc