| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "base/macros.h" |
| 6 #include "base/process/process_handle.h" |
| 7 |
| 8 #include <magenta/syscalls.h> |
| 9 |
| 10 namespace base { |
| 11 |
| 12 ProcessId GetParentProcessId(ProcessHandle process) { |
| 13 // TODO(scottmg): Port. |
| 14 return 0; |
| 15 } |
| 16 |
| 17 FilePath GetProcessExecutablePath(ProcessHandle process) { |
| 18 char name[MX_MAX_NAME_LEN] = {0}; |
| 19 mx_object_get_property(process, MX_PROP_NAME, name, sizeof(name)); |
| 20 // Even if the return value is not NO_ERROR, we can't do much better than |
| 21 // empty anyway, so return name either way. |
| 22 return FilePath(name); |
| 23 } |
| 24 |
| 25 } // namespace base |
| OLD | NEW |