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

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

Issue 17261013: Change the daemon start type to 'manual' if the host ID has been deleted. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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_win.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/location.h"
13 #include "base/single_thread_task_runner.h" 13 #include "base/single_thread_task_runner.h"
14 #include "net/base/net_util.h" 14 #include "net/base/net_util.h"
15 #include "remoting/base/auto_thread_task_runner.h" 15 #include "remoting/base/auto_thread_task_runner.h"
16 #include "remoting/host/branding.h" 16 #include "remoting/host/branding.h"
17 #include "remoting/host/chromoting_messages.h" 17 #include "remoting/host/chromoting_messages.h"
18 #include "remoting/host/desktop_session.h" 18 #include "remoting/host/desktop_session.h"
19 #include "remoting/host/host_event_logger.h" 19 #include "remoting/host/host_event_logger.h"
20 #include "remoting/host/host_exit_codes.h"
20 #include "remoting/host/host_status_observer.h" 21 #include "remoting/host/host_status_observer.h"
21 #include "remoting/host/screen_resolution.h" 22 #include "remoting/host/screen_resolution.h"
22 #include "remoting/protocol/transport.h" 23 #include "remoting/protocol/transport.h"
23 24
24 namespace remoting { 25 namespace remoting {
25 26
26 namespace { 27 namespace {
27 28
28 // This is used for tagging system event logs. 29 // This is used for tagging system event logs.
29 const char kApplicationName[] = "chromoting"; 30 const char kApplicationName[] = "chromoting";
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 IPC_END_MESSAGE_MAP() 120 IPC_END_MESSAGE_MAP()
120 121
121 if (!handled) { 122 if (!handled) {
122 LOG(ERROR) << "Received unexpected IPC type: " << message.type(); 123 LOG(ERROR) << "Received unexpected IPC type: " << message.type();
123 CrashNetworkProcess(FROM_HERE); 124 CrashNetworkProcess(FROM_HERE);
124 } 125 }
125 126
126 return handled; 127 return handled;
127 } 128 }
128 129
129 void DaemonProcess::OnPermanentError() { 130 void DaemonProcess::OnPermanentError(int exit_code) {
130 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 131 DCHECK(caller_task_runner()->BelongsToCurrentThread());
132
Jamie 2013/06/20 17:37:54 Nit: I don't think a blank line here improves read
alexeypa (please no reviews) 2013/06/20 21:19:12 Done.
131 Stop(); 133 Stop();
132 } 134 }
133 135
134 void DaemonProcess::CloseDesktopSession(int terminal_id) { 136 void DaemonProcess::CloseDesktopSession(int terminal_id) {
135 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 137 DCHECK(caller_task_runner()->BelongsToCurrentThread());
136 138
137 // Validate the supplied terminal ID. An attempt to use a desktop session ID 139 // Validate the supplied terminal ID. An attempt to use a desktop session ID
138 // that couldn't possibly have been allocated is considered a protocol error 140 // that couldn't possibly have been allocated is considered a protocol error
139 // and the network process will be restarted. 141 // and the network process will be restarted.
140 if (!WasTerminalIdAllocated(terminal_id)) { 142 if (!WasTerminalIdAllocated(terminal_id)) {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
368 } 370 }
369 371
370 void DaemonProcess::DeleteAllDesktopSessions() { 372 void DaemonProcess::DeleteAllDesktopSessions() {
371 while (!desktop_sessions_.empty()) { 373 while (!desktop_sessions_.empty()) {
372 delete desktop_sessions_.front(); 374 delete desktop_sessions_.front();
373 desktop_sessions_.pop_front(); 375 desktop_sessions_.pop_front();
374 } 376 }
375 } 377 }
376 378
377 } // namespace remoting 379 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/daemon_process.h ('k') | remoting/host/daemon_process_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698