| OLD | NEW |
| 1 | 1 |
| 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
| 4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
| 5 // | 5 // |
| 6 // This file implements the Windows service controlling Me2Me host processes | 6 // This file implements the Windows service controlling Me2Me host processes |
| 7 // running within user sessions. | 7 // running within user sessions. |
| 8 | 8 |
| 9 #include "remoting/host/win/unprivileged_process_delegate.h" | 9 #include "remoting/host/win/unprivileged_process_delegate.h" |
| 10 | 10 |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 return; | 284 return; |
| 285 } | 285 } |
| 286 ScopedHandle client(temp_handle); | 286 ScopedHandle client(temp_handle); |
| 287 | 287 |
| 288 // Convert the handle value into a decimal integer. Handle values are 32bit | 288 // Convert the handle value into a decimal integer. Handle values are 32bit |
| 289 // even on 64bit platforms. | 289 // even on 64bit platforms. |
| 290 std::string pipe_handle = base::StringPrintf( | 290 std::string pipe_handle = base::StringPrintf( |
| 291 "%d", reinterpret_cast<ULONG_PTR>(client.Get())); | 291 "%d", reinterpret_cast<ULONG_PTR>(client.Get())); |
| 292 | 292 |
| 293 // Pass the IPC channel via the command line. | 293 // Pass the IPC channel via the command line. |
| 294 CommandLine command_line(target_command_->argv()); | 294 base::CommandLine command_line(target_command_->argv()); |
| 295 command_line.AppendSwitchASCII(kDaemonPipeSwitchName, pipe_handle); | 295 command_line.AppendSwitchASCII(kDaemonPipeSwitchName, pipe_handle); |
| 296 | 296 |
| 297 // Create our own window station and desktop accessible by |logon_sid|. | 297 // Create our own window station and desktop accessible by |logon_sid|. |
| 298 WindowStationAndDesktop handles; | 298 WindowStationAndDesktop handles; |
| 299 if (!CreateWindowStationAndDesktop(logon_sid.Pass(), &handles)) { | 299 if (!CreateWindowStationAndDesktop(logon_sid.Pass(), &handles)) { |
| 300 PLOG(ERROR) << "Failed to create a window station and desktop"; | 300 PLOG(ERROR) << "Failed to create a window station and desktop"; |
| 301 ReportFatalError(); | 301 ReportFatalError(); |
| 302 return; | 302 return; |
| 303 } | 303 } |
| 304 | 304 |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 0)) { | 411 0)) { |
| 412 PLOG(ERROR) << "Failed to duplicate a handle"; | 412 PLOG(ERROR) << "Failed to duplicate a handle"; |
| 413 ReportFatalError(); | 413 ReportFatalError(); |
| 414 return; | 414 return; |
| 415 } | 415 } |
| 416 ScopedHandle limited_handle(temp_handle); | 416 ScopedHandle limited_handle(temp_handle); |
| 417 | 417 |
| 418 event_handler_->OnProcessLaunched(limited_handle.Pass()); | 418 event_handler_->OnProcessLaunched(limited_handle.Pass()); |
| 419 } | 419 } |
| 420 | 420 |
| 421 } // namespace remoting | 421 } // namespace remoting |
| OLD | NEW |