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

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: 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
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 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
540 OnConfigUpdated) 540 OnConfigUpdated)
541 IPC_MESSAGE_FORWARD( 541 IPC_MESSAGE_FORWARD(
542 ChromotingDaemonNetworkMsg_DesktopAttached, 542 ChromotingDaemonNetworkMsg_DesktopAttached,
543 desktop_session_connector_, 543 desktop_session_connector_,
544 DesktopSessionConnector::OnDesktopSessionAgentAttached) 544 DesktopSessionConnector::OnDesktopSessionAgentAttached)
545 IPC_MESSAGE_FORWARD(ChromotingDaemonNetworkMsg_TerminalDisconnected, 545 IPC_MESSAGE_FORWARD(ChromotingDaemonNetworkMsg_TerminalDisconnected,
546 desktop_session_connector_, 546 desktop_session_connector_,
547 DesktopSessionConnector::OnTerminalDisconnected) 547 DesktopSessionConnector::OnTerminalDisconnected)
548 IPC_MESSAGE_UNHANDLED(handled = false) 548 IPC_MESSAGE_UNHANDLED(handled = false)
549 IPC_END_MESSAGE_MAP() 549 IPC_END_MESSAGE_MAP()
550
551 CHECK(handled) << "An unexpected IPC message received: type="
552 << message.type();
550 return handled; 553 return handled;
554
551 #else // !defined(REMOTING_MULTI_PROCESS) 555 #else // !defined(REMOTING_MULTI_PROCESS)
552 return false; 556 return false;
553 #endif // !defined(REMOTING_MULTI_PROCESS) 557 #endif // !defined(REMOTING_MULTI_PROCESS)
554 } 558 }
555 559
556 void HostProcess::OnChannelError() { 560 void HostProcess::OnChannelError() {
557 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread()); 561 DCHECK(context_->ui_task_runner()->BelongsToCurrentThread());
558 562
559 // Shutdown the host if the daemon process disconnects the IPC channel. 563 // Shutdown the host if the daemon process disconnects the IPC channel.
560 context_->network_task_runner()->PostTask( 564 context_->network_task_runner()->PostTask(
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 return exit_code; 1104 return exit_code;
1101 } 1105 }
1102 1106
1103 } // namespace remoting 1107 } // namespace remoting
1104 1108
1105 #if !defined(OS_WIN) 1109 #if !defined(OS_WIN)
1106 int main(int argc, char** argv) { 1110 int main(int argc, char** argv) {
1107 return remoting::HostMain(argc, argv); 1111 return remoting::HostMain(argc, argv);
1108 } 1112 }
1109 #endif // !defined(OS_WIN) 1113 #endif // !defined(OS_WIN)
OLDNEW
« remoting/host/desktop_process.cc ('K') | « remoting/host/desktop_session_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698