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

Side by Side Diff: content/common/child_process_host_impl.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
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 CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ 5 #ifndef CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ 6 #define CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 69
70 private: 70 private:
71 friend class ChildProcessHost; 71 friend class ChildProcessHost;
72 72
73 explicit ChildProcessHostImpl(ChildProcessHostDelegate* delegate); 73 explicit ChildProcessHostImpl(ChildProcessHostDelegate* delegate);
74 74
75 // IPC::Listener methods: 75 // IPC::Listener methods:
76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; 76 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
77 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; 77 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE;
78 virtual void OnChannelError() OVERRIDE; 78 virtual void OnChannelError() OVERRIDE;
79 virtual void OnBadMessageReceived(const IPC::Message& message) OVERRIDE;
79 80
80 // Message handlers: 81 // Message handlers:
81 void OnShutdownRequest(); 82 void OnShutdownRequest();
82 void OnAllocateSharedMemory(uint32 buffer_size, 83 void OnAllocateSharedMemory(uint32 buffer_size,
83 base::SharedMemoryHandle* handle); 84 base::SharedMemoryHandle* handle);
84 void OnAllocateGpuMemoryBuffer(uint32 width, 85 void OnAllocateGpuMemoryBuffer(uint32 width,
85 uint32 height, 86 uint32 height,
86 uint32 internalformat, 87 uint32 internalformat,
87 uint32 usage, 88 uint32 usage,
88 gfx::GpuMemoryBufferHandle* handle); 89 gfx::GpuMemoryBufferHandle* handle);
89 90
90 ChildProcessHostDelegate* delegate_; 91 ChildProcessHostDelegate* delegate_;
91 base::ProcessHandle peer_handle_; 92 base::ProcessHandle peer_handle_;
92 bool opening_channel_; // True while we're waiting the channel to be opened. 93 bool opening_channel_; // True while we're waiting the channel to be opened.
93 scoped_ptr<IPC::Channel> channel_; 94 scoped_ptr<IPC::Channel> channel_;
94 std::string channel_id_; 95 std::string channel_id_;
95 96
96 // Holds all the IPC message filters. Since this object lives on the IO 97 // Holds all the IPC message filters. Since this object lives on the IO
97 // thread, we don't have a IPC::ChannelProxy and so we manage filters 98 // thread, we don't have a IPC::ChannelProxy and so we manage filters
98 // manually. 99 // manually.
99 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; 100 std::vector<scoped_refptr<IPC::MessageFilter> > filters_;
100 101
101 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl); 102 DISALLOW_COPY_AND_ASSIGN(ChildProcessHostImpl);
102 }; 103 };
103 104
104 } // namespace content 105 } // namespace content
105 106
106 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_ 107 #endif // CONTENT_COMMON_CHILD_PROCESS_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « content/browser/worker_host/worker_process_host.cc ('k') | content/common/child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698