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

Side by Side Diff: remoting/host/remoting_me2me_host.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_win.cc ('k') | no next file » | 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 a standalone host process for Me2Me. 5 // This file implements a standalone host process for Me2Me.
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/at_exit.h" 9 #include "base/at_exit.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 OnConfigUpdated) 541 OnConfigUpdated)
542 IPC_MESSAGE_FORWARD( 542 IPC_MESSAGE_FORWARD(
543 ChromotingDaemonNetworkMsg_DesktopAttached, 543 ChromotingDaemonNetworkMsg_DesktopAttached,
544 desktop_session_connector_, 544 desktop_session_connector_,
545 DesktopSessionConnector::OnDesktopSessionAgentAttached) 545 DesktopSessionConnector::OnDesktopSessionAgentAttached)
546 IPC_MESSAGE_FORWARD(ChromotingDaemonNetworkMsg_TerminalDisconnected, 546 IPC_MESSAGE_FORWARD(ChromotingDaemonNetworkMsg_TerminalDisconnected,
547 desktop_session_connector_, 547 desktop_session_connector_,
548 DesktopSessionConnector::OnTerminalDisconnected) 548 DesktopSessionConnector::OnTerminalDisconnected)
549 IPC_MESSAGE_UNHANDLED(handled = false) 549 IPC_MESSAGE_UNHANDLED(handled = false)
550 IPC_END_MESSAGE_MAP() 550 IPC_END_MESSAGE_MAP()
551
552 CHECK(handled) << "Received unexpected IPC type: " << message.type();
551 return handled; 553 return handled;
554
552 #else // !defined(REMOTING_MULTI_PROCESS) 555 #else // !defined(REMOTING_MULTI_PROCESS)
553 return false; 556 return false;
554 #endif // !defined(REMOTING_MULTI_PROCESS) 557 #endif // !defined(REMOTING_MULTI_PROCESS)
555 } 558 }
556 559
557 void HostProcess::OnChannelError() { 560 void HostProcess::OnChannelError() {
558 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); 561 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread());
559 562
560 // Shutdown the host if the daemon process disconnects the IPC channel. 563 // Shutdown the host if the daemon process disconnects the IPC channel.
561 context_->network_task_runner()->PostTask( 564 context_->network_task_runner()->PostTask(
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1126 return exit_code; 1129 return exit_code;
1127 } 1130 }
1128 1131
1129 } // namespace remoting 1132 } // namespace remoting
1130 1133
1131 #if !defined(OS_WIN) 1134 #if !defined(OS_WIN)
1132 int main(int argc, char** argv) { 1135 int main(int argc, char** argv) {
1133 return remoting::HostMain(argc, argv); 1136 return remoting::HostMain(argc, argv);
1134 } 1137 }
1135 #endif // !defined(OS_WIN) 1138 #endif // !defined(OS_WIN)
OLDNEW
« no previous file with comments | « remoting/host/desktop_session_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698