Chromium Code Reviews| Index: chrome/browser/chromeos/policy/device_status_collector.cc |
| diff --git a/chrome/browser/chromeos/policy/device_status_collector.cc b/chrome/browser/chromeos/policy/device_status_collector.cc |
| index 7c1fea913cbef8ea53de9150531f5254893dcd80..4fda88dcfa3f6c55d4d4f43e01741c20a0783335 100644 |
| --- a/chrome/browser/chromeos/policy/device_status_collector.cc |
| +++ b/chrome/browser/chromeos/policy/device_status_collector.cc |
| @@ -108,11 +108,17 @@ std::vector<em::VolumeInfo> GetVolumeInfo( |
| std::vector<em::VolumeInfo> result; |
| for (const std::string& mount_point : mount_points) { |
| base::FilePath mount_path(mount_point); |
| + |
| + // Non-native file systems do not have a mount point in the local file |
| + // system. However, it's worth checking here, as it's easier than checking |
| + // earlier which mount point is local, and which one is not. |
| + if (mount_point.empty() || !base::PathExists(mount_path)) |
|
Wez
2016/12/15 19:27:57
nit: It'd be more readable to check mount_path.emp
|
| + continue; |
| + |
| int64_t free_size = base::SysInfo::AmountOfFreeDiskSpace(mount_path); |
| int64_t total_size = base::SysInfo::AmountOfTotalDiskSpace(mount_path); |
| if (free_size < 0 || total_size < 0) { |
| - LOG_IF(ERROR, !mount_point.empty()) << "Unable to get volume status for " |
| - << mount_point; |
| + LOG(ERROR) << "Unable to get volume status for " << mount_point; |
| continue; |
| } |
| em::VolumeInfo info; |