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

Side by Side Diff: ppapi/proxy/nacl_message_scanner.cc

Issue 57783006: Revert https://src.chromium.org/viewvc/chrome?view=rev&revision=231330 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile (cc perftest). Created 7 years, 1 month 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 | « ppapi/host/resource_message_filter_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "ppapi/proxy/nacl_message_scanner.h" 5 #include "ppapi/proxy/nacl_message_scanner.h"
6 6
7 #include <vector> 7 #include <vector>
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "ipc/ipc_message.h" 9 #include "ipc/ipc_message.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 const MessageType* msg_; 181 const MessageType* msg_;
182 }; 182 };
183 183
184 } // namespace 184 } // namespace
185 185
186 #define CASE_FOR_MESSAGE(MESSAGE_TYPE) \ 186 #define CASE_FOR_MESSAGE(MESSAGE_TYPE) \
187 case MESSAGE_TYPE::ID: { \ 187 case MESSAGE_TYPE::ID: { \
188 MessageScannerImpl<MESSAGE_TYPE> scanner(&msg); \ 188 MessageScannerImpl<MESSAGE_TYPE> scanner(&msg); \
189 if (rewrite_msg) \ 189 if (rewrite_msg) \
190 results.new_msg.reset( \ 190 results.new_msg.reset( \
191 new IPC::Message(msg.routing_id(), msg.type())); \ 191 new IPC::Message(msg.routing_id(), msg.type(), \
192 IPC::Message::PRIORITY_NORMAL)); \
192 if (!scanner.ScanMessage(&results)) \ 193 if (!scanner.ScanMessage(&results)) \
193 return false; \ 194 return false; \
194 break; \ 195 break; \
195 } 196 }
196 #define CASE_FOR_REPLY(MESSAGE_TYPE) \ 197 #define CASE_FOR_REPLY(MESSAGE_TYPE) \
197 case MESSAGE_TYPE::ID: { \ 198 case MESSAGE_TYPE::ID: { \
198 MessageScannerImpl<MESSAGE_TYPE> scanner(&msg); \ 199 MessageScannerImpl<MESSAGE_TYPE> scanner(&msg); \
199 if (rewrite_msg) \ 200 if (rewrite_msg) \
200 results.new_msg.reset( \ 201 results.new_msg.reset( \
201 new IPC::Message(msg.routing_id(), msg.type())); \ 202 new IPC::Message(msg.routing_id(), msg.type(), \
203 IPC::Message::PRIORITY_NORMAL)); \
202 if (!scanner.ScanReply(&results)) \ 204 if (!scanner.ScanReply(&results)) \
203 return false; \ 205 return false; \
204 break; \ 206 break; \
205 } 207 }
206 208
207 namespace ppapi { 209 namespace ppapi {
208 namespace proxy { 210 namespace proxy {
209 211
210 class SerializedHandle; 212 class SerializedHandle;
211 213
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 DCHECK(msg.is_sync()); 289 DCHECK(msg.is_sync());
288 290
289 int msg_id = IPC::SyncMessage::GetMessageId(msg); 291 int msg_id = IPC::SyncMessage::GetMessageId(msg);
290 DCHECK(pending_sync_msgs_.find(msg_id) == pending_sync_msgs_.end()); 292 DCHECK(pending_sync_msgs_.find(msg_id) == pending_sync_msgs_.end());
291 293
292 pending_sync_msgs_[msg_id] = msg.type(); 294 pending_sync_msgs_[msg_id] = msg.type();
293 } 295 }
294 296
295 } // namespace proxy 297 } // namespace proxy
296 } // namespace ppapi 298 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/host/resource_message_filter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698