OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_BROWSER_BAD_MESSAGE_H_ | 5 #ifndef CONTENT_BROWSER_BAD_MESSAGE_H_ |
6 #define CONTENT_BROWSER_BAD_MESSAGE_H_ | 6 #define CONTENT_BROWSER_BAD_MESSAGE_H_ |
7 | 7 |
8 namespace content { | 8 namespace content { |
9 class BrowserMessageFilter; | 9 class BrowserMessageFilter; |
10 class RenderProcessHost; | 10 class RenderProcessHost; |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 SWDH_SET_HOSTED_VERSION_PROCESS_MISMATCH = 129, | 153 SWDH_SET_HOSTED_VERSION_PROCESS_MISMATCH = 129, |
154 MSDH_INVALID_FRAME_ID = 130, | 154 MSDH_INVALID_FRAME_ID = 130, |
155 SDH_INVALID_PORT_RANGE = 131, | 155 SDH_INVALID_PORT_RANGE = 131, |
156 SCO_INVALID_ARGUMENT = 132, | 156 SCO_INVALID_ARGUMENT = 132, |
157 RFH_INCONSISTENT_DEVTOOLS_MESSAGE = 133, | 157 RFH_INCONSISTENT_DEVTOOLS_MESSAGE = 133, |
158 DSH_DUPLICATE_CONNECTION_ID = 134, | 158 DSH_DUPLICATE_CONNECTION_ID = 134, |
159 DSH_NOT_CREATED_SESSION_ID = 135, | 159 DSH_NOT_CREATED_SESSION_ID = 135, |
160 DSH_NOT_ALLOCATED_SESSION_ID = 136, | 160 DSH_NOT_ALLOCATED_SESSION_ID = 136, |
161 DSH_DELETED_SESSION_ID = 137, | 161 DSH_DELETED_SESSION_ID = 137, |
162 DSH_WRONG_STORAGE_PARTITION = 138, | 162 DSH_WRONG_STORAGE_PARTITION = 138, |
| 163 BDH_DISALLOWED_ORIGIN = 139, |
163 | 164 |
164 // Please add new elements here. The naming convention is abbreviated class | 165 // Please add new elements here. The naming convention is abbreviated class |
165 // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the | 166 // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the |
166 // reason. After making changes, you MUST update histograms.xml by running: | 167 // reason. After making changes, you MUST update histograms.xml by running: |
167 // "python tools/metrics/histograms/update_bad_message_reasons.py" | 168 // "python tools/metrics/histograms/update_bad_message_reasons.py" |
168 BAD_MESSAGE_MAX | 169 BAD_MESSAGE_MAX |
169 }; | 170 }; |
170 | 171 |
171 // Called when the browser receives a bad IPC message from a renderer process on | 172 // Called when the browser receives a bad IPC message from a renderer process on |
172 // the UI thread. Logs the event, records a histogram metric for the |reason|, | 173 // the UI thread. Logs the event, records a histogram metric for the |reason|, |
173 // and terminates the process for |host|. | 174 // and terminates the process for |host|. |
174 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason); | 175 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason); |
175 | 176 |
176 // Equivalent to the above, but callable from any thread. | 177 // Equivalent to the above, but callable from any thread. |
177 void ReceivedBadMessage(int render_process_id, BadMessageReason reason); | 178 void ReceivedBadMessage(int render_process_id, BadMessageReason reason); |
178 | 179 |
179 // Called when a browser message filter receives a bad IPC message from a | 180 // Called when a browser message filter receives a bad IPC message from a |
180 // renderer or other child process. Logs the event, records a histogram metric | 181 // renderer or other child process. Logs the event, records a histogram metric |
181 // for the |reason|, and terminates the process for |filter|. | 182 // for the |reason|, and terminates the process for |filter|. |
182 void ReceivedBadMessage(BrowserMessageFilter* filter, BadMessageReason reason); | 183 void ReceivedBadMessage(BrowserMessageFilter* filter, BadMessageReason reason); |
183 | 184 |
184 } // namespace bad_message | 185 } // namespace bad_message |
185 } // namespace content | 186 } // namespace content |
186 | 187 |
187 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_ | 188 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_ |
OLD | NEW |