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

Unified Diff: content/browser/bad_message.cc

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: actions.xml claims to be pretty printed 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/bad_message.cc
diff --git a/content/browser/bad_message.cc b/content/browser/bad_message.cc
new file mode 100644
index 0000000000000000000000000000000000000000..cc41b00bd82fce643d63931134ee855ccb0a1e42
--- /dev/null
+++ b/content/browser/bad_message.cc
@@ -0,0 +1,22 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "content/browser/bad_message.h"
+
+#include "base/logging.h"
+#include "base/metrics/histogram_macros.h"
+#include "content/public/browser/render_process_host.h"
+
+namespace content {
+namespace bad_message {
+
+void ReceivedBadMessage(RenderProcessHost* host, BadMessageReason reason) {
+ LOG(ERROR) << "Terminating renderer for bad IPC message, reason " << reason;
+ UMA_HISTOGRAM_ENUMERATION("Stability.BadMessageTerminated.Content", reason,
+ BAD_MESSAGE_MAX);
+ host->ShutdownForBadMessage();
+}
+
+} // namespace bad_message
+} // namespace content
« no previous file with comments | « content/browser/bad_message.h ('k') | content/browser/browser_child_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698