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

Unified Diff: base/process/process_posix.cc

Issue 1142913004: Revert of Add support for backgrounding processes on the Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/process/process_mac.cc ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/process/process_posix.cc
diff --git a/base/process/process_posix.cc b/base/process/process_posix.cc
index 8037da3ac6e1e09011e581a1ca239023a8b220d2..a7d16f87304f2b38953c9ca9fe42f47e6c0c7634 100644
--- a/base/process/process_posix.cc
+++ b/base/process/process_posix.cc
@@ -1,4 +1,4 @@
-// Copyright 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -253,12 +253,12 @@
return Process(handle);
}
-#if !defined(OS_LINUX) && !defined(OS_MACOSX)
+#if !defined(OS_LINUX)
// static
bool Process::CanBackgroundProcesses() {
return false;
}
-#endif // !defined(OS_LINUX) && !defined(OS_MACOSX)
+#endif // !defined(OS_LINUX)
bool Process::IsValid() const {
return process_ != kNullProcessHandle;
@@ -353,7 +353,7 @@
return WaitForExitWithTimeoutImpl(Handle(), exit_code, timeout);
}
-#if !defined(OS_LINUX) && !defined(OS_MACOSX)
+#if !defined(OS_LINUX)
bool Process::IsProcessBackgrounded() const {
// See SetProcessBackgrounded().
DCHECK(IsValid());
@@ -361,13 +361,13 @@
}
bool Process::SetProcessBackgrounded(bool value) {
- // Not implemented for POSIX systems other than Mac and Linux. With POSIX, if
- // we were to lower the process priority we wouldn't be able to raise it back
- // to its initial priority.
- NOTIMPLEMENTED();
+ // POSIX only allows lowering the priority of a process, so if we
+ // were to lower it we wouldn't be able to raise it back to its initial
+ // priority.
+ DCHECK(IsValid());
return false;
}
-#endif // !defined(OS_LINUX) && !defined(OS_MACOSX)
+#endif // !defined(OS_LINUX)
int Process::GetPriority() const {
DCHECK(IsValid());
« no previous file with comments | « base/process/process_mac.cc ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698