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

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

Issue 12163003: Add FilePath to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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/desktop_session_win.h ('k') | remoting/host/host_key_pair_unittest.cc » ('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 #include "remoting/host/desktop_session_win.h" 5 #include "remoting/host/desktop_session_win.h"
6 6
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "ipc/ipc_message_macros.h" 8 #include "ipc/ipc_message_macros.h"
9 #include "remoting/base/auto_thread_task_runner.h" 9 #include "remoting/base/auto_thread_task_runner.h"
10 #include "remoting/host/chromoting_messages.h" 10 #include "remoting/host/chromoting_messages.h"
11 #include "remoting/host/daemon_process.h" 11 #include "remoting/host/daemon_process.h"
12 #include "remoting/host/sas_injector.h" 12 #include "remoting/host/sas_injector.h"
13 #include "remoting/host/win/worker_process_launcher.h" 13 #include "remoting/host/win/worker_process_launcher.h"
14 #include "remoting/host/win/wts_console_monitor.h" 14 #include "remoting/host/win/wts_console_monitor.h"
15 #include "remoting/host/win/wts_session_process_delegate.h" 15 #include "remoting/host/win/wts_session_process_delegate.h"
16 16
17 using base::win::ScopedHandle; 17 using base::win::ScopedHandle;
18 18
19 namespace { 19 namespace {
20 20
21 const FilePath::CharType kDesktopBinaryName[] = 21 const base::FilePath::CharType kDesktopBinaryName[] =
22 FILE_PATH_LITERAL("remoting_desktop.exe"); 22 FILE_PATH_LITERAL("remoting_desktop.exe");
23 23
24 // The security descriptor of the daemon IPC endpoint. It gives full access 24 // The security descriptor of the daemon IPC endpoint. It gives full access
25 // to LocalSystem and denies access by anyone else. 25 // to LocalSystem and denies access by anyone else.
26 const char kDaemonIpcSecurityDescriptor[] = "O:SYG:SYD:(A;;GA;;;SY)"; 26 const char kDaemonIpcSecurityDescriptor[] = "O:SYG:SYD:(A;;GA;;;SY)";
27 27
28 } // namespace 28 } // namespace
29 29
30 namespace remoting { 30 namespace remoting {
31 31
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // This call will delete |this| so it should be at the very end of the method. 88 // This call will delete |this| so it should be at the very end of the method.
89 daemon_process()->CloseDesktopSession(id()); 89 daemon_process()->CloseDesktopSession(id());
90 } 90 }
91 91
92 void DesktopSessionWin::OnSessionAttached(uint32 session_id) { 92 void DesktopSessionWin::OnSessionAttached(uint32 session_id) {
93 DCHECK(main_task_runner_->BelongsToCurrentThread()); 93 DCHECK(main_task_runner_->BelongsToCurrentThread());
94 DCHECK(launcher_.get() == NULL); 94 DCHECK(launcher_.get() == NULL);
95 95
96 // Construct the host binary name. 96 // Construct the host binary name.
97 if (desktop_binary_.empty()) { 97 if (desktop_binary_.empty()) {
98 FilePath dir_path; 98 base::FilePath dir_path;
99 if (!PathService::Get(base::DIR_EXE, &dir_path)) { 99 if (!PathService::Get(base::DIR_EXE, &dir_path)) {
100 LOG(ERROR) << "Failed to get the executable file name."; 100 LOG(ERROR) << "Failed to get the executable file name.";
101 OnPermanentError(); 101 OnPermanentError();
102 return; 102 return;
103 } 103 }
104 desktop_binary_ = dir_path.Append(kDesktopBinaryName); 104 desktop_binary_ = dir_path.Append(kDesktopBinaryName);
105 } 105 }
106 106
107 // Create a delegate to launch a process into the session. 107 // Create a delegate to launch a process into the session.
108 scoped_ptr<WtsSessionProcessDelegate> delegate( 108 scoped_ptr<WtsSessionProcessDelegate> delegate(
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 void DesktopSessionWin::RestartDesktopProcess( 148 void DesktopSessionWin::RestartDesktopProcess(
149 const tracked_objects::Location& location) { 149 const tracked_objects::Location& location) {
150 DCHECK(main_task_runner_->BelongsToCurrentThread()); 150 DCHECK(main_task_runner_->BelongsToCurrentThread());
151 151
152 launcher_->Send(new ChromotingDaemonDesktopMsg_Crash( 152 launcher_->Send(new ChromotingDaemonDesktopMsg_Crash(
153 location.function_name(), location.file_name(), location.line_number())); 153 location.function_name(), location.file_name(), location.line_number()));
154 } 154 }
155 155
156 } // namespace remoting 156 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_win.h ('k') | remoting/host/host_key_pair_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698