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

Unified Diff: ipc/attachment_broker_unprivileged_win.cc

Issue 1256993003: ipc: Create AttachmentBrokerPrivileged and AttachmentBrokerUnprivileged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_ipc_message_feature
Patch Set: Rebase. Created 5 years, 5 months 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 side-by-side diff with in-line comments
Download patch
Index: ipc/attachment_broker_unprivileged_win.cc
diff --git a/ipc/attachment_broker_win.cc b/ipc/attachment_broker_unprivileged_win.cc
similarity index 72%
rename from ipc/attachment_broker_win.cc
rename to ipc/attachment_broker_unprivileged_win.cc
index 1bc013dd03048a334838ba2f0f9271d12e7c95b8..3d3e845d6b8d50c68bf611e05a28c58960ce96eb 100644
--- a/ipc/attachment_broker_win.cc
+++ b/ipc/attachment_broker_unprivileged_win.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ipc/attachment_broker_win.h"
+#include "ipc/attachment_broker_unprivileged_win.h"
#include "base/process/process.h"
#include "ipc/attachment_broker_messages.h"
@@ -12,13 +12,11 @@
namespace IPC {
-AttachmentBrokerWin::AttachmentBrokerWin() {
-}
+AttachmentBrokerUnprivilegedWin::AttachmentBrokerUnprivilegedWin() {}
-AttachmentBrokerWin::~AttachmentBrokerWin() {
-}
+AttachmentBrokerUnprivilegedWin::~AttachmentBrokerUnprivilegedWin() {}
-bool AttachmentBrokerWin::SendAttachmentToProcess(
+bool AttachmentBrokerUnprivilegedWin::SendAttachmentToProcess(
const BrokerableAttachment* attachment,
base::ProcessId destination_process) {
switch (attachment->GetBrokerableType()) {
@@ -27,14 +25,15 @@ bool AttachmentBrokerWin::SendAttachmentToProcess(
static_cast<const internal::HandleAttachmentWin*>(attachment);
internal::HandleAttachmentWin::WireFormat format =
handle_attachment->GetWireFormat(destination_process);
- return sender_->Send(new AttachmentBrokerMsg_DuplicateWinHandle(format));
+ return get_sender()->Send(
+ new AttachmentBrokerMsg_DuplicateWinHandle(format));
}
return false;
}
-bool AttachmentBrokerWin::OnMessageReceived(const Message& msg) {
+bool AttachmentBrokerUnprivilegedWin::OnMessageReceived(const Message& msg) {
bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(AttachmentBrokerWin, msg)
+ IPC_BEGIN_MESSAGE_MAP(AttachmentBrokerUnprivilegedWin, msg)
IPC_MESSAGE_HANDLER(AttachmentBrokerMsg_WinHandleHasBeenDuplicated,
OnWinHandleHasBeenDuplicated)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -42,7 +41,7 @@ bool AttachmentBrokerWin::OnMessageReceived(const Message& msg) {
return handled;
}
-void AttachmentBrokerWin::OnWinHandleHasBeenDuplicated(
+void AttachmentBrokerUnprivilegedWin::OnWinHandleHasBeenDuplicated(
const IPC::internal::HandleAttachmentWin::WireFormat& wire_format) {
// The IPC message was intended for a different process. Ignore it.
if (wire_format.destination_process != base::Process::Current().Pid())

Powered by Google App Engine
This is Rietveld 408576698