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

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

Issue 1543293004: Switch to standard integer types in base/process/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ssize_t Created 4 years, 12 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_handle_mac.cc ('k') | base/process/process_info.h » ('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/macros.h"
5 #include "base/process/process_handle.h" 6 #include "base/process/process_handle.h"
6 7
8 #include <stddef.h>
7 #include <sys/sysctl.h> 9 #include <sys/sysctl.h>
8 #include <sys/types.h> 10 #include <sys/types.h>
9 #include <unistd.h> 11 #include <unistd.h>
10 12
11 namespace base { 13 namespace base {
12 14
13 ProcessId GetParentProcessId(ProcessHandle process) { 15 ProcessId GetParentProcessId(ProcessHandle process) {
14 struct kinfo_proc info; 16 struct kinfo_proc info;
15 size_t length; 17 size_t length;
16 int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process, 18 int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process,
(...skipping 23 matching lines...) Expand all
40 return FilePath(); 42 return FilePath();
41 if ((kp.p_flag & P_SYSTEM) != 0) 43 if ((kp.p_flag & P_SYSTEM) != 0)
42 return FilePath(); 44 return FilePath();
43 if (strcmp(kp.p_comm, "chrome") == 0) 45 if (strcmp(kp.p_comm, "chrome") == 0)
44 return FilePath(kp.p_comm); 46 return FilePath(kp.p_comm);
45 47
46 return FilePath(); 48 return FilePath();
47 } 49 }
48 50
49 } // namespace base 51 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process_handle_mac.cc ('k') | base/process/process_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698