diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 17:43:44 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-29 17:43:44 +0000 |
commit | 276aa6a60396329c7fb4a988bd0be7f7d0895651 (patch) | |
tree | 62ed233e5faf34a14cf99fcbe49416b64e506d23 /base/process_win.cc | |
parent | 57f9caa083ef107001b12ec6e455e23a5f94e420 (diff) | |
download | chromium_src-276aa6a60396329c7fb4a988bd0be7f7d0895651.zip chromium_src-276aa6a60396329c7fb4a988bd0be7f7d0895651.tar.gz chromium_src-276aa6a60396329c7fb4a988bd0be7f7d0895651.tar.bz2 |
Lower priorities of background tabs on linux.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/345009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30470 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/process_win.cc')
-rw-r--r-- | base/process_win.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/base/process_win.cc b/base/process_win.cc index 469e7cd..cdb9390 100644 --- a/base/process_win.cc +++ b/base/process_win.cc @@ -25,7 +25,7 @@ void Process::Terminate(int result_code) { bool Process::IsProcessBackgrounded() const { if (!process_) return false; // Failure case. - DWORD priority = GetPriorityClass(process_); + DWORD priority = GetPriority(); if (priority == 0) return false; // Failure case. return priority == BELOW_NORMAL_PRIORITY_CLASS; @@ -54,4 +54,9 @@ Process Process::Current() { return Process(GetCurrentProcess()); } +int Process::GetPriority() const { + DCHECK(process_); + return GetPriorityClass(process_); +} + } // namespace base |