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

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

Issue 1852433005: Convert //base to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase after r384946 Created 4 years, 8 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/memory_win.cc ('k') | base/process/process_info_mac.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) 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"
11 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
12 #include "base/win/windows_version.h" 11 #include "base/win/windows_version.h"
13 12
14 namespace base { 13 namespace base {
15 14
16 ProcessId GetCurrentProcId() { 15 ProcessId GetCurrentProcId() {
17 return ::GetCurrentProcessId(); 16 return ::GetCurrentProcessId();
18 } 17 }
19 18
20 ProcessHandle GetCurrentProcessHandle() { 19 ProcessHandle GetCurrentProcessHandle() {
(...skipping 15 matching lines...) Expand all
36 do { 35 do {
37 if (process_entry.th32ProcessID == child_pid) 36 if (process_entry.th32ProcessID == child_pid)
38 return process_entry.th32ParentProcessID; 37 return process_entry.th32ParentProcessID;
39 } while (Process32Next(snapshot.Get(), &process_entry)); 38 } while (Process32Next(snapshot.Get(), &process_entry));
40 } 39 }
41 40
42 return 0u; 41 return 0u;
43 } 42 }
44 43
45 } // namespace base 44 } // namespace base
OLDNEW
« no previous file with comments | « base/process/memory_win.cc ('k') | base/process/process_info_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698