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

Unified Diff: base/process/process_posix.cc

Issue 2454073003: Allow backgrounding processes on Mac (Closed)
Patch Set: Remove unnecessary forward declare Created 4 years, 1 month 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/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index a9d745eeead1cfa6c426b4e974cbf2ede034a159..20fab9214163075fd0b0e39fbf64832a3463881f 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -257,12 +257,12 @@ Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
return Process(handle);
}
-#if !defined(OS_LINUX)
+#if !defined(OS_LINUX) && !defined(OS_MACOSX)
// static
bool Process::CanBackgroundProcesses() {
return false;
}
-#endif // !defined(OS_LINUX)
+#endif // !defined(OS_LINUX) && !defined(OS_MACOSX)
bool Process::IsValid() const {
return process_ != kNullProcessHandle;
@@ -361,7 +361,7 @@ bool Process::WaitForExitWithTimeout(TimeDelta timeout, int* exit_code) {
return WaitForExitWithTimeoutImpl(Handle(), exit_code, timeout);
}
-#if !defined(OS_LINUX)
+#if !defined(OS_LINUX) && !defined(OS_MACOSX)
bool Process::IsProcessBackgrounded() const {
// See SetProcessBackgrounded().
DCHECK(IsValid());
@@ -369,13 +369,13 @@ bool Process::IsProcessBackgrounded() const {
}
bool Process::SetProcessBackgrounded(bool value) {
- // Not implemented for POSIX systems other than Linux. With POSIX, if we were
- // to lower the process priority we wouldn't be able to raise it back to its
- // initial priority.
+ // Not implemented for POSIX systems other than Linux and Mac. With POSIX, if
+ // we were to lower the process priority we wouldn't be able to raise it back
+ // to its initial priority.
NOTIMPLEMENTED();
return false;
}
-#endif // !defined(OS_LINUX)
+#endif // !defined(OS_LINUX) && !defined(OS_MACOSX)
int Process::GetPriority() const {
DCHECK(IsValid());

Powered by Google App Engine
This is Rietveld 408576698