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

Side by Side Diff: ipc/ipc_channel_nacl.cc

Issue 10913242: Trace PostTasks from post to run (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: compile Created 8 years, 3 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/sequenced_worker_pool.cc ('k') | ipc/ipc_channel_posix.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_channel_nacl.h" 5 #include "ipc/ipc_channel_nacl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <sys/nacl_imc_api.h> 9 #include <sys/nacl_imc_api.h>
10 #include <sys/nacl_syscalls.h> 10 #include <sys/nacl_syscalls.h>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 bool Channel::ChannelImpl::Send(Message* message) { 187 bool Channel::ChannelImpl::Send(Message* message) {
188 DVLOG(2) << "sending message @" << message << " on channel @" << this 188 DVLOG(2) << "sending message @" << message << " on channel @" << this
189 << " with type " << message->type(); 189 << " with type " << message->type();
190 scoped_ptr<Message> message_ptr(message); 190 scoped_ptr<Message> message_ptr(message);
191 191
192 #ifdef IPC_MESSAGE_LOG_ENABLED 192 #ifdef IPC_MESSAGE_LOG_ENABLED
193 Logging::GetInstance()->OnSendMessage(message_ptr.get(), ""); 193 Logging::GetInstance()->OnSendMessage(message_ptr.get(), "");
194 #endif // IPC_MESSAGE_LOG_ENABLED 194 #endif // IPC_MESSAGE_LOG_ENABLED
195 195
196 message->TraceMessageStep(); 196 message->TraceMessageBegin();
197 output_queue_.push_back(linked_ptr<Message>(message_ptr.release())); 197 output_queue_.push_back(linked_ptr<Message>(message_ptr.release()));
198 if (!waiting_connect_) 198 if (!waiting_connect_)
199 return ProcessOutgoingMessages(); 199 return ProcessOutgoingMessages();
200 200
201 return true; 201 return true;
202 } 202 }
203 203
204 void Channel::ChannelImpl::DidRecvMsg(scoped_ptr<MessageContents> contents) { 204 void Channel::ChannelImpl::DidRecvMsg(scoped_ptr<MessageContents> contents) {
205 // Close sets the pipe to -1. It's possible we'll get a buffer sent to us from 205 // Close sets the pipe to -1. It's possible we'll get a buffer sent to us from
206 // the reader thread after Close is called. If so, we ignore it. 206 // the reader thread after Close is called. If so, we ignore it.
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 // A random name is sufficient validation on posix systems, so we don't need 388 // A random name is sufficient validation on posix systems, so we don't need
389 // an additional shared secret. 389 // an additional shared secret.
390 std::string id = prefix; 390 std::string id = prefix;
391 if (!id.empty()) 391 if (!id.empty())
392 id.append("."); 392 id.append(".");
393 393
394 return id.append(GenerateUniqueRandomChannelID()); 394 return id.append(GenerateUniqueRandomChannelID());
395 } 395 }
396 396
397 } // namespace IPC 397 } // namespace IPC
OLDNEW
« no previous file with comments | « base/threading/sequenced_worker_pool.cc ('k') | ipc/ipc_channel_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698