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

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

Issue 1009583004: Add UMA histograms and logging for bad IPC message handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mac Created 5 years, 9 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef EXTENSIONS_BROWSER_BAD_MESSAGE_H_
6 #define EXTENSIONS_BROWSER_BAD_MESSAGE_H_
7
8 namespace content {
9 class RenderProcessHost;
10 }
11
12 namespace extensions {
13 namespace bad_message {
14
15 // The browser process often chooses to terminate a renderer if it receives
16 // a bad IPC message. The reasons are tracked for metrics.
17 //
18 // See also content/browser/bad_message.h.
19 //
20 // NOTE: Do not remove or reorder elements in this end. Add new entries at
21 // the end. We rely on these values in histograms.
Charlie Reis 2015/03/18 21:37:51 Same comments as before.
James Cook 2015/03/18 22:19:44 Done.
22 enum BadMessageReason {
23 EOG_BAD_ORIGIN = 0,
24 EVG_BAD_ORIGIN,
25 BH_BLOB_NOT_OWNED,
26 EH_BAD_EVENT_ID,
27 // Please add new elements here.
28
29 BAD_MESSAGE_MAX
30 };
31
32 // Called when the browser receives a bad IPC message from an extension process.
33 // Log the event, records a histogram metric for the |reason|, and terminates
34 // the process for |host|.
35 void ReceivedBadMessage(content::RenderProcessHost* host,
36 BadMessageReason reason);
37
38 } // bad_message
39 } // namespace extensions
40
41 #endif // EXTENSIONS_BROWSER_BAD_MESSAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698