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

Side by Side Diff: base/process_posix.cc

Issue 8506036: Fix tab backgrounding on Linux / ChromeOS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use LazyInstance correctly Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/process.h" 5 #include "base/process.h"
6 6
7 #include <sys/types.h> 7 #include <sys/types.h>
8 #include <sys/time.h> 8 #include <sys/time.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 10
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 // See SetProcessBackgrounded(). 50 // See SetProcessBackgrounded().
51 return false; 51 return false;
52 } 52 }
53 53
54 bool Process::SetProcessBackgrounded(bool value) { 54 bool Process::SetProcessBackgrounded(bool value) {
55 // POSIX only allows lowering the priority of a process, so if we 55 // POSIX only allows lowering the priority of a process, so if we
56 // were to lower it we wouldn't be able to raise it back to its initial 56 // were to lower it we wouldn't be able to raise it back to its initial
57 // priority. 57 // priority.
58 return false; 58 return false;
59 } 59 }
60
61 // static
62 bool Process::CanBackgroundProcesses() {
63 return false;
64 }
65
60 #endif 66 #endif
61 67
62 int Process::GetPriority() const { 68 int Process::GetPriority() const {
63 DCHECK(process_); 69 DCHECK(process_);
64 return getpriority(PRIO_PROCESS, process_); 70 return getpriority(PRIO_PROCESS, process_);
65 } 71 }
66 72
67 } // namspace base 73 } // namspace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698