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

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: Remove redundant base:: prefix 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
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" 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698