OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #endif | 9 #endif |
10 #include <stack> | 10 #include <stack> |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 SyncHeader header; | 70 SyncHeader header; |
71 if (!ReadSyncHeader(msg, &header)) | 71 if (!ReadSyncHeader(msg, &header)) |
72 return 0; | 72 return 0; |
73 | 73 |
74 return header.message_id; | 74 return header.message_id; |
75 } | 75 } |
76 | 76 |
77 Message* SyncMessage::GenerateReply(const Message* msg) { | 77 Message* SyncMessage::GenerateReply(const Message* msg) { |
78 DCHECK(msg->is_sync()); | 78 DCHECK(msg->is_sync()); |
79 | 79 |
80 Message* reply = new Message(msg->routing_id(), IPC_REPLY_ID, msg->priority())
; | 80 Message* reply = new Message(msg->routing_id(), IPC_REPLY_ID, |
| 81 msg->priority()); |
81 reply->set_reply(); | 82 reply->set_reply(); |
82 | 83 |
83 SyncHeader header; | 84 SyncHeader header; |
84 | 85 |
85 // use the same message id, but this time reply bit is set | 86 // use the same message id, but this time reply bit is set |
86 header.message_id = GetMessageId(*msg); | 87 header.message_id = GetMessageId(*msg); |
87 WriteSyncHeader(reply, header); | 88 WriteSyncHeader(reply, header); |
88 | 89 |
89 return reply; | 90 return reply; |
90 } | 91 } |
(...skipping 26 matching lines...) Expand all Loading... |
117 return true; | 118 return true; |
118 } | 119 } |
119 | 120 |
120 | 121 |
121 bool MessageReplyDeserializer::SerializeOutputParameters(const Message& msg) { | 122 bool MessageReplyDeserializer::SerializeOutputParameters(const Message& msg) { |
122 return SerializeOutputParameters(msg, SyncMessage::GetDataIterator(&msg)); | 123 return SerializeOutputParameters(msg, SyncMessage::GetDataIterator(&msg)); |
123 } | 124 } |
124 | 125 |
125 } // namespace IPC | 126 } // namespace IPC |
126 | 127 |
OLD | NEW |