| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/debug/trace_event.h" | 7 #include "base/debug/trace_event.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 ipc_task_runner_->PostTask( | 223 ipc_task_runner_->PostTask( |
| 224 FROM_HERE, base::Bind(&Context::OnAddFilter, this)); | 224 FROM_HERE, base::Bind(&Context::OnAddFilter, this)); |
| 225 } | 225 } |
| 226 | 226 |
| 227 // Called on the listener's thread | 227 // Called on the listener's thread |
| 228 void ChannelProxy::Context::OnDispatchMessage(const Message& message) { | 228 void ChannelProxy::Context::OnDispatchMessage(const Message& message) { |
| 229 #ifdef IPC_MESSAGE_LOG_ENABLED | 229 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 230 Logging* logger = Logging::GetInstance(); | 230 Logging* logger = Logging::GetInstance(); |
| 231 std::string name; | 231 std::string name; |
| 232 logger->GetMessageText(message.type(), &name, &message, NULL); | 232 logger->GetMessageText(message.type(), &name, &message, NULL); |
| 233 TRACE_EVENT1("toplevel", "ChannelProxy::Context::OnDispatchMessage", | 233 TRACE_EVENT1("task", "ChannelProxy::Context::OnDispatchMessage", |
| 234 "name", name); | 234 "name", name); |
| 235 #else | 235 #else |
| 236 TRACE_EVENT2("toplevel", "ChannelProxy::Context::OnDispatchMessage", | 236 TRACE_EVENT2("task", "ChannelProxy::Context::OnDispatchMessage", |
| 237 "class", IPC_MESSAGE_ID_CLASS(message.type()), | 237 "class", IPC_MESSAGE_ID_CLASS(message.type()), |
| 238 "line", IPC_MESSAGE_ID_LINE(message.type())); | 238 "line", IPC_MESSAGE_ID_LINE(message.type())); |
| 239 #endif | 239 #endif |
| 240 | 240 |
| 241 if (!listener_) | 241 if (!listener_) |
| 242 return; | 242 return; |
| 243 | 243 |
| 244 OnDispatchConnected(); | 244 OnDispatchConnected(); |
| 245 | 245 |
| 246 #ifdef IPC_MESSAGE_LOG_ENABLED | 246 #ifdef IPC_MESSAGE_LOG_ENABLED |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 Channel* channel = context_.get()->channel_.get(); | 411 Channel* channel = context_.get()->channel_.get(); |
| 412 // Channel must have been created first. | 412 // Channel must have been created first. |
| 413 DCHECK(channel) << context_.get()->channel_id_; | 413 DCHECK(channel) << context_.get()->channel_id_; |
| 414 return channel->GetPeerEuid(peer_euid); | 414 return channel->GetPeerEuid(peer_euid); |
| 415 } | 415 } |
| 416 #endif | 416 #endif |
| 417 | 417 |
| 418 //----------------------------------------------------------------------------- | 418 //----------------------------------------------------------------------------- |
| 419 | 419 |
| 420 } // namespace IPC | 420 } // namespace IPC |
| OLD | NEW |