| OLD | NEW |
| 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_util.h" | 5 #include "base/process/process_handle.h" |
| 6 | 6 |
| 7 #include <sys/sysctl.h> | 7 #include <sys/sysctl.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <unistd.h> | 9 #include <unistd.h> |
| 10 | 10 |
| 11 namespace base { | 11 namespace base { |
| 12 | 12 |
| 13 ProcessId GetParentProcessId(ProcessHandle process) { | 13 ProcessId GetParentProcessId(ProcessHandle process) { |
| 14 struct kinfo_proc info; | 14 struct kinfo_proc info; |
| 15 size_t length; | 15 size_t length; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 40 return FilePath(); | 40 return FilePath(); |
| 41 if ((kp.p_flag & P_SYSTEM) != 0) | 41 if ((kp.p_flag & P_SYSTEM) != 0) |
| 42 return FilePath(); | 42 return FilePath(); |
| 43 if (strcmp(kp.p_comm, "chrome") == 0) | 43 if (strcmp(kp.p_comm, "chrome") == 0) |
| 44 return FilePath(kp.p_comm); | 44 return FilePath(kp.p_comm); |
| 45 | 45 |
| 46 return FilePath(); | 46 return FilePath(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 } // namespace base | 49 } // namespace base |
| OLD | NEW |