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

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

Issue 2504063002: Revert of Remove IPC::BrokerableAttachment. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « ipc/mach_port_mac.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 <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
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
66 msg->WriteInt(handle_index); 67 msg->WriteInt(handle_index);
67 } 68 }
68 } 69 }
69 70
70 // Define overloads for each kind of message parameter that requires special 71 // Define overloads for each kind of message parameter that requires special
71 // handling. See ScanTuple for how these get used. 72 // handling. See ScanTuple for how these get used.
72 73
73 // Overload to match SerializedHandle. 74 // Overload to match SerializedHandle.
74 void ScanParam(const SerializedHandle& handle, ScanningResults* results) { 75 void ScanParam(const SerializedHandle& handle, ScanningResults* results) {
75 results->handles.push_back(handle); 76 results->handles.push_back(handle);
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 fio_it->second->SetMaxWrittenOffset(offset_it->second); 559 fio_it->second->SetMaxWrittenOffset(offset_it->second);
559 } 560 }
560 } 561 }
561 break; 562 break;
562 } 563 }
563 } 564 }
564 } 565 }
565 566
566 } // namespace proxy 567 } // namespace proxy
567 } // namespace ppapi 568 } // namespace ppapi
OLDNEW
« no previous file with comments | « ipc/mach_port_mac.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698