OLD | NEW |
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 Loading... |
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 |
OLD | NEW |