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

Side by Side Diff: cloud_print/service/win/setup_listener.cc

Issue 307653003: Introduce IPC::Channel::Create*() to ensure it being heap-allocated. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing windows build, landing again. Created 6 years, 6 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cloud_print/service/win/setup_listener.h" 5 #include "cloud_print/service/win/setup_listener.h"
6 6
7 #include <atlbase.h> 7 #include <atlbase.h>
8 #include <atlsecurity.h> 8 #include <atlsecurity.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 ATL::CSecurityAttributes attribs(desk); 110 ATL::CSecurityAttributes attribs(desk);
111 111
112 base::win::ScopedHandle pipe( 112 base::win::ScopedHandle pipe(
113 CreateNamedPipe(kSetupPipeName, 113 CreateNamedPipe(kSetupPipeName,
114 PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED | 114 PIPE_ACCESS_DUPLEX | FILE_FLAG_OVERLAPPED |
115 FILE_FLAG_FIRST_PIPE_INSTANCE, 115 FILE_FLAG_FIRST_PIPE_INSTANCE,
116 PIPE_TYPE_BYTE | PIPE_READMODE_BYTE, 1, 116 PIPE_TYPE_BYTE | PIPE_READMODE_BYTE, 1,
117 IPC::Channel::kReadBufferSize, 117 IPC::Channel::kReadBufferSize,
118 IPC::Channel::kReadBufferSize, 5000, &attribs)); 118 IPC::Channel::kReadBufferSize, 5000, &attribs));
119 if (pipe.IsValid()) { 119 if (pipe.IsValid()) {
120 channel_.reset(new IPC::Channel(IPC::ChannelHandle(pipe), 120 channel_ = IPC::Channel::CreateServer(IPC::ChannelHandle(pipe),
121 IPC::Channel::MODE_SERVER, this)); 121 this);
122 channel_->Connect(); 122 channel_->Connect();
123 } 123 }
124 } 124 }
125 125
OLDNEW
« no previous file with comments | « cloud_print/service/win/service_listener.cc ('k') | components/nacl/broker/nacl_broker_listener.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698