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..1014ae5471837dcec804f53cd3f873c87d78d034 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)) |
| + 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; |
| @@ -293,7 +299,7 @@ namespace policy { |
| // |
| // Some methods like |SampleVolumeInfo| queue async queries to collect data. The |
| // response callback of these queries, e.g. |OnVolumeInfoReceived|, holds a |
| -// reference to the instance of this class, so that the destructor will not be |
| +// reference to the instance of this class, so that the destru |
|
Andrew T Wilson (Slow)
2016/12/14 16:09:25
undo this change
mtomasz
2016/12/15 05:17:30
Done.
|
| // invoked and the status response callback will not be fired until the original |
| // owner of the instance releases its reference and all async queries finish. |
| // |