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

Side by Side Diff: content/browser/bad_message.h

Issue 2344983003: Merge the code paths for closing different kinds of notifications. (Closed)
Patch Set: rebase Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/notifications/notification_message_filter.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 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 BDH_DISALLOWED_ORIGIN = 139,
164 ARH_CREATED_STREAM_WITHOUT_AUTHORIZATION = 140, 164 ARH_CREATED_STREAM_WITHOUT_AUTHORIZATION = 140,
165 MDDH_INVALID_DEVICE_TYPE_REQUEST = 141, 165 MDDH_INVALID_DEVICE_TYPE_REQUEST = 141,
166 MDDH_UNAUTHORIZED_ORIGIN = 142, 166 MDDH_UNAUTHORIZED_ORIGIN = 142,
167 NMF_INVALID_ID_CLOSE = 143,
167 168
168 // Please add new elements here. The naming convention is abbreviated class 169 // Please add new elements here. The naming convention is abbreviated class
169 // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the 170 // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the
170 // reason. After making changes, you MUST update histograms.xml by running: 171 // reason. After making changes, you MUST update histograms.xml by running:
171 // "python tools/metrics/histograms/update_bad_message_reasons.py" 172 // "python tools/metrics/histograms/update_bad_message_reasons.py"
172 BAD_MESSAGE_MAX 173 BAD_MESSAGE_MAX
173 }; 174 };
174 175
175 // Called when the browser receives a bad IPC message from a renderer process on 176 // Called when the browser receives a bad IPC message from a renderer process on
176 // the UI thread. Logs the event, records a histogram metric for the |reason|, 177 // the UI thread. Logs the event, records a histogram metric for the |reason|,
177 // and terminates the process for |host|. 178 // and terminates the process for |host|.
178 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason); 179 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason);
179 180
180 // Equivalent to the above, but callable from any thread. 181 // Equivalent to the above, but callable from any thread.
181 void ReceivedBadMessage(int render_process_id, BadMessageReason reason); 182 void ReceivedBadMessage(int render_process_id, BadMessageReason reason);
182 183
183 // Called when a browser message filter receives a bad IPC message from a 184 // Called when a browser message filter receives a bad IPC message from a
184 // renderer or other child process. Logs the event, records a histogram metric 185 // renderer or other child process. Logs the event, records a histogram metric
185 // for the |reason|, and terminates the process for |filter|. 186 // for the |reason|, and terminates the process for |filter|.
186 void ReceivedBadMessage(BrowserMessageFilter* filter, BadMessageReason reason); 187 void ReceivedBadMessage(BrowserMessageFilter* filter, BadMessageReason reason);
187 188
188 } // namespace bad_message 189 } // namespace bad_message
189 } // namespace content 190 } // namespace content
190 191
191 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_ 192 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/notifications/notification_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698