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

Unified Diff: remoting/host/win/wts_console_session_process_driver.cc

Issue 11118005: Pass the client end handle of the network-to-daemon IPC channel via handle inheritance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. Created 8 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 side-by-side diff with in-line comments
Download patch
Index: remoting/host/win/wts_console_session_process_driver.cc
diff --git a/remoting/host/win/wts_console_session_process_driver.cc b/remoting/host/win/wts_console_session_process_driver.cc
index 5bd7cd561616d2602dd6a991e7773d195a6745c8..596f25c05a7bc84e7e631a70fcce3852703efae0 100644
--- a/remoting/host/win/wts_console_session_process_driver.cc
+++ b/remoting/host/win/wts_console_session_process_driver.cc
@@ -4,32 +4,21 @@
#include "remoting/host/win/wts_console_session_process_driver.h"
-#include <sddl.h>
-#include <limits>
-
#include "base/base_switches.h"
-#include "base/bind.h"
-#include "base/bind_helpers.h"
#include "base/file_path.h"
#include "base/logging.h"
#include "base/single_thread_task_runner.h"
-#include "base/path_service.h"
#include "ipc/ipc_message.h"
+#include "remoting/host/ipc_consts.h"
#include "remoting/host/win/worker_process_launcher.h"
#include "remoting/host/win/wts_console_monitor.h"
#include "remoting/host/win/wts_session_process_delegate.h"
-namespace {
-
-const FilePath::CharType kMe2meHostBinaryName[] =
- FILE_PATH_LITERAL("remoting_host.exe");
-
-// The security descriptor of the daemon IPC endpoint. It gives full access
-// to LocalSystem and denies access by anyone else.
+// The security descriptor of the named pipe the process running in the console
+// session connects to. It gives full access to LocalSystem and denies access by
+// anyone else.
const char kDaemonIpcSecurityDescriptor[] = "O:SYG:SYD:(A;;GA;;;SY)";
-} // namespace
-
namespace remoting {
WtsConsoleSessionProcessDriver::WtsConsoleSessionProcessDriver(
@@ -84,13 +73,11 @@ void WtsConsoleSessionProcessDriver::OnSessionAttached(uint32 session_id) {
DCHECK(launcher_.get() == NULL);
// Construct the host binary name.
- FilePath dir_path;
- if (!PathService::Get(base::DIR_EXE, &dir_path)) {
- LOG(ERROR) << "Failed to get the executable file name.";
+ FilePath host_binary;
+ if (!GetInstalledBinaryPath(kHostBinaryName, &host_binary)) {
Stop();
return;
}
- FilePath host_binary = dir_path.Append(kMe2meHostBinaryName);
// Create a Delegate capable of launching an elevated process in the session.
scoped_ptr<WtsSessionProcessDelegate> delegate(
@@ -98,14 +85,12 @@ void WtsConsoleSessionProcessDriver::OnSessionAttached(uint32 session_id) {
io_task_runner_,
host_binary,
session_id,
- true));
+ true,
+ kDaemonIpcSecurityDescriptor));
// Use the Delegate to launch the host process.
- launcher_.reset(new WorkerProcessLauncher(caller_task_runner_,
- io_task_runner_,
- delegate.Pass(),
- this,
- kDaemonIpcSecurityDescriptor));
+ launcher_.reset(new WorkerProcessLauncher(
+ caller_task_runner_, delegate.Pass(), this));
}
void WtsConsoleSessionProcessDriver::OnSessionDetached() {
« no previous file with comments | « remoting/host/win/worker_process_launcher_unittest.cc ('k') | remoting/host/win/wts_session_process_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698