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

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

Issue 12545006: The worker process launcher can now ask the worker to crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 9 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/daemon_process.h ('k') | remoting/host/daemon_process_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/daemon_process.h" 5 #include "remoting/host/daemon_process.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/location.h"
12 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
13 #include "net/base/net_util.h" 14 #include "net/base/net_util.h"
14 #include "remoting/base/auto_thread_task_runner.h" 15 #include "remoting/base/auto_thread_task_runner.h"
15 #include "remoting/host/branding.h" 16 #include "remoting/host/branding.h"
16 #include "remoting/host/chromoting_messages.h" 17 #include "remoting/host/chromoting_messages.h"
17 #include "remoting/host/desktop_session.h" 18 #include "remoting/host/desktop_session.h"
18 #include "remoting/host/host_event_logger.h" 19 #include "remoting/host/host_event_logger.h"
19 #include "remoting/host/host_status_observer.h" 20 #include "remoting/host/host_status_observer.h"
20 #include "remoting/protocol/transport.h" 21 #include "remoting/protocol/transport.h"
21 22
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 new ChromotingDaemonNetworkMsg_TerminalDisconnected(terminal_id)); 212 new ChromotingDaemonNetworkMsg_TerminalDisconnected(terminal_id));
212 return; 213 return;
213 } 214 }
214 215
215 // Update the expected terminal ID. 216 // Update the expected terminal ID.
216 next_terminal_id_ = std::max(next_terminal_id_, terminal_id + 1); 217 next_terminal_id_ = std::max(next_terminal_id_, terminal_id + 1);
217 } 218 }
218 219
219 void DaemonProcess::CrashNetworkProcess( 220 void DaemonProcess::CrashNetworkProcess(
220 const tracked_objects::Location& location) { 221 const tracked_objects::Location& location) {
221 SendToNetwork(new ChromotingDaemonNetworkMsg_Crash( 222 DCHECK(caller_task_runner()->BelongsToCurrentThread());
222 location.function_name(), location.file_name(), location.line_number()));
223 223
224 DoCrashNetworkProcess(location);
224 DeleteAllDesktopSessions(); 225 DeleteAllDesktopSessions();
225 } 226 }
226 227
227 void DaemonProcess::Initialize() { 228 void DaemonProcess::Initialize() {
228 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 229 DCHECK(caller_task_runner()->BelongsToCurrentThread());
229 230
230 // Get the name of the host configuration file. 231 // Get the name of the host configuration file.
231 base::FilePath default_config_dir = remoting::GetConfigDir(); 232 base::FilePath default_config_dir = remoting::GetConfigDir();
232 base::FilePath config_path = default_config_dir.Append(kDefaultHostConfigFile) ; 233 base::FilePath config_path = default_config_dir.Append(kDefaultHostConfigFile) ;
233 const CommandLine* command_line = CommandLine::ForCurrentProcess(); 234 const CommandLine* command_line = CommandLine::ForCurrentProcess();
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 344 }
344 345
345 void DaemonProcess::DeleteAllDesktopSessions() { 346 void DaemonProcess::DeleteAllDesktopSessions() {
346 while (!desktop_sessions_.empty()) { 347 while (!desktop_sessions_.empty()) {
347 delete desktop_sessions_.front(); 348 delete desktop_sessions_.front();
348 desktop_sessions_.pop_front(); 349 desktop_sessions_.pop_front();
349 } 350 }
350 } 351 }
351 352
352 } // namespace remoting 353 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/daemon_process.h ('k') | remoting/host/daemon_process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698