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

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

Issue 9953002: The me2me host is now configurable from the web UI on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed one or two nits. :-) Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « remoting/host/elevated_controller_win.cc ('k') | remoting/host/installer/chromoting.wxs » ('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/host_service_win.h" 8 #include "remoting/host/host_service_win.h"
9 9
10 #include <windows.h> 10 #include <windows.h>
(...skipping 16 matching lines...) Expand all
27 #include "remoting/base/scoped_sc_handle_win.h" 27 #include "remoting/base/scoped_sc_handle_win.h"
28 #include "remoting/host/branding.h" 28 #include "remoting/host/branding.h"
29 #include "remoting/host/host_service_resource.h" 29 #include "remoting/host/host_service_resource.h"
30 #include "remoting/host/wts_console_observer_win.h" 30 #include "remoting/host/wts_console_observer_win.h"
31 #include "remoting/host/wts_session_process_launcher_win.h" 31 #include "remoting/host/wts_session_process_launcher_win.h"
32 32
33 using base::StringPrintf; 33 using base::StringPrintf;
34 34
35 namespace { 35 namespace {
36 36
37 // Service name.
38 const char kServiceName[] = "chromoting";
39 // TODO(alexeypa): investigate and migrate this over to Chrome's i18n framework. 37 // TODO(alexeypa): investigate and migrate this over to Chrome's i18n framework.
40 const char kMuiStringFormat[] = "@%ls,-%d"; 38 const char kMuiStringFormat[] = "@%ls,-%d";
41 const char kServiceDependencies[] = ""; 39 const char kServiceDependencies[] = "";
42 40
43 const char kServiceCommandLineFormat[] = "\"%ls\" --host-binary=\"%ls\""; 41 const char kServiceCommandLineFormat[] = "\"%ls\" --host-binary=\"%ls\"";
44 42
45 const DWORD kServiceStopTimeoutMs = 30 * 1000; 43 const DWORD kServiceStopTimeoutMs = 30 * 1000;
46 44
47 // Session id that does not represent any session. 45 // Session id that does not represent any session.
48 const uint32 kInvalidSession = 0xffffffff; 46 const uint32 kInvalidSession = 0xffffffff;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 } 95 }
98 96
99 } // namespace 97 } // namespace
100 98
101 namespace remoting { 99 namespace remoting {
102 100
103 HostService::HostService() : 101 HostService::HostService() :
104 console_session_id_(kInvalidSession), 102 console_session_id_(kInvalidSession),
105 message_loop_(NULL), 103 message_loop_(NULL),
106 run_routine_(&HostService::RunAsService), 104 run_routine_(&HostService::RunAsService),
107 service_name_(ASCIIToUTF16(kServiceName)), 105 service_name_(UTF8ToUTF16(kWindowsServiceName)),
108 service_status_handle_(0), 106 service_status_handle_(0),
109 shutting_down_(false), 107 shutting_down_(false),
110 stopped_event_(true, false) { 108 stopped_event_(true, false) {
111 } 109 }
112 110
113 HostService::~HostService() { 111 HostService::~HostService() {
114 } 112 }
115 113
116 void HostService::AddWtsConsoleObserver(WtsConsoleObserver* observer) { 114 void HostService::AddWtsConsoleObserver(WtsConsoleObserver* observer) {
117 console_observers_.AddObserver(observer); 115 console_observers_.AddObserver(observer);
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 587 }
590 588
591 remoting::HostService* service = remoting::HostService::GetInstance(); 589 remoting::HostService* service = remoting::HostService::GetInstance();
592 if (!service->InitWithCommandLine(command_line)) { 590 if (!service->InitWithCommandLine(command_line)) {
593 usage(argv[0]); 591 usage(argv[0]);
594 return kUsageExitCode; 592 return kUsageExitCode;
595 } 593 }
596 594
597 return service->Run(); 595 return service->Run();
598 } 596 }
OLDNEW
« no previous file with comments | « remoting/host/elevated_controller_win.cc ('k') | remoting/host/installer/chromoting.wxs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698