OLD | NEW |
1 // Copyright (c) 2006-2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-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 // For information about interceptions as a whole see | 5 // For information about interceptions as a whole see |
6 // http://dev.chromium.org/developers/design-documents/sandbox . | 6 // http://dev.chromium.org/developers/design-documents/sandbox . |
7 | 7 |
8 #include "sandbox/win/src/interception_agent.h" | 8 #include "sandbox/win/src/interception_agent.h" |
9 | 9 |
| 10 #include <stddef.h> |
| 11 |
| 12 #include "sandbox/win/src/eat_resolver.h" |
10 #include "sandbox/win/src/interception_internal.h" | 13 #include "sandbox/win/src/interception_internal.h" |
11 #include "sandbox/win/src/interceptors.h" | 14 #include "sandbox/win/src/interceptors.h" |
12 #include "sandbox/win/src/eat_resolver.h" | 15 #include "sandbox/win/src/sandbox_nt_util.h" |
13 #include "sandbox/win/src/sidestep_resolver.h" | 16 #include "sandbox/win/src/sidestep_resolver.h" |
14 #include "sandbox/win/src/sandbox_nt_util.h" | |
15 | 17 |
16 namespace { | 18 namespace { |
17 | 19 |
18 // Returns true if target lies between base and base + range. | 20 // Returns true if target lies between base and base + range. |
19 bool IsWithinRange(const void* base, size_t range, const void* target) { | 21 bool IsWithinRange(const void* base, size_t range, const void* target) { |
20 const char* end = reinterpret_cast<const char*>(base) + range; | 22 const char* end = reinterpret_cast<const char*>(base) + range; |
21 return reinterpret_cast<const char*>(target) < end; | 23 return reinterpret_cast<const char*>(target) < end; |
22 } | 24 } |
23 | 25 |
24 } // namespace | 26 } // namespace |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 case INTERCEPTION_SMART_SIDESTEP: | 226 case INTERCEPTION_SMART_SIDESTEP: |
225 return smart_sidestep_resolver; | 227 return smart_sidestep_resolver; |
226 default: | 228 default: |
227 NOTREACHED_NT(); | 229 NOTREACHED_NT(); |
228 } | 230 } |
229 | 231 |
230 return NULL; | 232 return NULL; |
231 } | 233 } |
232 | 234 |
233 } // namespace sandbox | 235 } // namespace sandbox |
OLD | NEW |