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

Side by Side Diff: remoting/host/desktop_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 | « remoting/host/daemon_process.cc ('k') | remoting/host/desktop_session_agent.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 // This file implements the Windows service controlling Me2Me host processes 5 // This file implements the Windows service controlling Me2Me host processes
6 // running within user sessions. 6 // running within user sessions.
7 7
8 #include "remoting/host/desktop_process.h" 8 #include "remoting/host/desktop_process.h"
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 } 54 }
55 55
56 bool DesktopProcess::OnMessageReceived(const IPC::Message& message) { 56 bool DesktopProcess::OnMessageReceived(const IPC::Message& message) {
57 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 57 DCHECK(caller_task_runner_->BelongsToCurrentThread());
58 58
59 bool handled = true; 59 bool handled = true;
60 IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message) 60 IPC_BEGIN_MESSAGE_MAP(DesktopProcess, message)
61 IPC_MESSAGE_HANDLER(ChromotingDaemonDesktopMsg_Crash, OnCrash) 61 IPC_MESSAGE_HANDLER(ChromotingDaemonDesktopMsg_Crash, OnCrash)
62 IPC_MESSAGE_UNHANDLED(handled = false) 62 IPC_MESSAGE_UNHANDLED(handled = false)
63 IPC_END_MESSAGE_MAP() 63 IPC_END_MESSAGE_MAP()
64
65 CHECK(handled) << "Received unexpected IPC type: " << message.type();
64 return handled; 66 return handled;
65 } 67 }
66 68
67 void DesktopProcess::OnChannelConnected(int32 peer_pid) { 69 void DesktopProcess::OnChannelConnected(int32 peer_pid) {
68 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 70 DCHECK(caller_task_runner_->BelongsToCurrentThread());
69 71
70 VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")"; 72 VLOG(1) << "IPC: desktop <- daemon (" << peer_pid << ")";
71 } 73 }
72 74
73 void DesktopProcess::OnChannelError() { 75 void DesktopProcess::OnChannelError() {
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 } 147 }
146 148
147 void DesktopProcess::OnCrash(const std::string& function_name, 149 void DesktopProcess::OnCrash(const std::string& function_name,
148 const std::string& file_name, 150 const std::string& file_name,
149 const int& line_number) { 151 const int& line_number) {
150 // The daemon requested us to crash the process. 152 // The daemon requested us to crash the process.
151 CHECK(false); 153 CHECK(false);
152 } 154 }
153 155
154 } // namespace remoting 156 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/daemon_process.cc ('k') | remoting/host/desktop_session_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698