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

Side by Side Diff: ipc/ipc_listener.h

Issue 283313002: Ensure that any IPC sent from a child process that couldn't be deserialized causes that p… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: switch to histograms Created 6 years, 7 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 | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_message.h » ('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 #ifndef IPC_IPC_LISTENER_H_ 5 #ifndef IPC_IPC_LISTENER_H_
6 #define IPC_IPC_LISTENER_H_ 6 #define IPC_IPC_LISTENER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "ipc/ipc_export.h" 10 #include "ipc/ipc_export.h"
(...skipping 10 matching lines...) Expand all
21 virtual bool OnMessageReceived(const Message& message) = 0; 21 virtual bool OnMessageReceived(const Message& message) = 0;
22 22
23 // Called when the channel is connected and we have received the internal 23 // Called when the channel is connected and we have received the internal
24 // Hello message from the peer. 24 // Hello message from the peer.
25 virtual void OnChannelConnected(int32 peer_pid) {} 25 virtual void OnChannelConnected(int32 peer_pid) {}
26 26
27 // Called when an error is detected that causes the channel to close. 27 // Called when an error is detected that causes the channel to close.
28 // This method is not called when a channel is closed normally. 28 // This method is not called when a channel is closed normally.
29 virtual void OnChannelError() {} 29 virtual void OnChannelError() {}
30 30
31 // Called when a message's deserialization failed.
32 virtual void OnBadMessageReceived(const Message& message) {}
33
31 #if defined(OS_POSIX) 34 #if defined(OS_POSIX)
32 // Called on the server side when a channel that listens for connections 35 // Called on the server side when a channel that listens for connections
33 // denies an attempt to connect. 36 // denies an attempt to connect.
34 virtual void OnChannelDenied() {} 37 virtual void OnChannelDenied() {}
35 38
36 // Called on the server side when a channel that listens for connections 39 // Called on the server side when a channel that listens for connections
37 // has an error that causes the listening channel to close. 40 // has an error that causes the listening channel to close.
38 virtual void OnChannelListenError() {} 41 virtual void OnChannelListenError() {}
39 #endif // OS_POSIX 42 #endif // OS_POSIX
40 43
41 protected: 44 protected:
42 virtual ~Listener() {} 45 virtual ~Listener() {}
43 }; 46 };
44 47
45 } // namespace IPC 48 } // namespace IPC
46 49
47 #endif // IPC_IPC_LISTENER_H_ 50 #endif // IPC_IPC_LISTENER_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader.cc ('k') | ipc/ipc_message.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698