OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ipc/ipc_channel_proxy.h" | 5 #include "ipc/ipc_channel_proxy.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 ipc_task_runner_->PostTask( | 236 ipc_task_runner_->PostTask( |
237 FROM_HERE, base::Bind(&Context::OnAddFilter, this)); | 237 FROM_HERE, base::Bind(&Context::OnAddFilter, this)); |
238 } | 238 } |
239 | 239 |
240 // Called on the listener's thread | 240 // Called on the listener's thread |
241 void ChannelProxy::Context::OnDispatchMessage(const Message& message) { | 241 void ChannelProxy::Context::OnDispatchMessage(const Message& message) { |
242 #ifdef IPC_MESSAGE_LOG_ENABLED | 242 #ifdef IPC_MESSAGE_LOG_ENABLED |
243 Logging* logger = Logging::GetInstance(); | 243 Logging* logger = Logging::GetInstance(); |
244 std::string name; | 244 std::string name; |
245 logger->GetMessageText(message.type(), &name, &message, NULL); | 245 logger->GetMessageText(message.type(), &name, &message, NULL); |
246 TRACE_EVENT1("toplevel", "ChannelProxy::Context::OnDispatchMessage", | 246 TRACE_EVENT1("ipc", "ChannelProxy::Context::OnDispatchMessage", |
247 "name", name); | 247 "name", name); |
248 #else | 248 #else |
249 TRACE_EVENT2("toplevel", "ChannelProxy::Context::OnDispatchMessage", | 249 TRACE_EVENT2("ipc", "ChannelProxy::Context::OnDispatchMessage", |
250 "class", IPC_MESSAGE_ID_CLASS(message.type()), | 250 "class", IPC_MESSAGE_ID_CLASS(message.type()), |
251 "line", IPC_MESSAGE_ID_LINE(message.type())); | 251 "line", IPC_MESSAGE_ID_LINE(message.type())); |
252 #endif | 252 #endif |
253 | 253 |
254 if (!listener_) | 254 if (!listener_) |
255 return; | 255 return; |
256 | 256 |
257 OnDispatchConnected(); | 257 OnDispatchConnected(); |
258 | 258 |
259 #ifdef IPC_MESSAGE_LOG_ENABLED | 259 #ifdef IPC_MESSAGE_LOG_ENABLED |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 Channel* channel = context_.get()->channel_.get(); | 424 Channel* channel = context_.get()->channel_.get(); |
425 // Channel must have been created first. | 425 // Channel must have been created first. |
426 DCHECK(channel) << context_.get()->channel_id_; | 426 DCHECK(channel) << context_.get()->channel_id_; |
427 return channel->GetPeerEuid(peer_euid); | 427 return channel->GetPeerEuid(peer_euid); |
428 } | 428 } |
429 #endif | 429 #endif |
430 | 430 |
431 //----------------------------------------------------------------------------- | 431 //----------------------------------------------------------------------------- |
432 | 432 |
433 } // namespace IPC | 433 } // namespace IPC |
OLD | NEW |