Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: sandbox/src/service_resolver.h

Issue 10021033: Sandbox: Add support for interceptions on Windows 8. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/src/interception.cc ('k') | sandbox/src/service_resolver_32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 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 #ifndef SANDBOX_SRC_SERVICE_RESOLVER_H__ 5 #ifndef SANDBOX_SRC_SERVICE_RESOLVER_H__
6 #define SANDBOX_SRC_SERVICE_RESOLVER_H__ 6 #define SANDBOX_SRC_SERVICE_RESOLVER_H__
7 7
8 #include "sandbox/src/nt_internals.h" 8 #include "sandbox/src/nt_internals.h"
9 #include "sandbox/src/resolver.h" 9 #include "sandbox/src/resolver.h"
10 10
11 namespace sandbox { 11 namespace sandbox {
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 : ServiceResolverThunk(process, relaxed) {} 89 : ServiceResolverThunk(process, relaxed) {}
90 virtual ~Wow64ResolverThunk() {} 90 virtual ~Wow64ResolverThunk() {}
91 91
92 private: 92 private:
93 virtual bool IsFunctionAService(void* local_thunk) const; 93 virtual bool IsFunctionAService(void* local_thunk) const;
94 94
95 DISALLOW_COPY_AND_ASSIGN(Wow64ResolverThunk); 95 DISALLOW_COPY_AND_ASSIGN(Wow64ResolverThunk);
96 }; 96 };
97 97
98 // This is the concrete resolver used to perform service-call type functions 98 // This is the concrete resolver used to perform service-call type functions
99 // inside ntdll.dll on WOW64 for Windows 8.
100 class Wow64W8ResolverThunk : public ServiceResolverThunk {
101 public:
102 // The service resolver needs a child process to write to.
103 Wow64W8ResolverThunk(HANDLE process, bool relaxed)
104 : ServiceResolverThunk(process, relaxed) {}
105 virtual ~Wow64W8ResolverThunk() {}
106
107 private:
108 virtual bool IsFunctionAService(void* local_thunk) const;
109
110 DISALLOW_COPY_AND_ASSIGN(Wow64W8ResolverThunk);
111 };
112
113 // This is the concrete resolver used to perform service-call type functions
99 // inside ntdll.dll on Windows 2000 and XP pre SP2. 114 // inside ntdll.dll on Windows 2000 and XP pre SP2.
100 class Win2kResolverThunk : public ServiceResolverThunk { 115 class Win2kResolverThunk : public ServiceResolverThunk {
101 public: 116 public:
102 // The service resolver needs a child process to write to. 117 // The service resolver needs a child process to write to.
103 Win2kResolverThunk(HANDLE process, bool relaxed) 118 Win2kResolverThunk(HANDLE process, bool relaxed)
104 : ServiceResolverThunk(process, relaxed) { 119 : ServiceResolverThunk(process, relaxed) {
105 win2k_ = true; 120 win2k_ = true;
106 } 121 }
107 virtual ~Win2kResolverThunk() {} 122 virtual ~Win2kResolverThunk() {}
108 123
109 private: 124 private:
110 virtual bool IsFunctionAService(void* local_thunk) const; 125 virtual bool IsFunctionAService(void* local_thunk) const;
111 126
112 DISALLOW_COPY_AND_ASSIGN(Win2kResolverThunk); 127 DISALLOW_COPY_AND_ASSIGN(Win2kResolverThunk);
113 }; 128 };
114 129
130 // This is the concrete resolver used to perform service-call type functions
131 // inside ntdll.dll on Windows 8.
132 class Win8ResolverThunk : public ServiceResolverThunk {
133 public:
134 // The service resolver needs a child process to write to.
135 Win8ResolverThunk(HANDLE process, bool relaxed)
136 : ServiceResolverThunk(process, relaxed) {}
137 virtual ~Win8ResolverThunk() {}
138
139 private:
140 virtual bool IsFunctionAService(void* local_thunk) const;
141
142 DISALLOW_COPY_AND_ASSIGN(Win8ResolverThunk);
143 };
144
115 } // namespace sandbox 145 } // namespace sandbox
116 146
117 147
118 #endif // SANDBOX_SRC_SERVICE_RESOLVER_H__ 148 #endif // SANDBOX_SRC_SERVICE_RESOLVER_H__
OLDNEW
« no previous file with comments | « sandbox/src/interception.cc ('k') | sandbox/src/service_resolver_32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698