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

Side by Side Diff: ipc/ipc_channel_win.cc

Issue 10919023: Add async trace events to trace progress of IPC messages (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix SpellCheckProviderTest.MultiLineText 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 | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_message.h » ('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_win.h" 5 #include "ipc/ipc_channel_win.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 bool Channel::ChannelImpl::Send(Message* message) { 81 bool Channel::ChannelImpl::Send(Message* message) {
82 DCHECK(thread_check_->CalledOnValidThread()); 82 DCHECK(thread_check_->CalledOnValidThread());
83 DVLOG(2) << "sending message @" << message << " on channel @" << this 83 DVLOG(2) << "sending message @" << message << " on channel @" << this
84 << " with type " << message->type() 84 << " with type " << message->type()
85 << " (" << output_queue_.size() << " in queue)"; 85 << " (" << output_queue_.size() << " in queue)";
86 86
87 #ifdef IPC_MESSAGE_LOG_ENABLED 87 #ifdef IPC_MESSAGE_LOG_ENABLED
88 Logging::GetInstance()->OnSendMessage(message, ""); 88 Logging::GetInstance()->OnSendMessage(message, "");
89 #endif 89 #endif
90 90
91 message->TraceMessageStep();
91 output_queue_.push(message); 92 output_queue_.push(message);
92 // ensure waiting to write 93 // ensure waiting to write
93 if (!waiting_connect_) { 94 if (!waiting_connect_) {
94 if (!output_state_.is_pending) { 95 if (!output_state_.is_pending) {
95 if (!ProcessOutgoingMessages(NULL, 0)) 96 if (!ProcessOutgoingMessages(NULL, 0))
96 return false; 97 return false;
97 } 98 }
98 } 99 }
99 100
100 return true; 101 return true;
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 int secret; 498 int secret;
498 do { // Guarantee we get a non-zero value. 499 do { // Guarantee we get a non-zero value.
499 secret = base::RandInt(0, std::numeric_limits<int>::max()); 500 secret = base::RandInt(0, std::numeric_limits<int>::max());
500 } while (secret == 0); 501 } while (secret == 0);
501 502
502 id.append(GenerateUniqueRandomChannelID()); 503 id.append(GenerateUniqueRandomChannelID());
503 return id.append(base::StringPrintf("\\%d", secret)); 504 return id.append(base::StringPrintf("\\%d", secret));
504 } 505 }
505 506
506 } // namespace IPC 507 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698