OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/app/close_handle_hook_win.h" | 5 #include "chrome/app/close_handle_hook_win.h" |
6 | 6 |
7 #include <Windows.h> | 7 #include <Windows.h> |
8 #include <psapi.h> | 8 #include <psapi.h> |
9 | 9 |
10 #include <vector> | 10 #include <vector> |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 // Performing EAT interception first is safer in the presence of other | 211 // Performing EAT interception first is safer in the presence of other |
212 // threads attempting to call CloseHandle. | 212 // threads attempting to call CloseHandle. |
213 hooks->AddEATPatch(); | 213 hooks->AddEATPatch(); |
214 PatchLoadedModules(hooks); | 214 PatchLoadedModules(hooks); |
215 } else { | 215 } else { |
216 base::win::DisableHandleVerifier(); | 216 base::win::DisableHandleVerifier(); |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 void RemoveCloseHandleHooks() { | 220 void RemoveCloseHandleHooks() { |
221 g_hooks.Get().Unpatch(); | |
222 } | 221 } |
OLD | NEW |