summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 22:35:19 +0000
committerbrettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-11 22:35:19 +0000
commit2f15de4cf410a5d260958a84f7ff5acb5ed93b42 (patch)
tree23154cfe6dcb10d0af1349d5926820b10c602383 /base
parente688331d8e7086a71a55033a3ad14cc8b018799b (diff)
downloadchromium_src-2f15de4cf410a5d260958a84f7ff5acb5ed93b42.zip
chromium_src-2f15de4cf410a5d260958a84f7ff5acb5ed93b42.tar.gz
chromium_src-2f15de4cf410a5d260958a84f7ff5acb5ed93b42.tar.bz2
Remove some Windows-specific stuff from RenderProcessHost by having callers get the process handle and PID directly from the corresponding Process object.
Review URL: http://codereview.chromium.org/10608 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5219 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/process.h7
-rw-r--r--base/process_posix.cc2
-rw-r--r--base/process_win.cc2
3 files changed, 6 insertions, 5 deletions
diff --git a/base/process.h b/base/process.h
index 2a92fcd..806b1de 100644
--- a/base/process.h
+++ b/base/process.h
@@ -32,8 +32,9 @@ class Process {
// A handle to the current process.
static Process Current();
- // Get/Set the handle for this process.
- ProcessHandle handle() { return process_; }
+ // Get/Set the handle for this process. The handle will be 0 if the process
+ // is no longer running.
+ ProcessHandle handle() const { return process_; }
void set_handle(ProcessHandle handle) { process_ = handle; }
// Get the PID for this process.
@@ -52,7 +53,7 @@ class Process {
// A process is backgrounded when it's priority is lower than normal.
// Return true if this process is backgrounded, false otherwise.
- bool IsProcessBackgrounded();
+ bool IsProcessBackgrounded() const;
// Set a prcess as backgrounded. If value is true, the priority
// of the process will be lowered. If value is false, the priority
diff --git a/base/process_posix.cc b/base/process_posix.cc
index 2bc6b0c..73711db 100644
--- a/base/process_posix.cc
+++ b/base/process_posix.cc
@@ -6,7 +6,7 @@
#include "base/logging.h"
#include "base/process_util.h"
-bool Process::IsProcessBackgrounded() {
+bool Process::IsProcessBackgrounded() const {
return false;
}
diff --git a/base/process_win.cc b/base/process_win.cc
index 38fe63c..7a60854 100644
--- a/base/process_win.cc
+++ b/base/process_win.cc
@@ -7,7 +7,7 @@
#include "base/process_util.h"
#include "base/scoped_ptr.h"
-bool Process::IsProcessBackgrounded() {
+bool Process::IsProcessBackgrounded() const {
DCHECK(process_);
DWORD priority = GetPriorityClass(process_);
if (priority == 0)