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

Unified Diff: base/process.h

Issue 8506036: Fix tab backgrounding on Linux / ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the DPCHECK Created 9 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
« no previous file with comments | « no previous file | base/process_linux.cc » ('j') | base/process_linux.cc » ('J')
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 267092479ca6c8219c885f99bbff0721543d7eb3..7869b886455a9826f968e7a189bcbd27bf020d96 100644
--- a/base/process.h
+++ b/base/process.h
@@ -34,37 +34,24 @@ const ProcessHandle kNullProcessHandle = 0;
const ProcessId kNullProcessId = 0;
#endif // defined(OS_WIN)
-#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;
-#endif
-
class BASE_EXPORT Process {
public:
Process() : process_(kNullProcessHandle) {
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
- saved_priority_ = kUnsetProcessPriority;
-#endif
}
explicit Process(ProcessHandle handle) : process_(handle) {
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
- saved_priority_ = kUnsetProcessPriority;
-#endif
}
// A handle to the current process.
static Process Current();
+ static bool CanBackgroundProcesses();
+
// 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;
-#if defined(OS_POSIX) && !defined(OS_MACOSX)
- saved_priority_ = kUnsetProcessPriority;
-#endif
}
// Get the PID for this process.
@@ -98,11 +85,6 @@ class BASE_EXPORT Process {
private:
ProcessHandle process_;
-#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_;
-#endif
};
} // namespace base
« no previous file with comments | « no previous file | base/process_linux.cc » ('j') | base/process_linux.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698