diff options
author | stevenjb <stevenjb@chromium.org> | 2015-07-30 10:23:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-30 17:23:50 +0000 |
commit | bf16eec0898ae8e91944e4763b1492252da163d9 (patch) | |
tree | 66c6043c7bcc0bb56c6d067c2551612069548434 /base | |
parent | 441dfbeafb418ad03e21c74a835bad615f4b2b67 (diff) | |
download | chromium_src-bf16eec0898ae8e91944e4763b1492252da163d9.zip chromium_src-bf16eec0898ae8e91944e4763b1492252da163d9.tar.gz chromium_src-bf16eec0898ae8e91944e4763b1492252da163d9.tar.bz2 |
Reduce LOG(ERROR) spam on linux with chromeos=1
LOG(ERROR) Spam makes failing tests more difficult to debug
and obscures actual errors. This cleans up some spam that
always shows up when running on Linux with chromeos=1.
BUG=none
Review URL: https://codereview.chromium.org/1254013002
Cr-Commit-Position: refs/heads/master@{#341145}
Diffstat (limited to 'base')
-rw-r--r-- | base/memory/memory_pressure_monitor_chromeos.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/base/memory/memory_pressure_monitor_chromeos.cc b/base/memory/memory_pressure_monitor_chromeos.cc index 640e463..0c3d979 100644 --- a/base/memory/memory_pressure_monitor_chromeos.cc +++ b/base/memory/memory_pressure_monitor_chromeos.cc @@ -11,6 +11,7 @@ #include "base/posix/eintr_wrapper.h" #include "base/process/process_metrics.h" #include "base/single_thread_task_runner.h" +#include "base/sys_info.h" #include "base/thread_task_runner_handle.h" #include "base/time/time.h" @@ -114,7 +115,9 @@ MemoryPressureMonitor::MemoryPressureMonitor( low_mem_file_(HANDLE_EINTR(::open(kLowMemFile, O_RDONLY))), weak_ptr_factory_(this) { StartObserving(); - LOG_IF(ERROR, !low_mem_file_.is_valid()) << "Cannot open kernel listener"; + LOG_IF(ERROR, + base::SysInfo::IsRunningOnChromeOS() && !low_mem_file_.is_valid()) + << "Cannot open kernel listener"; } MemoryPressureMonitor::~MemoryPressureMonitor() { |