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

Side by Side Diff: ipc/ipc_channel_posix.cc

Issue 1239593002: Implement a new flow event API that allows binding flow events and regular events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement binding flow events to slices for PostTasks. Created 5 years, 5 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
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_channel_posix.h" 5 #include "ipc/ipc_channel_posix.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 bool ChannelPosix::Send(Message* message) { 504 bool ChannelPosix::Send(Message* message) {
505 DCHECK(!message->HasMojoHandles()); 505 DCHECK(!message->HasMojoHandles());
506 DVLOG(2) << "sending message @" << message << " on channel @" << this 506 DVLOG(2) << "sending message @" << message << " on channel @" << this
507 << " with type " << message->type() 507 << " with type " << message->type()
508 << " (" << output_queue_.size() << " in queue)"; 508 << " (" << output_queue_.size() << " in queue)";
509 509
510 #ifdef IPC_MESSAGE_LOG_ENABLED 510 #ifdef IPC_MESSAGE_LOG_ENABLED
511 Logging::GetInstance()->OnSendMessage(message, ""); 511 Logging::GetInstance()->OnSendMessage(message, "");
512 #endif // IPC_MESSAGE_LOG_ENABLED 512 #endif // IPC_MESSAGE_LOG_ENABLED
513 513
514 TRACE_EVENT_WITH_FLOW0("ipc", "ChannelPosix::Send", message->flags(),
515 TRACE_EVENT_FLAG_FLOW_OUT);
514 message->TraceMessageBegin(); 516 message->TraceMessageBegin();
515 output_queue_.push(message); 517 output_queue_.push(message);
516 if (!is_blocked_on_write_ && !waiting_connect_) { 518 if (!is_blocked_on_write_ && !waiting_connect_) {
517 return ProcessOutgoingMessages(); 519 return ProcessOutgoingMessages();
518 } 520 }
519 521
520 return true; 522 return true;
521 } 523 }
522 524
523 AttachmentBroker* ChannelPosix::GetAttachmentBroker() { 525 AttachmentBroker* ChannelPosix::GetAttachmentBroker() {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
1029 } 1031 }
1030 1032
1031 #if defined(OS_LINUX) 1033 #if defined(OS_LINUX)
1032 // static 1034 // static
1033 void Channel::SetGlobalPid(int pid) { 1035 void Channel::SetGlobalPid(int pid) {
1034 ChannelPosix::SetGlobalPid(pid); 1036 ChannelPosix::SetGlobalPid(pid);
1035 } 1037 }
1036 #endif // OS_LINUX 1038 #endif // OS_LINUX
1037 1039
1038 } // namespace IPC 1040 } // namespace IPC
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698