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

Unified Diff: chrome/browser/chromeos/policy/device_status_collector.cc

Issue 2556413002: Remove spam log when querying free/total size. (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
//
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698