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

Unified Diff: chrome/browser/chromeos/extensions/file_manager/device_event_router.cc

Issue 2472643002: Suppress warnings on unplugging read-only removable devices. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/device_event_router_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/extensions/file_manager/device_event_router.cc
diff --git a/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc b/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc
index 2e65719d95fce6fa7f41f84841dbd9916d63a56c..b12bf26f9f9c7a40e919389ea8b4b1be37306521 100644
--- a/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc
+++ b/chrome/browser/chromeos/extensions/file_manager/device_event_router.cc
@@ -78,7 +78,7 @@ void DeviceEventRouter::OnDiskRemoved(
return;
const std::string& device_path = disk.system_path_prefix();
- if (!disk.mount_path().empty() &&
+ if (!disk.is_read_only() && !disk.mount_path().empty() &&
GetDeviceState(device_path) != DEVICE_HARD_UNPLUGGED_AND_REPORTED) {
OnDeviceEvent(file_manager_private::DEVICE_EVENT_TYPE_HARD_UNPLUGGED,
device_path);
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/device_event_router_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698