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

Unified Diff: base/process.h

Issue 267076: Turn NULL used as int to 0. (Closed)
Patch Set: Created 11 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
« no previous file with comments | « base/platform_thread.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.h
diff --git a/base/process.h b/base/process.h
index fa076b9bed94a31ef749daa04d2b31134dbab6e7..7a1bfba2a9382fa2af0d82e48908dda29ebdf45d 100644
--- a/base/process.h
+++ b/base/process.h
@@ -21,15 +21,17 @@ namespace base {
#if defined(OS_WIN)
typedef HANDLE ProcessHandle;
typedef DWORD ProcessId;
+const ProcessHandle kNullProcessHandle = NULL;
#elif defined(OS_POSIX)
// On POSIX, our ProcessHandle will just be the PID.
typedef pid_t ProcessHandle;
typedef pid_t ProcessId;
+const ProcessHandle kNullProcessHandle = 0;
#endif
class Process {
public:
- Process() : process_(0), last_working_set_size_(0) {}
+ Process() : process_(kNullProcessHandle), last_working_set_size_(0) {}
explicit Process(ProcessHandle handle) :
process_(handle), last_working_set_size_(0) {}
« no previous file with comments | « base/platform_thread.h ('k') | base/process_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698