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

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

Issue 2424163004: Factor out authorization from AudioRendererHost. (Closed)
Patch Set: Dale's comments. Created 4 years, 1 month 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
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 FAMF_APPEND_SHARED_MEMORY_TO_BLOB = 72, 96 FAMF_APPEND_SHARED_MEMORY_TO_BLOB = 72,
97 FAMF_MALFORMED_STREAM_URL = 73, 97 FAMF_MALFORMED_STREAM_URL = 73,
98 FAMF_APPEND_ITEM_TO_STREAM = 74, 98 FAMF_APPEND_ITEM_TO_STREAM = 74,
99 FAMF_APPEND_SHARED_MEMORY_TO_STREAM = 75, 99 FAMF_APPEND_SHARED_MEMORY_TO_STREAM = 75,
100 IDBDH_CAN_READ_FILE = 76, 100 IDBDH_CAN_READ_FILE = 76,
101 IDBDH_GET_OR_TERMINATE = 77, 101 IDBDH_GET_OR_TERMINATE = 77,
102 RFMF_SET_COOKIE_BAD_ORIGIN = 78, 102 RFMF_SET_COOKIE_BAD_ORIGIN = 78,
103 RFMF_GET_COOKIES_BAD_ORIGIN = 79, 103 RFMF_GET_COOKIES_BAD_ORIGIN = 79,
104 SWDH_GET_REGISTRATIONS_NO_HOST = 80, 104 SWDH_GET_REGISTRATIONS_NO_HOST = 80,
105 SWDH_GET_REGISTRATIONS_INVALID_ORIGIN = 81, 105 SWDH_GET_REGISTRATIONS_INVALID_ORIGIN = 81,
106 ARH_UNAUTHORIZED_URL = 82, 106 AOAH_UNAUTHORIZED_URL = 82,
107 BDH_INVALID_SERVICE_ID = 83, 107 BDH_INVALID_SERVICE_ID = 83,
108 RFH_COMMIT_DESERIALIZATION_FAILED = 84, 108 RFH_COMMIT_DESERIALIZATION_FAILED = 84,
109 BDH_INVALID_CHARACTERISTIC_ID = 85, 109 BDH_INVALID_CHARACTERISTIC_ID = 85,
110 SWDH_UPDATE_NO_HOST = 86, 110 SWDH_UPDATE_NO_HOST = 86,
111 SWDH_UPDATE_BAD_REGISTRATION_ID = 87, 111 SWDH_UPDATE_BAD_REGISTRATION_ID = 87,
112 SWDH_UPDATE_CANNOT = 88, 112 SWDH_UPDATE_CANNOT = 88,
113 SWDH_UNREGISTER_BAD_REGISTRATION_ID = 89, 113 SWDH_UNREGISTER_BAD_REGISTRATION_ID = 89,
114 BDH_INVALID_WRITE_VALUE_LENGTH = 90, 114 BDH_INVALID_WRITE_VALUE_LENGTH = 90,
115 WC_MEMORY_CACHE_RESOURCE_BAD_SECURITY_INFO = 91, // obsolete; no longer used 115 WC_MEMORY_CACHE_RESOURCE_BAD_SECURITY_INFO = 91, // obsolete; no longer used
116 WC_RENDERER_DID_NAVIGATE_BAD_SECURITY_INFO = 92, // obsolete; no longer used 116 WC_RENDERER_DID_NAVIGATE_BAD_SECURITY_INFO = 92, // obsolete; no longer used
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 SWDH_ENABLE_NAVIGATION_PRELOAD_NO_HOST = 143, 167 SWDH_ENABLE_NAVIGATION_PRELOAD_NO_HOST = 143,
168 SWDH_ENABLE_NAVIGATION_PRELOAD_INVALID_ORIGIN = 144, 168 SWDH_ENABLE_NAVIGATION_PRELOAD_INVALID_ORIGIN = 144,
169 SWDH_ENABLE_NAVIGATION_PRELOAD_BAD_REGISTRATION_ID = 145, 169 SWDH_ENABLE_NAVIGATION_PRELOAD_BAD_REGISTRATION_ID = 145,
170 RDH_TRANSFERRING_REQUEST_NOT_FOUND = 146, // Disabled - crbug.com/659613. 170 RDH_TRANSFERRING_REQUEST_NOT_FOUND = 146, // Disabled - crbug.com/659613.
171 RDH_TRANSFERRING_NONNAVIGATIONAL_REQUEST = 147, 171 RDH_TRANSFERRING_NONNAVIGATIONAL_REQUEST = 147,
172 SWDH_GET_NAVIGATION_PRELOAD_STATE_NO_HOST = 148, 172 SWDH_GET_NAVIGATION_PRELOAD_STATE_NO_HOST = 148,
173 SWDH_GET_NAVIGATION_PRELOAD_STATE_INVALID_ORIGIN = 149, 173 SWDH_GET_NAVIGATION_PRELOAD_STATE_INVALID_ORIGIN = 149,
174 SWDH_GET_NAVIGATION_PRELOAD_STATE_BAD_REGISTRATION_ID = 150, 174 SWDH_GET_NAVIGATION_PRELOAD_STATE_BAD_REGISTRATION_ID = 150,
175 AOAH_NONSENSE_DEVICE_ID = 151,
175 176
176 // Please add new elements here. The naming convention is abbreviated class 177 // Please add new elements here. The naming convention is abbreviated class
177 // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the 178 // name (e.g. RenderFrameHost becomes RFH) plus a unique description of the
178 // reason. After making changes, you MUST update histograms.xml by running: 179 // reason. After making changes, you MUST update histograms.xml by running:
179 // "python tools/metrics/histograms/update_bad_message_reasons.py" 180 // "python tools/metrics/histograms/update_bad_message_reasons.py"
180 BAD_MESSAGE_MAX 181 BAD_MESSAGE_MAX
181 }; 182 };
182 183
183 // Called when the browser receives a bad IPC message from a renderer process on 184 // Called when the browser receives a bad IPC message from a renderer process on
184 // the UI thread. Logs the event, records a histogram metric for the |reason|, 185 // the UI thread. Logs the event, records a histogram metric for the |reason|,
185 // and terminates the process for |host|. 186 // and terminates the process for |host|.
186 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason); 187 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason);
187 188
188 // Equivalent to the above, but callable from any thread. 189 // Equivalent to the above, but callable from any thread.
189 void ReceivedBadMessage(int render_process_id, BadMessageReason reason); 190 void ReceivedBadMessage(int render_process_id, BadMessageReason reason);
190 191
191 // Called when a browser message filter receives a bad IPC message from a 192 // Called when a browser message filter receives a bad IPC message from a
192 // renderer or other child process. Logs the event, records a histogram metric 193 // renderer or other child process. Logs the event, records a histogram metric
193 // for the |reason|, and terminates the process for |filter|. 194 // for the |reason|, and terminates the process for |filter|.
194 void ReceivedBadMessage(BrowserMessageFilter* filter, BadMessageReason reason); 195 void ReceivedBadMessage(BrowserMessageFilter* filter, BadMessageReason reason);
195 196
196 } // namespace bad_message 197 } // namespace bad_message
197 } // namespace content 198 } // namespace content
198 199
199 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_ 200 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698