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

Unified Diff: ipc/ipc_channel_proxy.cc

Issue 2343033002: IPC: Delete thread-safe send support (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_proxy.cc
diff --git a/ipc/ipc_channel_proxy.cc b/ipc/ipc_channel_proxy.cc
index 9b8ece18d4db3f034fa65e246b69b5fb4a0e040f..92e92d0c6230736314c3232d2dfe8e3794a4f908 100644
--- a/ipc/ipc_channel_proxy.cc
+++ b/ipc/ipc_channel_proxy.cc
@@ -47,7 +47,6 @@ ChannelProxy::Context::Context(
listener_(listener),
ipc_task_runner_(ipc_task_runner),
channel_connected_called_(false),
- channel_send_thread_safe_(false),
message_filter_router_(new MessageFilterRouter()),
peer_pid_(base::kNullProcessId),
attachment_broker_endpoint_(false) {
@@ -77,7 +76,6 @@ void ChannelProxy::Context::CreateChannel(
DCHECK_EQ(factory->GetIPCTaskRunner(), ipc_task_runner_);
channel_id_ = factory->GetName();
channel_ = factory->BuildChannel(this);
- channel_send_thread_safe_ = channel_->IsSendThreadSafe();
channel_->SetAttachmentBrokerEndpoint(attachment_broker_endpoint_);
Channel::AssociatedInterfaceSupport* support =
@@ -412,29 +410,12 @@ void ChannelProxy::Context::AddGenericAssociatedInterfaceForIOThread(
support->AddGenericAssociatedInterface(name, factory);
}
-void ChannelProxy::Context::SendFromThisThread(Message* message) {
- base::AutoLock l(channel_lifetime_lock_);
- if (!channel_)
- return;
- DCHECK(channel_->IsSendThreadSafe());
- channel_->Send(message);
-}
-
void ChannelProxy::Context::Send(Message* message) {
- if (channel_send_thread_safe_) {
- SendFromThisThread(message);
- return;
- }
-
ipc_task_runner()->PostTask(
FROM_HERE, base::Bind(&ChannelProxy::Context::OnSendMessage, this,
base::Passed(base::WrapUnique(message))));
}
-bool ChannelProxy::Context::IsChannelSendThreadSafe() const {
- return channel_send_thread_safe_;
-}
-
// Called on the IPC::Channel thread
void ChannelProxy::Context::GetRemoteAssociatedInterface(
const std::string& name,
« no previous file with comments | « ipc/ipc_channel_proxy.h ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698