OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "remoting/host/win/chromoting_module.h" | 5 #include "remoting/host/win/chromoting_module.h" |
6 | 6 |
7 #include <sddl.h> | 7 #include <sddl.h> |
8 | 8 |
9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 | 197 |
198 // Elevated controller entry point. | 198 // Elevated controller entry point. |
199 int ElevatedControllerMain() { | 199 int ElevatedControllerMain() { |
200 ATL::_ATL_OBJMAP_ENTRY elevated_controller_entry[] = { | 200 ATL::_ATL_OBJMAP_ENTRY elevated_controller_entry[] = { |
201 OBJECT_ENTRY(__uuidof(ElevatedController), ElevatedController) | 201 OBJECT_ENTRY(__uuidof(ElevatedController), ElevatedController) |
202 }; | 202 }; |
203 | 203 |
204 ChromotingModule module(elevated_controller_entry, | 204 ChromotingModule module(elevated_controller_entry, |
205 elevated_controller_entry + 1); | 205 elevated_controller_entry + 1); |
206 | 206 |
207 if (!InitializeComSecurity(WideToUTF8(kElevatedControllerSd), "", true)) | 207 if (!InitializeComSecurity(base::WideToUTF8(kElevatedControllerSd), "", true)) |
208 return kInitializationFailed; | 208 return kInitializationFailed; |
209 | 209 |
210 if (!module.Run()) | 210 if (!module.Run()) |
211 return kInitializationFailed; | 211 return kInitializationFailed; |
212 | 212 |
213 return kSuccessExitCode; | 213 return kSuccessExitCode; |
214 } | 214 } |
215 | 215 |
216 // RdpClient entry point. | 216 // RdpClient entry point. |
217 int RdpDesktopSessionMain() { | 217 int RdpDesktopSessionMain() { |
218 // Lower the integrity level to medium, which is the lowest level at which | 218 // Lower the integrity level to medium, which is the lowest level at which |
219 // the RDP ActiveX control can run. | 219 // the RDP ActiveX control can run. |
220 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { | 220 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { |
221 if (!LowerProcessIntegrityLevel(SECURITY_MANDATORY_MEDIUM_RID)) | 221 if (!LowerProcessIntegrityLevel(SECURITY_MANDATORY_MEDIUM_RID)) |
222 return kInitializationFailed; | 222 return kInitializationFailed; |
223 } | 223 } |
224 | 224 |
225 ATL::_ATL_OBJMAP_ENTRY rdp_client_entry[] = { | 225 ATL::_ATL_OBJMAP_ENTRY rdp_client_entry[] = { |
226 OBJECT_ENTRY(__uuidof(RdpDesktopSession), RdpDesktopSession) | 226 OBJECT_ENTRY(__uuidof(RdpDesktopSession), RdpDesktopSession) |
227 }; | 227 }; |
228 | 228 |
229 ChromotingModule module(rdp_client_entry, rdp_client_entry + 1); | 229 ChromotingModule module(rdp_client_entry, rdp_client_entry + 1); |
230 return module.Run() ? kSuccessExitCode : kInitializationFailed; | 230 return module.Run() ? kSuccessExitCode : kInitializationFailed; |
231 } | 231 } |
232 | 232 |
233 } // namespace remoting | 233 } // namespace remoting |
OLD | NEW |