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

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

Issue 12390027: Crash the network or desktop process when an unknown IPC message is received. (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 | « no previous file | remoting/host/desktop_process.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"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientDisconnected, 91 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientDisconnected,
92 OnClientDisconnected) 92 OnClientDisconnected)
93 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientRouteChange, 93 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_ClientRouteChange,
94 OnClientRouteChange) 94 OnClientRouteChange)
95 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostStarted, 95 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostStarted,
96 OnHostStarted) 96 OnHostStarted)
97 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostShutdown, 97 IPC_MESSAGE_HANDLER(ChromotingNetworkDaemonMsg_HostShutdown,
98 OnHostShutdown) 98 OnHostShutdown)
99 IPC_MESSAGE_UNHANDLED(handled = false) 99 IPC_MESSAGE_UNHANDLED(handled = false)
100 IPC_END_MESSAGE_MAP() 100 IPC_END_MESSAGE_MAP()
101
102 if (!handled) {
103 LOG(ERROR) << "Received unexpected IPC type: " << message.type();
104 CrashNetworkProcess(FROM_HERE);
105 }
106
101 return handled; 107 return handled;
102 } 108 }
103 109
104 void DaemonProcess::OnPermanentError() { 110 void DaemonProcess::OnPermanentError() {
105 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 111 DCHECK(caller_task_runner()->BelongsToCurrentThread());
106 Stop(); 112 Stop();
107 } 113 }
108 114
109 void DaemonProcess::CloseDesktopSession(int terminal_id) { 115 void DaemonProcess::CloseDesktopSession(int terminal_id) {
110 DCHECK(caller_task_runner()->BelongsToCurrentThread()); 116 DCHECK(caller_task_runner()->BelongsToCurrentThread());
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 } 302 }
297 303
298 void DaemonProcess::DeleteAllDesktopSessions() { 304 void DaemonProcess::DeleteAllDesktopSessions() {
299 while (!desktop_sessions_.empty()) { 305 while (!desktop_sessions_.empty()) {
300 delete desktop_sessions_.front(); 306 delete desktop_sessions_.front();
301 desktop_sessions_.pop_front(); 307 desktop_sessions_.pop_front();
302 } 308 }
303 } 309 }
304 310
305 } // namespace remoting 311 } // namespace remoting
OLDNEW
« no previous file with comments | « no previous file | remoting/host/desktop_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698