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

Side by Side Diff: components/nacl/loader/nacl_ipc_adapter.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 | « base/pickle.cc ('k') | ipc/BUILD.gn » ('j') | 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 "components/nacl/loader/nacl_ipc_adapter.h" 5 #include "components/nacl/loader/nacl_ipc_adapter.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 new_msg->set_reply(); 619 new_msg->set_reply();
620 new_msg->WriteInt(IPC::SyncMessage::GetMessageId(orig_msg)); 620 new_msg->WriteInt(IPC::SyncMessage::GetMessageId(orig_msg));
621 621
622 // Write empty file tokens. 622 // Write empty file tokens.
623 new_msg->WriteUInt64(0); // token_lo 623 new_msg->WriteUInt64(0); // token_lo
624 new_msg->WriteUInt64(0); // token_hi 624 new_msg->WriteUInt64(0); // token_hi
625 625
626 ppapi::proxy::SerializedHandle::WriteHeader(sh.header(), 626 ppapi::proxy::SerializedHandle::WriteHeader(sh.header(),
627 new_msg.get()); 627 new_msg.get());
628 new_msg->WriteBool(true); // valid == true 628 new_msg->WriteBool(true); // valid == true
629 new_msg->WriteBool(false); // brokerable == false
629 // The file descriptor is at index 0. There's only ever one file 630 // The file descriptor is at index 0. There's only ever one file
630 // descriptor provided for this message type, so this will be correct. 631 // descriptor provided for this message type, so this will be correct.
631 new_msg->WriteInt(0); 632 new_msg->WriteInt(0);
632 633
633 return new_msg; 634 return new_msg;
634 } 635 }
635 636
636 void NaClIPCAdapter::SaveOpenResourceMessage( 637 void NaClIPCAdapter::SaveOpenResourceMessage(
637 const IPC::Message& orig_msg, 638 const IPC::Message& orig_msg,
638 IPC::PlatformFileForTransit ipc_fd, 639 IPC::PlatformFileForTransit ipc_fd,
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
841 header.flags = msg.flags(); 842 header.flags = msg.flags();
842 header.num_fds = static_cast<uint16_t>(rewritten_msg->desc_count()); 843 header.num_fds = static_cast<uint16_t>(rewritten_msg->desc_count());
843 844
844 rewritten_msg->SetData(header, msg.payload(), msg.payload_size()); 845 rewritten_msg->SetData(header, msg.payload(), msg.payload_size());
845 locked_data_.to_be_received_.push(rewritten_msg); 846 locked_data_.to_be_received_.push(rewritten_msg);
846 } 847 }
847 848
848 int TranslatePepperFileReadWriteOpenFlagsForTesting(int32_t pp_open_flags) { 849 int TranslatePepperFileReadWriteOpenFlagsForTesting(int32_t pp_open_flags) {
849 return TranslatePepperFileReadWriteOpenFlags(pp_open_flags); 850 return TranslatePepperFileReadWriteOpenFlags(pp_open_flags);
850 } 851 }
OLDNEW
« no previous file with comments | « base/pickle.cc ('k') | ipc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698