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

Side by Side Diff: ipc/ipc_channel_win.cc

Issue 866223005: IPC: Add MojoHandleAttachment (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing windows build again... Created 5 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
« no previous file with comments | « ipc/ipc_channel_posix.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 while (!output_queue_.empty()) { 73 while (!output_queue_.empty()) {
74 Message* m = output_queue_.front(); 74 Message* m = output_queue_.front();
75 output_queue_.pop(); 75 output_queue_.pop();
76 delete m; 76 delete m;
77 } 77 }
78 } 78 }
79 79
80 bool ChannelWin::Send(Message* message) { 80 bool ChannelWin::Send(Message* message) {
81 DCHECK(!message->HasAttachments());
81 DCHECK(thread_check_->CalledOnValidThread()); 82 DCHECK(thread_check_->CalledOnValidThread());
82 DVLOG(2) << "sending message @" << message << " on channel @" << this 83 DVLOG(2) << "sending message @" << message << " on channel @" << this
83 << " with type " << message->type() 84 << " with type " << message->type()
84 << " (" << output_queue_.size() << " in queue)"; 85 << " (" << output_queue_.size() << " in queue)";
85 86
86 #ifdef IPC_MESSAGE_LOG_ENABLED 87 #ifdef IPC_MESSAGE_LOG_ENABLED
87 Logging::GetInstance()->OnSendMessage(message, ""); 88 Logging::GetInstance()->OnSendMessage(message, "");
88 #endif 89 #endif
89 90
90 message->TraceMessageBegin(); 91 message->TraceMessageBegin();
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 int secret; 501 int secret;
501 do { // Guarantee we get a non-zero value. 502 do { // Guarantee we get a non-zero value.
502 secret = base::RandInt(0, std::numeric_limits<int>::max()); 503 secret = base::RandInt(0, std::numeric_limits<int>::max());
503 } while (secret == 0); 504 } while (secret == 0);
504 505
505 id.append(GenerateUniqueRandomChannelID()); 506 id.append(GenerateUniqueRandomChannelID());
506 return id.append(base::StringPrintf("\\%d", secret)); 507 return id.append(base::StringPrintf("\\%d", secret));
507 } 508 }
508 509
509 } // namespace IPC 510 } // namespace IPC
OLDNEW
« no previous file with comments | « ipc/ipc_channel_posix.cc ('k') | ipc/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698