OLD | NEW |
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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <tuple> | 9 #include <tuple> |
10 #include <utility> | 10 #include <utility> |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 void WriteHandle(int handle_index, | 57 void WriteHandle(int handle_index, |
58 const SerializedHandle& handle, | 58 const SerializedHandle& handle, |
59 base::Pickle* msg) { | 59 base::Pickle* msg) { |
60 SerializedHandle::WriteHeader(handle.header(), msg); | 60 SerializedHandle::WriteHeader(handle.header(), msg); |
61 | 61 |
62 if (handle.type() != SerializedHandle::INVALID) { | 62 if (handle.type() != SerializedHandle::INVALID) { |
63 // Now write the handle itself in POSIX style. | 63 // Now write the handle itself in POSIX style. |
64 // See ParamTraits<FileDescriptor>::Read for where these values are read. | 64 // See ParamTraits<FileDescriptor>::Read for where these values are read. |
65 msg->WriteBool(true); // valid == true | 65 msg->WriteBool(true); // valid == true |
66 msg->WriteBool(false); // brokerable == false | |
67 msg->WriteInt(handle_index); | 66 msg->WriteInt(handle_index); |
68 } | 67 } |
69 } | 68 } |
70 | 69 |
71 // Define overloads for each kind of message parameter that requires special | 70 // Define overloads for each kind of message parameter that requires special |
72 // handling. See ScanTuple for how these get used. | 71 // handling. See ScanTuple for how these get used. |
73 | 72 |
74 // Overload to match SerializedHandle. | 73 // Overload to match SerializedHandle. |
75 void ScanParam(const SerializedHandle& handle, ScanningResults* results) { | 74 void ScanParam(const SerializedHandle& handle, ScanningResults* results) { |
76 results->handles.push_back(handle); | 75 results->handles.push_back(handle); |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 fio_it->second->SetMaxWrittenOffset(offset_it->second); | 558 fio_it->second->SetMaxWrittenOffset(offset_it->second); |
560 } | 559 } |
561 } | 560 } |
562 break; | 561 break; |
563 } | 562 } |
564 } | 563 } |
565 } | 564 } |
566 | 565 |
567 } // namespace proxy | 566 } // namespace proxy |
568 } // namespace ppapi | 567 } // namespace ppapi |
OLD | NEW |