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

Side by Side Diff: base/process/process_posix.cc

Issue 725353003: Don't pass ProcessHandle through ChildProcessHostDelegate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 6 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 unified diff | Download patch
« no previous file with comments | « base/process/process.h ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/process.h" 5 #include "base/process/process.h"
6 6
7 #include <sys/resource.h> 7 #include <sys/resource.h>
8 #include <sys/time.h> 8 #include <sys/time.h>
9 #include <sys/types.h> 9 #include <sys/types.h>
10 10
(...skipping 19 matching lines...) Expand all
30 return *this; 30 return *this;
31 } 31 }
32 32
33 // static 33 // static
34 Process Process::Current() { 34 Process Process::Current() {
35 Process process; 35 Process process;
36 process.process_ = GetCurrentProcessHandle(); 36 process.process_ = GetCurrentProcessHandle();
37 return process.Pass(); 37 return process.Pass();
38 } 38 }
39 39
40 // static
41 Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
42 DCHECK_NE(handle, GetCurrentProcessHandle());
43 return Process(handle);
44 }
45
40 #if !defined(OS_LINUX) 46 #if !defined(OS_LINUX)
41 // static 47 // static
42 bool Process::CanBackgroundProcesses() { 48 bool Process::CanBackgroundProcesses() {
43 return false; 49 return false;
44 } 50 }
45 #endif // !defined(OS_LINUX) 51 #endif // !defined(OS_LINUX)
46 52
47 bool Process::IsValid() const { 53 bool Process::IsValid() const {
48 return process_ != kNullProcessHandle; 54 return process_ != kNullProcessHandle;
49 } 55 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 return false; 104 return false;
99 } 105 }
100 #endif // !defined(OS_LINUX) 106 #endif // !defined(OS_LINUX)
101 107
102 int Process::GetPriority() const { 108 int Process::GetPriority() const {
103 DCHECK(IsValid()); 109 DCHECK(IsValid());
104 return getpriority(PRIO_PROCESS, process_); 110 return getpriority(PRIO_PROCESS, process_);
105 } 111 }
106 112
107 } // namspace base 113 } // namspace base
OLDNEW
« no previous file with comments | « base/process/process.h ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698