| Index: ipc/handle_attachment_win.cc
|
| diff --git a/ipc/handle_attachment_win.cc b/ipc/handle_attachment_win.cc
|
| index dfce7c232e60087d8ee92a6523c8c50001bb9867..fefaff67f612c0bda5af1c3983b9159dc91fb619 100644
|
| --- a/ipc/handle_attachment_win.cc
|
| +++ b/ipc/handle_attachment_win.cc
|
| @@ -14,10 +14,15 @@ HandleAttachmentWin::HandleAttachmentWin(const HANDLE& handle)
|
| }
|
|
|
| HandleAttachmentWin::HandleAttachmentWin(const WireFormat& wire_format)
|
| - : BrokerableAttachment(wire_format.attachment_id),
|
| + : BrokerableAttachment(wire_format.attachment_id, false),
|
| handle_(LongToHandle(wire_format.handle)) {
|
| }
|
|
|
| +HandleAttachmentWin::HandleAttachmentWin(
|
| + const BrokerableAttachment::AttachmentId& id)
|
| + : BrokerableAttachment(id, true), handle_(INVALID_HANDLE_VALUE) {
|
| +}
|
| +
|
| HandleAttachmentWin::~HandleAttachmentWin() {
|
| }
|
|
|
| @@ -26,6 +31,19 @@ HandleAttachmentWin::BrokerableType HandleAttachmentWin::GetBrokerableType()
|
| return WIN_HANDLE;
|
| }
|
|
|
| +void HandleAttachmentWin::PopulateWithAttachment(
|
| + const BrokerableAttachment* attachment) {
|
| + DCHECK(NeedsBrokering());
|
| + DCHECK(!attachment->NeedsBrokering());
|
| + DCHECK(GetIdentifier() == attachment->GetIdentifier());
|
| + DCHECK_EQ(GetBrokerableType(), attachment->GetBrokerableType());
|
| +
|
| + const HandleAttachmentWin* handle_attachment =
|
| + static_cast<const HandleAttachmentWin*>(attachment);
|
| + handle_ = handle_attachment->handle_;
|
| + SetNeedsBrokering(false);
|
| +}
|
| +
|
| HandleAttachmentWin::WireFormat HandleAttachmentWin::GetWireFormat(
|
| const base::ProcessId& destination) const {
|
| WireFormat format;
|
|
|