OLD | NEW |
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 "remoting/host/desktop_session_proxy.h" | 5 #include "remoting/host/desktop_session_proxy.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/platform_file.h" | 9 #include "base/platform_file.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 } | 226 } |
227 | 227 |
228 desktop_process_ = desktop_process; | 228 desktop_process_ = desktop_process; |
229 | 229 |
230 #if defined(OS_WIN) | 230 #if defined(OS_WIN) |
231 // On Windows: |desktop_process| is a valid handle, but |desktop_pipe| needs | 231 // On Windows: |desktop_process| is a valid handle, but |desktop_pipe| needs |
232 // to be duplicated from the desktop process. | 232 // to be duplicated from the desktop process. |
233 HANDLE temp_handle; | 233 HANDLE temp_handle; |
234 if (!DuplicateHandle(desktop_process_, desktop_pipe, GetCurrentProcess(), | 234 if (!DuplicateHandle(desktop_process_, desktop_pipe, GetCurrentProcess(), |
235 &temp_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { | 235 &temp_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { |
236 LOG_GETLASTERROR(ERROR) << "Failed to duplicate the desktop-to-network" | 236 PLOG(ERROR) << "Failed to duplicate the desktop-to-network pipe handle"; |
237 " pipe handle"; | |
238 | 237 |
239 desktop_process_ = base::kNullProcessHandle; | 238 desktop_process_ = base::kNullProcessHandle; |
240 base::CloseProcessHandle(desktop_process); | 239 base::CloseProcessHandle(desktop_process); |
241 return false; | 240 return false; |
242 } | 241 } |
243 base::win::ScopedHandle pipe(temp_handle); | 242 base::win::ScopedHandle pipe(temp_handle); |
244 | 243 |
245 IPC::ChannelHandle desktop_channel_handle(pipe); | 244 IPC::ChannelHandle desktop_channel_handle(pipe); |
246 | 245 |
247 #elif defined(OS_POSIX) | 246 #elif defined(OS_POSIX) |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 } | 556 } |
558 | 557 |
559 // static | 558 // static |
560 void DesktopSessionProxyTraits::Destruct( | 559 void DesktopSessionProxyTraits::Destruct( |
561 const DesktopSessionProxy* desktop_session_proxy) { | 560 const DesktopSessionProxy* desktop_session_proxy) { |
562 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, | 561 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, |
563 desktop_session_proxy); | 562 desktop_session_proxy); |
564 } | 563 } |
565 | 564 |
566 } // namespace remoting | 565 } // namespace remoting |
OLD | NEW |