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

Side by Side Diff: remoting/host/remoting_me2me_host.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/ipc_util_win.cc ('k') | remoting/host/setup/daemon_controller_delegate_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 // This file implements a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 int pipe_handle = 0; 395 int pipe_handle = 0;
396 if (channel_name.empty() || 396 if (channel_name.empty() ||
397 !base::StringToInt(channel_name, &pipe_handle)) { 397 !base::StringToInt(channel_name, &pipe_handle)) {
398 LOG(ERROR) << "Invalid '" << kDaemonPipeSwitchName 398 LOG(ERROR) << "Invalid '" << kDaemonPipeSwitchName
399 << "' value: " << channel_name; 399 << "' value: " << channel_name;
400 return false; 400 return false;
401 } 401 }
402 402
403 #if defined(OS_WIN) 403 #if defined(OS_WIN)
404 base::win::ScopedHandle pipe(reinterpret_cast<HANDLE>(pipe_handle)); 404 base::win::ScopedHandle pipe(reinterpret_cast<HANDLE>(pipe_handle));
405 IPC::ChannelHandle channel_handle(pipe); 405 IPC::ChannelHandle channel_handle(pipe.Get());
406 #elif defined(OS_POSIX) 406 #elif defined(OS_POSIX)
407 base::FileDescriptor pipe(pipe_handle, true); 407 base::FileDescriptor pipe(pipe_handle, true);
408 IPC::ChannelHandle channel_handle(channel_name, pipe); 408 IPC::ChannelHandle channel_handle(channel_name, pipe);
409 #endif // defined(OS_POSIX) 409 #endif // defined(OS_POSIX)
410 410
411 // Connect to the daemon process. 411 // Connect to the daemon process.
412 daemon_channel_ = IPC::ChannelProxy::Create(channel_handle, 412 daemon_channel_ = IPC::ChannelProxy::Create(channel_handle,
413 IPC::Channel::MODE_CLIENT, 413 IPC::Channel::MODE_CLIENT,
414 this, 414 this,
415 context_->network_task_runner()); 415 context_->network_task_runner());
(...skipping 1032 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 int exit_code = kSuccessExitCode; 1448 int exit_code = kSuccessExitCode;
1449 new HostProcess(context.Pass(), &exit_code); 1449 new HostProcess(context.Pass(), &exit_code);
1450 1450
1451 // Run the main (also UI) message loop until the host no longer needs it. 1451 // Run the main (also UI) message loop until the host no longer needs it.
1452 message_loop.Run(); 1452 message_loop.Run();
1453 1453
1454 return exit_code; 1454 return exit_code;
1455 } 1455 }
1456 1456
1457 } // namespace remoting 1457 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/ipc_util_win.cc ('k') | remoting/host/setup/daemon_controller_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698