OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_handle.h" | 5 #include "base/process/process_handle.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <tlhelp32.h> | 8 #include <tlhelp32.h> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include <memory> |
Nico
2016/04/04 17:14:56
unused
dcheng
2016/04/04 17:43:39
Done.
| |
11 | |
11 #include "base/win/scoped_handle.h" | 12 #include "base/win/scoped_handle.h" |
12 #include "base/win/windows_version.h" | 13 #include "base/win/windows_version.h" |
13 | 14 |
14 namespace base { | 15 namespace base { |
15 | 16 |
16 ProcessId GetCurrentProcId() { | 17 ProcessId GetCurrentProcId() { |
17 return ::GetCurrentProcessId(); | 18 return ::GetCurrentProcessId(); |
18 } | 19 } |
19 | 20 |
20 ProcessHandle GetCurrentProcessHandle() { | 21 ProcessHandle GetCurrentProcessHandle() { |
(...skipping 15 matching lines...) Expand all Loading... | |
36 do { | 37 do { |
37 if (process_entry.th32ProcessID == child_pid) | 38 if (process_entry.th32ProcessID == child_pid) |
38 return process_entry.th32ParentProcessID; | 39 return process_entry.th32ParentProcessID; |
39 } while (Process32Next(snapshot.Get(), &process_entry)); | 40 } while (Process32Next(snapshot.Get(), &process_entry)); |
40 } | 41 } |
41 | 42 |
42 return 0u; | 43 return 0u; |
43 } | 44 } |
44 | 45 |
45 } // namespace base | 46 } // namespace base |
OLD | NEW |