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

Unified Diff: base/process_util_linux.cc

Issue 179028: Revert "Fix a ton of compiler warnings." (Closed)
Patch Set: Created 11 years, 4 months 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 | « base/multiprocess_test.h ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process_util_linux.cc
diff --git a/base/process_util_linux.cc b/base/process_util_linux.cc
index f93b3594deb0272d21ec4a182c2c830a10f824e1..a05e9bb4fc1b5971bc6d0fdf12f20af54153edf2 100644
--- a/base/process_util_linux.cc
+++ b/base/process_util_linux.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -259,6 +259,7 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
int private_kb = 0;
int pss_kb = 0;
bool have_pss = false;
+ const int kPssAdjust = 0.5;
if (!file_util::ReadFileToString(stat_file, &smaps))
return false;
@@ -277,12 +278,12 @@ bool ProcessMetrics::GetWorkingSetKBytes(WorkingSetKBytes* ws_usage) const {
return false;
}
if (StartsWithASCII(last_key_name, "Shared_", 1)) {
- shared_kb += StringToInt(tokenizer.token());
+ shared_kb += StringToInt(tokenizer.token());
} else if (StartsWithASCII(last_key_name, "Private_", 1)) {
- private_kb += StringToInt(tokenizer.token());
+ private_kb += StringToInt(tokenizer.token());
} else if (StartsWithASCII(last_key_name, "Pss", 1)) {
- have_pss = true;
- pss_kb += StringToInt(tokenizer.token());
+ have_pss = true;
+ pss_kb += StringToInt(tokenizer.token()) + kPssAdjust;
}
state = KEY_NAME;
break;
« no previous file with comments | « base/multiprocess_test.h ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698