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" | |
13 #include "sandbox/win/src/interception_internal.h" | 10 #include "sandbox/win/src/interception_internal.h" |
14 #include "sandbox/win/src/interceptors.h" | 11 #include "sandbox/win/src/interceptors.h" |
| 12 #include "sandbox/win/src/eat_resolver.h" |
| 13 #include "sandbox/win/src/sidestep_resolver.h" |
15 #include "sandbox/win/src/sandbox_nt_util.h" | 14 #include "sandbox/win/src/sandbox_nt_util.h" |
16 #include "sandbox/win/src/sidestep_resolver.h" | |
17 | 15 |
18 namespace { | 16 namespace { |
19 | 17 |
20 // Returns true if target lies between base and base + range. | 18 // Returns true if target lies between base and base + range. |
21 bool IsWithinRange(const void* base, size_t range, const void* target) { | 19 bool IsWithinRange(const void* base, size_t range, const void* target) { |
22 const char* end = reinterpret_cast<const char*>(base) + range; | 20 const char* end = reinterpret_cast<const char*>(base) + range; |
23 return reinterpret_cast<const char*>(target) < end; | 21 return reinterpret_cast<const char*>(target) < end; |
24 } | 22 } |
25 | 23 |
26 } // namespace | 24 } // namespace |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 case INTERCEPTION_SMART_SIDESTEP: | 224 case INTERCEPTION_SMART_SIDESTEP: |
227 return smart_sidestep_resolver; | 225 return smart_sidestep_resolver; |
228 default: | 226 default: |
229 NOTREACHED_NT(); | 227 NOTREACHED_NT(); |
230 } | 228 } |
231 | 229 |
232 return NULL; | 230 return NULL; |
233 } | 231 } |
234 | 232 |
235 } // namespace sandbox | 233 } // namespace sandbox |
OLD | NEW |