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

Side by Side Diff: sandbox/win/src/crosscall_params.h

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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
« no previous file with comments | « net/ssl/client_cert_store_win.cc ('k') | sandbox/win/src/handle_closer_test.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) 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 #include <stdint.h> 10 #include <stdint.h>
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // Returns the tag (ipc unique id) associated with this IPC. 107 // Returns the tag (ipc unique id) associated with this IPC.
108 uint32_t GetTag() const { return tag_; } 108 uint32_t GetTag() const { return tag_; }
109 109
110 // Returns the beggining of the buffer where the IPC params can be stored. 110 // Returns the beggining of the buffer where the IPC params can be stored.
111 // prior to an IPC call 111 // prior to an IPC call
112 const void* GetBuffer() const { 112 const void* GetBuffer() const {
113 return this; 113 return this;
114 } 114 }
115 115
116 // Returns how many parameter this IPC call should have. 116 // Returns how many parameter this IPC call should have.
117 const uint32_t GetParamsCount() const { return params_count_; } 117 uint32_t GetParamsCount() const { return params_count_; }
118 118
119 // Returns a pointer to the CrossCallReturn structure. 119 // Returns a pointer to the CrossCallReturn structure.
120 CrossCallReturn* GetCallReturn() { 120 CrossCallReturn* GetCallReturn() {
121 return &call_return; 121 return &call_return;
122 } 122 }
123 123
124 // Returns TRUE if this call contains InOut parameters. 124 // Returns TRUE if this call contains InOut parameters.
125 const bool IsInOut() const { 125 bool IsInOut() const { return (1 == is_in_out_); }
126 return (1 == is_in_out_);
127 }
128 126
129 // Tells the CrossCall object if it contains InOut parameters. 127 // Tells the CrossCall object if it contains InOut parameters.
130 void SetIsInOut(bool value) { 128 void SetIsInOut(bool value) {
131 if (value) 129 if (value)
132 is_in_out_ = 1; 130 is_in_out_ = 1;
133 else 131 else
134 is_in_out_ = 0; 132 is_in_out_ = 0;
135 } 133 }
136 134
137 protected: 135 protected:
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 DISALLOW_COPY_AND_ASSIGN(ActualCallParams); 277 DISALLOW_COPY_AND_ASSIGN(ActualCallParams);
280 }; 278 };
281 279
282 static_assert(sizeof(ActualCallParams<1, 1024>) == 1024, "bad size buffer"); 280 static_assert(sizeof(ActualCallParams<1, 1024>) == 1024, "bad size buffer");
283 static_assert(sizeof(ActualCallParams<2, 1024>) == 1024, "bad size buffer"); 281 static_assert(sizeof(ActualCallParams<2, 1024>) == 1024, "bad size buffer");
284 static_assert(sizeof(ActualCallParams<3, 1024>) == 1024, "bad size buffer"); 282 static_assert(sizeof(ActualCallParams<3, 1024>) == 1024, "bad size buffer");
285 283
286 } // namespace sandbox 284 } // namespace sandbox
287 285
288 #endif // SANDBOX_SRC_CROSSCALL_PARAMS_H__ 286 #endif // SANDBOX_SRC_CROSSCALL_PARAMS_H__
OLDNEW
« no previous file with comments | « net/ssl/client_cert_store_win.cc ('k') | sandbox/win/src/handle_closer_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698