summaryrefslogtreecommitdiffstats
path: root/ipc/handle_attachment_win.cc
diff options
context:
space:
mode:
authorerikchen <erikchen@chromium.org>2015-09-23 17:10:27 -0700
committerCommit bot <commit-bot@chromium.org>2015-09-24 00:34:38 +0000
commit28299a185f99639e89636381c399132851fd5fee (patch)
tree0d4f0f03f203f3e4fb9f441095edf122ee31f473 /ipc/handle_attachment_win.cc
parent8c6b35634ba705f78b4b51a00b0b15edd1040af7 (diff)
downloadchromium_src-28299a185f99639e89636381c399132851fd5fee.zip
chromium_src-28299a185f99639e89636381c399132851fd5fee.tar.gz
chromium_src-28299a185f99639e89636381c399132851fd5fee.tar.bz2
ipc: Refactor some attachment broker classes.
This CL makes the members of BrokerableAttachment::AttachmentId and HandleWin::WireFormat private, and makes getters for the members. This CL also makes the default constructor of BrokerableAttachment::AttachmentId not generate a random nonce, since the default constructor is invoked frequently by the IPC translation system when it doesn't require a random nonce. BUG=493414 Review URL: https://codereview.chromium.org/1357723003 Cr-Commit-Position: refs/heads/master@{#350399}
Diffstat (limited to 'ipc/handle_attachment_win.cc')
-rw-r--r--ipc/handle_attachment_win.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/ipc/handle_attachment_win.cc b/ipc/handle_attachment_win.cc
index b7f4373..c14adcb 100644
--- a/ipc/handle_attachment_win.cc
+++ b/ipc/handle_attachment_win.cc
@@ -34,12 +34,8 @@ HandleAttachmentWin::BrokerableType HandleAttachmentWin::GetBrokerableType()
HandleAttachmentWin::WireFormat HandleAttachmentWin::GetWireFormat(
const base::ProcessId& destination) const {
- WireFormat format;
- format.handle = HandleToLong(handle_);
- format.attachment_id = GetIdentifier();
- format.destination_process = destination;
- format.permissions = permissions_;
- return format;
+ return WireFormat(HandleToLong(handle_), destination, permissions_,
+ GetIdentifier());
}
} // namespace internal