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

Side by Side Diff: ipc/ipc_channel_proxy.cc

Issue 148173011: Make flow event traces disabled-by-default, and rename "ipc" and "task" categories to "toplevel" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replace "ipc" and "task" categories with toplevel. Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/threading/worker_pool_win.cc ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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("task", "ChannelProxy::Context::OnDispatchMessage", 233 TRACE_EVENT1("toplevel", "ChannelProxy::Context::OnDispatchMessage",
234 "name", name); 234 "name", name);
235 #else 235 #else
236 TRACE_EVENT2("task", "ChannelProxy::Context::OnDispatchMessage", 236 TRACE_EVENT2("toplevel", "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
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
OLDNEW
« no previous file with comments | « base/threading/worker_pool_win.cc ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698