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

Side by Side Diff: base/win/iat_patch_function.cc

Issue 1210013007: clang/win: Fix warnings to prepare for building without -Wno-reorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clang-unsequenced
Patch Set: Created 5 years, 5 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/win/iat_patch_function.h" 5 #include "base/win/iat_patch_function.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/win/pe_image.h" 8 #include "base/win/pe_image.h"
9 9
10 namespace base { 10 namespace base {
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 &old_page_protection); 212 &old_page_protection);
213 } else { 213 } else {
214 error = GetLastError(); 214 error = GetLastError();
215 } 215 }
216 216
217 return error; 217 return error;
218 } 218 }
219 219
220 IATPatchFunction::IATPatchFunction() 220 IATPatchFunction::IATPatchFunction()
221 : module_handle_(NULL), 221 : module_handle_(NULL),
222 intercept_function_(NULL),
222 original_function_(NULL), 223 original_function_(NULL),
223 iat_thunk_(NULL), 224 iat_thunk_(NULL) {
224 intercept_function_(NULL) {
225 } 225 }
226 226
227 IATPatchFunction::~IATPatchFunction() { 227 IATPatchFunction::~IATPatchFunction() {
228 if (NULL != intercept_function_) { 228 if (NULL != intercept_function_) {
229 DWORD error = Unpatch(); 229 DWORD error = Unpatch();
230 DCHECK_EQ(static_cast<DWORD>(NO_ERROR), error); 230 DCHECK_EQ(static_cast<DWORD>(NO_ERROR), error);
231 } 231 }
232 } 232 }
233 233
234 DWORD IATPatchFunction::Patch(const wchar_t* module, 234 DWORD IATPatchFunction::Patch(const wchar_t* module,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 return error; 298 return error;
299 } 299 }
300 300
301 void* IATPatchFunction::original_function() const { 301 void* IATPatchFunction::original_function() const {
302 DCHECK(is_patched()); 302 DCHECK(is_patched());
303 return original_function_; 303 return original_function_;
304 } 304 }
305 305
306 } // namespace win 306 } // namespace win
307 } // namespace base 307 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698