| OLD | NEW |
| 1 // Copyright (c) 2006-2008 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 // Static class for hooking Win32 API routines. For now, | 5 // Static class for hooking Win32 API routines. For now, |
| 6 // we only add one watcher at a time. | 6 // we only add one watcher at a time. |
| 7 // | 7 // |
| 8 // TODO(mbelshe): Support multiple watchers. | 8 // TODO(mbelshe): Support multiple watchers. |
| 9 | 9 |
| 10 #ifndef MEMORY_WATCHER_MEMORY_HOOK_ | 10 #ifndef MEMORY_WATCHER_MEMORY_HOOK_ |
| 11 #define MEMORY_WATCHER_MEMORY_HOOK_ | 11 #define MEMORY_WATCHER_MEMORY_HOOK_ |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 // Close our private heap. | 144 // Close our private heap. |
| 145 bool CloseHeap(); | 145 bool CloseHeap(); |
| 146 | 146 |
| 147 MemoryObserver* watcher_; | 147 MemoryObserver* watcher_; |
| 148 HANDLE heap_; // An internal accounting heap. | 148 HANDLE heap_; // An internal accounting heap. |
| 149 static bool hooked_; | 149 static bool hooked_; |
| 150 static MemoryHook* global_hook_; | 150 static MemoryHook* global_hook_; |
| 151 }; | 151 }; |
| 152 | 152 |
| 153 #endif // MEMORY_WATCHER_MEMORY_HOOK_ | 153 #endif // MEMORY_WATCHER_MEMORY_HOOK_ |
| OLD | NEW |