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

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

Issue 885443002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase to ToT mojo Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « base/process/process_metrics_mac.cc ('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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 return process_; 68 return process_;
69 } 69 }
70 70
71 Process Process::Duplicate() const { 71 Process Process::Duplicate() const {
72 if (is_current()) 72 if (is_current())
73 return Current(); 73 return Current();
74 74
75 return Process(process_); 75 return Process(process_);
76 } 76 }
77 77
78 ProcessId Process::pid() const { 78 ProcessId Process::Pid() const {
79 DCHECK(IsValid()); 79 DCHECK(IsValid());
80 return GetProcId(process_); 80 return GetProcId(process_);
81 } 81 }
82 82
83 bool Process::is_current() const { 83 bool Process::is_current() const {
84 return process_ == GetCurrentProcessHandle(); 84 return process_ == GetCurrentProcessHandle();
85 } 85 }
86 86
87 void Process::Close() { 87 void Process::Close() {
88 process_ = kNullProcessHandle; 88 process_ = kNullProcessHandle;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 return false; 126 return false;
127 } 127 }
128 #endif // !defined(OS_LINUX) 128 #endif // !defined(OS_LINUX)
129 129
130 int Process::GetPriority() const { 130 int Process::GetPriority() const {
131 DCHECK(IsValid()); 131 DCHECK(IsValid());
132 return getpriority(PRIO_PROCESS, process_); 132 return getpriority(PRIO_PROCESS, process_);
133 } 133 }
134 134
135 } // namspace base 135 } // namspace base
OLDNEW
« no previous file with comments | « base/process/process_metrics_mac.cc ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698