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 1013463003: Update from https://crrev.com/320931 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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.h ('k') | base/process/process_win.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/wait.h> 8 #include <sys/wait.h>
9 9
10 #include "base/files/scoped_file.h" 10 #include "base/files/scoped_file.h"
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 // static 231 // static
232 Process Process::Open(ProcessId pid) { 232 Process Process::Open(ProcessId pid) {
233 if (pid == GetCurrentProcId()) 233 if (pid == GetCurrentProcId())
234 return Current(); 234 return Current();
235 235
236 // On POSIX process handles are the same as PIDs. 236 // On POSIX process handles are the same as PIDs.
237 return Process(pid); 237 return Process(pid);
238 } 238 }
239 239
240 // static 240 // static
241 Process Process::OpenWithExtraPriviles(ProcessId pid) { 241 Process Process::OpenWithExtraPrivileges(ProcessId pid) {
242 // On POSIX there are no privileges to set. 242 // On POSIX there are no privileges to set.
243 return Open(pid); 243 return Open(pid);
244 } 244 }
245 245
246 // static 246 // static
247 Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) { 247 Process Process::DeprecatedGetProcessFromHandle(ProcessHandle handle) {
248 DCHECK_NE(handle, GetCurrentProcessHandle()); 248 DCHECK_NE(handle, GetCurrentProcessHandle());
249 return Process(handle); 249 return Process(handle);
250 } 250 }
251 251
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 return false; 319 return false;
320 } 320 }
321 #endif // !defined(OS_LINUX) 321 #endif // !defined(OS_LINUX)
322 322
323 int Process::GetPriority() const { 323 int Process::GetPriority() const {
324 DCHECK(IsValid()); 324 DCHECK(IsValid());
325 return getpriority(PRIO_PROCESS, process_); 325 return getpriority(PRIO_PROCESS, process_);
326 } 326 }
327 327
328 } // namespace base 328 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process.h ('k') | base/process/process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698