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

Side by Side Diff: ipc/ipc_channel_win.cc

Issue 6880166: Improving logging in /app, /base, /crypto and /ipc. Updating plain DCHECK() usages for DCHECK_EQ/LE/ (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Static casting to DWORD to fix type mismatch Created 9 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 | Annotate | Revision Log
« no previous file with comments | « crypto/signature_verifier_win.cc ('k') | ipc/ipc_sync_channel.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <sddl.h> 8 #include <sddl.h>
9 #include <sstream> 9 #include <sstream>
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 const std::wstring Channel::ChannelImpl::PipeName( 170 const std::wstring Channel::ChannelImpl::PipeName(
171 const std::string& channel_id) const { 171 const std::string& channel_id) const {
172 std::wostringstream ss; 172 std::wostringstream ss;
173 // XXX(darin): get application name from somewhere else 173 // XXX(darin): get application name from somewhere else
174 ss << L"\\\\.\\pipe\\chrome." << ASCIIToWide(channel_id); 174 ss << L"\\\\.\\pipe\\chrome." << ASCIIToWide(channel_id);
175 return ss.str(); 175 return ss.str();
176 } 176 }
177 177
178 bool Channel::ChannelImpl::CreatePipe(const IPC::ChannelHandle &channel_handle, 178 bool Channel::ChannelImpl::CreatePipe(const IPC::ChannelHandle &channel_handle,
179 Mode mode) { 179 Mode mode) {
180 DCHECK(pipe_ == INVALID_HANDLE_VALUE); 180 DCHECK_EQ(INVALID_HANDLE_VALUE, pipe_);
181 const std::wstring pipe_name = PipeName(channel_handle.name); 181 const std::wstring pipe_name = PipeName(channel_handle.name);
182 if (mode & MODE_SERVER_FLAG) { 182 if (mode & MODE_SERVER_FLAG) {
183 SECURITY_ATTRIBUTES security_attributes = {0}; 183 SECURITY_ATTRIBUTES security_attributes = {0};
184 security_attributes.bInheritHandle = FALSE; 184 security_attributes.bInheritHandle = FALSE;
185 security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES); 185 security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES);
186 if (!GetLogonSessionOnlyDACL( 186 if (!GetLogonSessionOnlyDACL(
187 reinterpret_cast<SECURITY_DESCRIPTOR**>( 187 reinterpret_cast<SECURITY_DESCRIPTOR**>(
188 &security_attributes.lpSecurityDescriptor))) { 188 &security_attributes.lpSecurityDescriptor))) {
189 NOTREACHED(); 189 NOTREACHED();
190 } 190 }
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 491
492 void Channel::set_listener(Listener* listener) { 492 void Channel::set_listener(Listener* listener) {
493 channel_impl_->set_listener(listener); 493 channel_impl_->set_listener(listener);
494 } 494 }
495 495
496 bool Channel::Send(Message* message) { 496 bool Channel::Send(Message* message) {
497 return channel_impl_->Send(message); 497 return channel_impl_->Send(message);
498 } 498 }
499 499
500 } // namespace IPC 500 } // namespace IPC
OLDNEW
« no previous file with comments | « crypto/signature_verifier_win.cc ('k') | ipc/ipc_sync_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698