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

Side by Side Diff: base/iat_patch.cc

Issue 2222002: Unsigned warning fix - take 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « base/file_util_win.cc ('k') | base/lock_impl_win.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/iat_patch.h" 5 #include "base/iat_patch.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 7
8 namespace iat_patch { 8 namespace iat_patch {
9 9
10 struct InterceptFunctionInformation { 10 struct InterceptFunctionInformation {
11 bool finished_operation; 11 bool finished_operation;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 IATPatchFunction::IATPatchFunction() 171 IATPatchFunction::IATPatchFunction()
172 : module_handle_(NULL), 172 : module_handle_(NULL),
173 original_function_(NULL), 173 original_function_(NULL),
174 iat_thunk_(NULL), 174 iat_thunk_(NULL),
175 intercept_function_(NULL) { 175 intercept_function_(NULL) {
176 } 176 }
177 177
178 IATPatchFunction::~IATPatchFunction() { 178 IATPatchFunction::~IATPatchFunction() {
179 if (NULL != intercept_function_) { 179 if (NULL != intercept_function_) {
180 DWORD error = Unpatch(); 180 DWORD error = Unpatch();
181 DCHECK_EQ(NO_ERROR, error); 181 DCHECK(error == NO_ERROR);
182 } 182 }
183 } 183 }
184 184
185 DWORD IATPatchFunction::Patch(const wchar_t* module, 185 DWORD IATPatchFunction::Patch(const wchar_t* module,
186 const char* imported_from_module, 186 const char* imported_from_module,
187 const char* function_name, 187 const char* function_name,
188 void* new_function) { 188 void* new_function) {
189 DCHECK_EQ(static_cast<void*>(NULL), original_function_); 189 DCHECK_EQ(static_cast<void*>(NULL), original_function_);
190 DCHECK_EQ(static_cast<IMAGE_THUNK_DATA*>(NULL), iat_thunk_); 190 DCHECK_EQ(static_cast<IMAGE_THUNK_DATA*>(NULL), iat_thunk_);
191 DCHECK_EQ(static_cast<void*>(NULL), intercept_function_); 191 DCHECK_EQ(static_cast<void*>(NULL), intercept_function_);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 FreeLibrary(module_handle_); 231 FreeLibrary(module_handle_);
232 module_handle_ = NULL; 232 module_handle_ = NULL;
233 intercept_function_ = NULL; 233 intercept_function_ = NULL;
234 original_function_ = NULL; 234 original_function_ = NULL;
235 iat_thunk_ = NULL; 235 iat_thunk_ = NULL;
236 236
237 return error; 237 return error;
238 } 238 }
239 239
240 } // namespace iat_patch 240 } // namespace iat_patch
OLDNEW
« no previous file with comments | « base/file_util_win.cc ('k') | base/lock_impl_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698