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

Side by Side Diff: content/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 CONTENT_BROWSER_BAD_MESSAGE_H_
6 #define CONTENT_BROWSER_BAD_MESSAGE_H_
7
8 namespace content {
9 class RenderProcessHost;
10
11 namespace bad_message {
12
13 // The browser process often chooses to terminate a renderer if it receives
14 // a bad IPC message. The reasons are tracked for metrics.
15 //
16 // Content embedders should implement their own bad message statistics, but
Charlie Reis 2015/03/18 21:37:51 nit: no comma (or say ", but they")
James Cook 2015/03/18 22:19:44 Done.
17 // should use similar histogram names to make analysis easier.
18 //
19 // NOTE: Do not remove or reorder elements in this end. Add new entries at the
Charlie Reis 2015/03/18 21:37:51 nit: end -> list?
James Cook 2015/03/18 22:19:44 Done.
20 // end. We rely on these values in histograms.
21 enum BadMessageReason {
22 NC_IN_PAGE_NAVIGATION = 0,
Charlie Reis 2015/03/18 21:37:51 We should have a note on the naming convention for
James Cook 2015/03/18 22:19:44 Done.
23 RFH_CAN_COMMIT_URL_BLOCKED,
24 RFH_CAN_ACCESS_FILES_OF_PAGE_STATE,
25 RFH_SANDBOX_FLAGS,
26 RFH_NO_PROXY_TO_PARENT,
27 RPH_DESERIALIZATION_FAILED,
28 RVH_CAN_ACCESS_FILES_OF_PAGE_STATE,
Charlie Reis 2015/03/18 21:37:51 For future reference, what happens if we want to c
James Cook 2015/03/18 22:19:44 No, they can be renamed as long as the value doesn
29 RVH_FILE_CHOOSER_PATH,
30 RWH_SYNTHETIC_GESTURE,
31 RWH_FOCUS,
32 RWH_BLUR,
33 RWH_SHARED_BITMAP,
34 RWH_BAD_ACK_MESSAGE,
35 RWHVA_SHARED_MEMORY,
36 SERVICE_WORKER_BAD_URL,
37 WC_INVALID_FRAME_SOURCE,
38 RWHVM_UNEXPECTED_FRAME_TYPE,
39 // Please add new elements here.
40
41 BAD_MESSAGE_MAX
42 };
43
44 // Called when the browser receives a bad IPC message from a renderer process.
45 // Log the event, records a histogram metric for the |reason|, and terminates
Charlie Reis 2015/03/18 21:37:51 nit: Logs
James Cook 2015/03/18 22:19:44 Done.
46 // the process for |host|.
47 void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason);
48
49 } // namespace bad_message
50 } // namespace content
51
52 #endif // CONTENT_BROWSER_BAD_MESSAGE_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/bad_message.cc » ('j') | content/browser/browser_child_process_host_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698