OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "mojo/edk/system/broker.h" | 5 #include "mojo/edk/system/broker.h" |
6 | 6 |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <unistd.h> | 8 #include <unistd.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 out_message->data_num_bytes()) { | 105 out_message->data_num_bytes()) { |
106 LOG(ERROR) << "Error sending complete broker message"; | 106 LOG(ERROR) << "Error sending complete broker message"; |
107 return nullptr; | 107 return nullptr; |
108 } | 108 } |
109 | 109 |
110 std::deque<PlatformHandle> incoming_platform_handles; | 110 std::deque<PlatformHandle> incoming_platform_handles; |
111 if (WaitForBrokerMessage(sync_channel_.get(), | 111 if (WaitForBrokerMessage(sync_channel_.get(), |
112 BrokerMessageType::BUFFER_RESPONSE, 1, | 112 BrokerMessageType::BUFFER_RESPONSE, 1, |
113 &incoming_platform_handles)) { | 113 &incoming_platform_handles)) { |
114 return PlatformSharedBuffer::CreateFromPlatformHandle( | 114 return PlatformSharedBuffer::CreateFromPlatformHandle( |
115 num_bytes, ScopedPlatformHandle(incoming_platform_handles.front())); | 115 num_bytes, false /* read_only */, |
| 116 ScopedPlatformHandle(incoming_platform_handles.front())); |
116 } | 117 } |
117 | 118 |
118 return nullptr; | 119 return nullptr; |
119 } | 120 } |
120 | 121 |
121 } // namespace edk | 122 } // namespace edk |
122 } // namespace mojo | 123 } // namespace mojo |
OLD | NEW |