| 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/process/process_handle.h" | 9 #include "base/process/process_handle.h" |
| 10 #include "base/memory/shared_memory.h" | 10 #include "base/memory/shared_memory.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 if (!DuplicateHandle(desktop_process_, desktop_pipe, GetCurrentProcess(), | 241 if (!DuplicateHandle(desktop_process_, desktop_pipe, GetCurrentProcess(), |
| 242 &temp_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { | 242 &temp_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { |
| 243 PLOG(ERROR) << "Failed to duplicate the desktop-to-network pipe handle"; | 243 PLOG(ERROR) << "Failed to duplicate the desktop-to-network pipe handle"; |
| 244 | 244 |
| 245 desktop_process_ = base::kNullProcessHandle; | 245 desktop_process_ = base::kNullProcessHandle; |
| 246 base::CloseProcessHandle(desktop_process); | 246 base::CloseProcessHandle(desktop_process); |
| 247 return false; | 247 return false; |
| 248 } | 248 } |
| 249 base::win::ScopedHandle pipe(temp_handle); | 249 base::win::ScopedHandle pipe(temp_handle); |
| 250 | 250 |
| 251 IPC::ChannelHandle desktop_channel_handle(pipe); | 251 IPC::ChannelHandle desktop_channel_handle(pipe.Get()); |
| 252 | 252 |
| 253 #elif defined(OS_POSIX) | 253 #elif defined(OS_POSIX) |
| 254 // On posix: |desktop_pipe| is a valid file descriptor. | 254 // On posix: |desktop_pipe| is a valid file descriptor. |
| 255 DCHECK(desktop_pipe.auto_close); | 255 DCHECK(desktop_pipe.auto_close); |
| 256 | 256 |
| 257 IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe); | 257 IPC::ChannelHandle desktop_channel_handle(std::string(), desktop_pipe); |
| 258 | 258 |
| 259 #else | 259 #else |
| 260 #error Unsupported platform. | 260 #error Unsupported platform. |
| 261 #endif | 261 #endif |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 } | 571 } |
| 572 | 572 |
| 573 // static | 573 // static |
| 574 void DesktopSessionProxyTraits::Destruct( | 574 void DesktopSessionProxyTraits::Destruct( |
| 575 const DesktopSessionProxy* desktop_session_proxy) { | 575 const DesktopSessionProxy* desktop_session_proxy) { |
| 576 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, | 576 desktop_session_proxy->caller_task_runner_->DeleteSoon(FROM_HERE, |
| 577 desktop_session_proxy); | 577 desktop_session_proxy); |
| 578 } | 578 } |
| 579 | 579 |
| 580 } // namespace remoting | 580 } // namespace remoting |
| OLD | NEW |