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

Side by Side Diff: ipc/ipc_message_templates.h

Issue 1665363002: Clang plugin to check that unstable types are not used in IPC. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typos Created 4 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IPC_IPC_MESSAGE_TEMPLATES_H_ 5 #ifndef IPC_IPC_MESSAGE_TEMPLATES_H_
6 #define IPC_IPC_MESSAGE_TEMPLATES_H_ 6 #define IPC_IPC_MESSAGE_TEMPLATES_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <type_traits> 10 #include <type_traits>
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 T* obj, 160 T* obj,
161 S* sender, 161 S* sender,
162 P* parameter, 162 P* parameter,
163 Method func) { 163 Method func) {
164 SendParam send_params; 164 SendParam send_params;
165 bool ok = ReadSendParam(msg, &send_params); 165 bool ok = ReadSendParam(msg, &send_params);
166 Message* reply = SyncMessage::GenerateReply(msg); 166 Message* reply = SyncMessage::GenerateReply(msg);
167 if (ok) { 167 if (ok) {
168 ReplyParam reply_params; 168 ReplyParam reply_params;
169 base::DispatchToMethod(obj, func, send_params, &reply_params); 169 base::DispatchToMethod(obj, func, send_params, &reply_params);
170 WriteParam(reply, reply_params); 170 WriteParamUnchecked(reply, reply_params);
171 LogReplyParamsToMessage(reply_params, msg); 171 LogReplyParamsToMessage(reply_params, msg);
172 } else { 172 } else {
173 NOTREACHED() << "Error deserializing message " << msg->type(); 173 NOTREACHED() << "Error deserializing message " << msg->type();
174 reply->set_reply_error(); 174 reply->set_reply_error();
175 } 175 }
176 sender->Send(reply); 176 sender->Send(reply);
177 return ok; 177 return ok;
178 } 178 }
179 179
180 template <class T, class P, class Method> 180 template <class T, class P, class Method>
(...skipping 20 matching lines...) Expand all
201 MessageT(Routing routing, const Ins&... ins, Outs*... outs); 201 MessageT(Routing routing, const Ins&... ins, Outs*... outs);
202 }; 202 };
203 203
204 } // namespace IPC 204 } // namespace IPC
205 205
206 #if defined(IPC_MESSAGE_IMPL) 206 #if defined(IPC_MESSAGE_IMPL)
207 #include "ipc/ipc_message_templates_impl.h" 207 #include "ipc/ipc_message_templates_impl.h"
208 #endif 208 #endif
209 209
210 #endif // IPC_IPC_MESSAGE_TEMPLATES_H_ 210 #endif // IPC_IPC_MESSAGE_TEMPLATES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698