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

Side by Side Diff: remoting/host/desktop_session_proxy.cc

Issue 602763003: Remove implicit HANDLE conversions from remoting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « remoting/host/daemon_process_win.cc ('k') | remoting/host/desktop_session_win.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) 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
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
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
OLDNEW
« no previous file with comments | « remoting/host/daemon_process_win.cc ('k') | remoting/host/desktop_session_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698