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

Side by Side Diff: remoting/tools/breakpad_tester_win.cc

Issue 281223002: Removed LOG_GETLASTERROR and LOG_ERRNO macros. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wed 05/14/2014 11:20:03.21 Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/win/wts_terminal_monitor.cc ('k') | ui/gfx/win/hwnd_util.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <windows.h> 5 #include <windows.h>
6 #include <stdlib.h> 6 #include <stdlib.h>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/win/scoped_handle.h" 10 #include "base/win/scoped_handle.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 if (pid == 0) { 57 if (pid == 0) {
58 LOG(ERROR) << "Invalid process PID: " << args[0]; 58 LOG(ERROR) << "Invalid process PID: " << args[0];
59 return kErrorExitCode; 59 return kErrorExitCode;
60 } 60 }
61 61
62 DWORD desired_access = PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION | 62 DWORD desired_access = PROCESS_CREATE_THREAD | PROCESS_QUERY_INFORMATION |
63 PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ; 63 PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_VM_READ;
64 base::win::ScopedHandle process; 64 base::win::ScopedHandle process;
65 process.Set(OpenProcess(desired_access, FALSE, pid)); 65 process.Set(OpenProcess(desired_access, FALSE, pid));
66 if (!process.IsValid()) { 66 if (!process.IsValid()) {
67 LOG_GETLASTERROR(ERROR) << "Failed to open the process " << pid; 67 PLOG(ERROR) << "Failed to open the process " << pid;
68 return kErrorExitCode; 68 return kErrorExitCode;
69 } 69 }
70 70
71 DWORD thread_id; 71 DWORD thread_id;
72 base::win::ScopedHandle thread; 72 base::win::ScopedHandle thread;
73 thread.Set(CreateRemoteThread(process.Get(), NULL, 0, NULL, NULL, 0, 73 thread.Set(CreateRemoteThread(process.Get(), NULL, 0, NULL, NULL, 0,
74 &thread_id)); 74 &thread_id));
75 if (!thread.IsValid()) { 75 if (!thread.IsValid()) {
76 LOG_GETLASTERROR(ERROR) << "Failed to create a remote thread in " << pid; 76 PLOG(ERROR) << "Failed to create a remote thread in " << pid;
77 return kErrorExitCode; 77 return kErrorExitCode;
78 } 78 }
79 79
80 return kSuccessExitCode; 80 return kSuccessExitCode;
81 } 81 }
OLDNEW
« no previous file with comments | « remoting/host/win/wts_terminal_monitor.cc ('k') | ui/gfx/win/hwnd_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698