diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-27 01:30:57 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-27 01:30:57 +0000 |
commit | 99e9d796bb22f7a87fae907311f491b2ed02dfb6 (patch) | |
tree | bedbcf4f6315958cd54bd891af5582d3bccea610 /base/process_util_linux.cc | |
parent | 75c99878c8f219b25f5d8e21b79dc4208d327824 (diff) | |
download | chromium_src-99e9d796bb22f7a87fae907311f491b2ed02dfb6.zip chromium_src-99e9d796bb22f7a87fae907311f491b2ed02dfb6.tar.gz chromium_src-99e9d796bb22f7a87fae907311f491b2ed02dfb6.tar.bz2 |
Make the memory resource functions return bools so that we know when the information is not available. Refactor TaskManager slightly.
BUG=23366
TEST=See "N/A" for memory usage in Linux task manager
Review URL: http://codereview.chromium.org/339012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30148 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_util_linux.cc')
-rw-r--r-- | base/process_util_linux.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc index 1160b48..6f3d910 100644 --- a/base/process_util_linux.cc +++ b/base/process_util_linux.cc @@ -262,7 +262,7 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const { int private_kb = 0; int pss_kb = 0; bool have_pss = false; - if (!file_util::ReadFileToString(stat_file, &smaps)) + if (!file_util::ReadFileToString(stat_file, &smaps) || smaps.length() == 0) return false; StringTokenizer tokenizer(smaps, ":\n"); |