OLD | NEW |
1 // Copyright (c) 2012 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_CROSSCALL_PARAMS_H__ | 5 #ifndef SANDBOX_SRC_CROSSCALL_PARAMS_H__ |
6 #define SANDBOX_SRC_CROSSCALL_PARAMS_H__ | 6 #define SANDBOX_SRC_CROSSCALL_PARAMS_H__ |
7 | 7 |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <lmaccess.h> | 9 #include <lmaccess.h> |
10 | 10 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 void SetIsInOut(bool value) { | 136 void SetIsInOut(bool value) { |
137 if (value) | 137 if (value) |
138 is_in_out_ = 1; | 138 is_in_out_ = 1; |
139 else | 139 else |
140 is_in_out_ = 0; | 140 is_in_out_ = 0; |
141 } | 141 } |
142 | 142 |
143 protected: | 143 protected: |
144 // constructs the IPC call params. Called only from the derived classes | 144 // constructs the IPC call params. Called only from the derived classes |
145 CrossCallParams(uint32 tag, uint32 params_count) | 145 CrossCallParams(uint32 tag, uint32 params_count) |
146 : tag_(tag), | 146 : tag_(tag), is_in_out_(0), params_count_(params_count) {} |
147 params_count_(params_count), | |
148 is_in_out_(0) { | |
149 } | |
150 | 147 |
151 private: | 148 private: |
152 uint32 tag_; | 149 uint32 tag_; |
153 uint32 is_in_out_; | 150 uint32 is_in_out_; |
154 CrossCallReturn call_return; | 151 CrossCallReturn call_return; |
155 const uint32 params_count_; | 152 const uint32 params_count_; |
156 DISALLOW_COPY_AND_ASSIGN(CrossCallParams); | 153 DISALLOW_COPY_AND_ASSIGN(CrossCallParams); |
157 }; | 154 }; |
158 | 155 |
159 // ActualCallParams models an specific IPC call parameters with respect to the | 156 // ActualCallParams models an specific IPC call parameters with respect to the |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 DISALLOW_COPY_AND_ASSIGN(ActualCallParams); | 284 DISALLOW_COPY_AND_ASSIGN(ActualCallParams); |
288 }; | 285 }; |
289 | 286 |
290 static_assert(sizeof(ActualCallParams<1, 1024>) == 1024, "bad size buffer"); | 287 static_assert(sizeof(ActualCallParams<1, 1024>) == 1024, "bad size buffer"); |
291 static_assert(sizeof(ActualCallParams<2, 1024>) == 1024, "bad size buffer"); | 288 static_assert(sizeof(ActualCallParams<2, 1024>) == 1024, "bad size buffer"); |
292 static_assert(sizeof(ActualCallParams<3, 1024>) == 1024, "bad size buffer"); | 289 static_assert(sizeof(ActualCallParams<3, 1024>) == 1024, "bad size buffer"); |
293 | 290 |
294 } // namespace sandbox | 291 } // namespace sandbox |
295 | 292 |
296 #endif // SANDBOX_SRC_CROSSCALL_PARAMS_H__ | 293 #endif // SANDBOX_SRC_CROSSCALL_PARAMS_H__ |
OLD | NEW |