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

Side by Side Diff: remoting/host/win/host_service.cc

Issue 11231060: [Chromoting] The desktop process now creates a pre-connected pipe and passes (with some help of the… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/win/host_service.h ('k') | remoting/host/win/launch_process_with_token.h » ('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 the Windows service controlling Me2Me host processes 5 // This file implements the Windows service controlling Me2Me host processes
6 // running within user sessions. 6 // running within user sessions.
7 7
8 #include "remoting/host/win/host_service.h" 8 #include "remoting/host/win/host_service.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
11 #include <shellapi.h> 11 #include <shellapi.h>
12 #include <wtsapi32.h> 12 #include <wtsapi32.h>
13 13
14 #include "base/at_exit.h" 14 #include "base/at_exit.h"
15 #include "base/base_paths.h" 15 #include "base/base_paths.h"
16 #include "base/base_switches.h" 16 #include "base/base_switches.h"
17 #include "base/bind.h" 17 #include "base/bind.h"
18 #include "base/command_line.h" 18 #include "base/command_line.h"
19 #include "base/file_path.h" 19 #include "base/file_path.h"
20 #include "base/message_loop.h" 20 #include "base/message_loop.h"
21 #include "base/single_thread_task_runner.h"
22 #include "base/stringprintf.h" 21 #include "base/stringprintf.h"
23 #include "base/threading/thread.h" 22 #include "base/threading/thread.h"
24 #include "base/utf_string_conversions.h" 23 #include "base/utf_string_conversions.h"
25 #include "base/win/wrapped_window_proc.h" 24 #include "base/win/wrapped_window_proc.h"
26 #include "remoting/base/auto_thread_task_runner.h" 25 #include "remoting/base/auto_thread_task_runner.h"
27 #include "remoting/base/breakpad.h" 26 #include "remoting/base/breakpad.h"
28 #include "remoting/base/scoped_sc_handle_win.h" 27 #include "remoting/base/scoped_sc_handle_win.h"
29 #include "remoting/base/stoppable.h" 28 #include "remoting/base/stoppable.h"
30 #include "remoting/host/branding.h" 29 #include "remoting/host/branding.h"
31 #include "remoting/host/host_exit_codes.h" 30 #include "remoting/host/host_exit_codes.h"
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } 193 }
195 194
196 return true; 195 return true;
197 } 196 }
198 197
199 int HostService::Run() { 198 int HostService::Run() {
200 return (this->*run_routine_)(); 199 return (this->*run_routine_)();
201 } 200 }
202 201
203 void HostService::CreateLauncher( 202 void HostService::CreateLauncher(
204 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner) { 203 scoped_refptr<AutoThreadTaskRunner> io_task_runner) {
205 204
206 #if defined(REMOTING_MULTI_PROCESS) 205 #if defined(REMOTING_MULTI_PROCESS)
207 206
208 child_ = DaemonProcess::Create( 207 child_ = DaemonProcess::Create(
209 main_task_runner_, 208 main_task_runner_,
210 io_task_runner, 209 io_task_runner,
211 base::Bind(&HostService::OnChildStopped, 210 base::Bind(&HostService::OnChildStopped,
212 base::Unretained(this))).PassAs<Stoppable>(); 211 base::Unretained(this))).PassAs<Stoppable>();
213 212
214 #else // !defined(REMOTING_MULTI_PROCESS) 213 #else // !defined(REMOTING_MULTI_PROCESS)
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 } 491 }
493 492
494 remoting::HostService* service = remoting::HostService::GetInstance(); 493 remoting::HostService* service = remoting::HostService::GetInstance();
495 if (!service->InitWithCommandLine(command_line)) { 494 if (!service->InitWithCommandLine(command_line)) {
496 usage(command_line->GetProgram()); 495 usage(command_line->GetProgram());
497 return remoting::kUsageExitCode; 496 return remoting::kUsageExitCode;
498 } 497 }
499 498
500 return service->Run(); 499 return service->Run();
501 } 500 }
OLDNEW
« no previous file with comments | « remoting/host/win/host_service.h ('k') | remoting/host/win/launch_process_with_token.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698