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

Unified Diff: base/process_util_posix.cc

Issue 6492: Port parts of base/process_util to Linux. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 12 years, 2 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
Index: base/process_util_posix.cc
===================================================================
--- base/process_util_posix.cc (revision 3009)
+++ base/process_util_posix.cc (working copy)
@@ -8,6 +8,7 @@
#include <unistd.h>
#include "base/basictypes.h"
+#include "base/sys_info.h"
namespace process_util {
@@ -23,6 +24,19 @@
return process;
}
+ProcessMetrics::ProcessMetrics(ProcessHandle process) : process_(process),
+ last_time_(0),
+ last_system_time_(0) {
+ processor_count_ = base::SysInfo::NumberOfProcessors();
+}
+
+// static
+ProcessMetrics* ProcessMetrics::CreateProcessMetrics(ProcessHandle process) {
+ return new ProcessMetrics(process);
+}
+
+ProcessMetrics::~ProcessMetrics() { }
+
void EnableTerminationOnHeapCorruption() {
// On POSIX, there nothing to do AFAIK.
}

Powered by Google App Engine
This is Rietveld 408576698