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

Side by Side Diff: remoting/host/desktop_session_proxy.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/desktop_session_agent.cc ('k') | remoting/host/desktop_session_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/desktop_session_proxy.h" 5 #include "remoting/host/desktop_session_proxy.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/process_util.h" 10 #include "base/process_util.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_CreateSharedBuffer, 87 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_CreateSharedBuffer,
88 OnCreateSharedBuffer) 88 OnCreateSharedBuffer)
89 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer, 89 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_ReleaseSharedBuffer,
90 OnReleaseSharedBuffer) 90 OnReleaseSharedBuffer)
91 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_InjectClipboardEvent, 91 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_InjectClipboardEvent,
92 OnInjectClipboardEvent) 92 OnInjectClipboardEvent)
93 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_DisconnectSession, 93 IPC_MESSAGE_HANDLER(ChromotingDesktopNetworkMsg_DisconnectSession,
94 DisconnectSession); 94 DisconnectSession);
95 IPC_END_MESSAGE_MAP() 95 IPC_END_MESSAGE_MAP()
96 96
97 CHECK(handled) << "Received unexpected IPC type: " << message.type();
97 return handled; 98 return handled;
98 } 99 }
99 100
100 void DesktopSessionProxy::OnChannelConnected(int32 peer_pid) { 101 void DesktopSessionProxy::OnChannelConnected(int32 peer_pid) {
101 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 102 DCHECK(caller_task_runner_->BelongsToCurrentThread());
102 103
103 VLOG(1) << "IPC: network <- desktop (" << peer_pid << ")"; 104 VLOG(1) << "IPC: network <- desktop (" << peer_pid << ")";
104 } 105 }
105 106
106 void DesktopSessionProxy::OnChannelError() { 107 void DesktopSessionProxy::OnChannelError() {
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 DCHECK(caller_task_runner_->BelongsToCurrentThread()); 465 DCHECK(caller_task_runner_->BelongsToCurrentThread());
465 466
466 if (desktop_channel_) { 467 if (desktop_channel_) {
467 desktop_channel_->Send(message); 468 desktop_channel_->Send(message);
468 } else { 469 } else {
469 delete message; 470 delete message;
470 } 471 }
471 } 472 }
472 473
473 } // namespace remoting 474 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_agent.cc ('k') | remoting/host/desktop_session_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698