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

Side by Side Diff: ipc/ipc_sync_channel.cc

Issue 2847003005: Reland "Add enable_ipc_logging build argument" (Closed)
Patch Set: Reland "Add enable_ipc_logging build argument" Created 3 years, 7 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
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ppapi/nacl_irt/irt_ppapi.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 "ipc/ipc_sync_channel.h" 5 #include "ipc/ipc_sync_channel.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 scoped_refptr<SyncMessageFilter> SyncChannel::CreateSyncMessageFilter() { 580 scoped_refptr<SyncMessageFilter> SyncChannel::CreateSyncMessageFilter() {
581 scoped_refptr<SyncMessageFilter> filter = new SyncMessageFilter( 581 scoped_refptr<SyncMessageFilter> filter = new SyncMessageFilter(
582 sync_context()->shutdown_event()); 582 sync_context()->shutdown_event());
583 AddFilter(filter.get()); 583 AddFilter(filter.get());
584 if (!did_init()) 584 if (!did_init())
585 pre_init_sync_message_filters_.push_back(filter); 585 pre_init_sync_message_filters_.push_back(filter);
586 return filter; 586 return filter;
587 } 587 }
588 588
589 bool SyncChannel::Send(Message* message) { 589 bool SyncChannel::Send(Message* message) {
590 #ifdef IPC_MESSAGE_LOG_ENABLED 590 #if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED)
591 std::string name; 591 std::string name;
592 Logging::GetInstance()->GetMessageText( 592 Logging::GetInstance()->GetMessageText(
593 message->type(), &name, message, nullptr); 593 message->type(), &name, message, nullptr);
594 TRACE_EVENT1("ipc", "SyncChannel::Send", "name", name); 594 TRACE_EVENT1("ipc", "SyncChannel::Send", "name", name);
595 #else 595 #else
596 TRACE_EVENT2("ipc", "SyncChannel::Send", 596 TRACE_EVENT2("ipc", "SyncChannel::Send",
597 "class", IPC_MESSAGE_ID_CLASS(message->type()), 597 "class", IPC_MESSAGE_ID_CLASS(message->type()),
598 "line", IPC_MESSAGE_ID_LINE(message->type())); 598 "line", IPC_MESSAGE_ID_LINE(message->type()));
599 #endif 599 #endif
600 if (!message->is_sync()) { 600 if (!message->is_sync()) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 sync_context()->GetDispatchEvent(), 707 sync_context()->GetDispatchEvent(),
708 base::Bind(&SyncChannel::OnDispatchEventSignaled, 708 base::Bind(&SyncChannel::OnDispatchEventSignaled,
709 base::Unretained(this))); 709 base::Unretained(this)));
710 } 710 }
711 711
712 void SyncChannel::OnChannelInit() { 712 void SyncChannel::OnChannelInit() {
713 pre_init_sync_message_filters_.clear(); 713 pre_init_sync_message_filters_.clear();
714 } 714 }
715 715
716 } // namespace IPC 716 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_message_utils.h ('k') | ppapi/nacl_irt/irt_ppapi.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698