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

Unified Diff: base/process.h

Issue 495002: Changes to base/ from a combination of FreeBSD and OpenBSD patches. (Closed)
Patch Set: minor tweaks Created 11 years 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.h
diff --git a/base/process.h b/base/process.h
index 53512ce151dce4718d63323956defa1f58a917ea..6ac29e9d13124b27da31c196e536ddecdcdd0eec 100644
--- a/base/process.h
+++ b/base/process.h
@@ -29,7 +29,7 @@ typedef pid_t ProcessId;
const ProcessHandle kNullProcessHandle = 0;
#endif
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
// saved_priority_ will be set to this to indicate that it's not holding
// a valid value. -20 to 19 are valid process priorities.
const int kUnsetProcessPriority = 256;
@@ -38,13 +38,13 @@ const int kUnsetProcessPriority = 256;
class Process {
public:
Process() : process_(kNullProcessHandle) {
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
saved_priority_ = kUnsetProcessPriority;
#endif
}
explicit Process(ProcessHandle handle) : process_(handle) {
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
saved_priority_ = kUnsetProcessPriority;
#endif
}
@@ -57,7 +57,7 @@ class Process {
ProcessHandle handle() const { return process_; }
void set_handle(ProcessHandle handle) {
process_ = handle;
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
saved_priority_ = kUnsetProcessPriority;
#endif
}
@@ -93,7 +93,7 @@ class Process {
private:
ProcessHandle process_;
-#if defined(OS_LINUX)
+#if defined(OS_POSIX) && !defined(OS_MACOSX)
// Holds the priority that the process was set to when it was backgrounded.
// If the process wasn't backgrounded it will be kUnsetProcessPriority.
int saved_priority_;

Powered by Google App Engine
This is Rietveld 408576698