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