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

Unified Diff: extensions/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 | « extensions/browser/bad_message.h ('k') | extensions/browser/blob_holder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/bad_message.cc
diff --git a/extensions/browser/bad_message.cc b/extensions/browser/bad_message.cc
new file mode 100644
index 0000000000000000000000000000000000000000..85ce5d61899d5beb5df54261c4ee330413cd7647
--- /dev/null
+++ b/extensions/browser/bad_message.cc
@@ -0,0 +1,24 @@
+// 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 "extensions/browser/bad_message.h"
+
+#include "base/logging.h"
+#include "base/metrics/histogram_macros.h"
+#include "content/public/browser/render_process_host.h"
+
+namespace extensions {
+namespace bad_message {
+
+void ReceivedBadMessage(content::RenderProcessHost* host,
+ BadMessageReason reason) {
+ LOG(ERROR) << "Terminating extension renderer for bad IPC message, reason "
+ << reason;
+ UMA_HISTOGRAM_ENUMERATION("Stability.BadMessageTerminated.Extensions", reason,
+ BAD_MESSAGE_MAX);
+ host->ShutdownForBadMessage();
+}
+
+} // namespace bad_message
+} // namespace extensions
« no previous file with comments | « extensions/browser/bad_message.h ('k') | extensions/browser/blob_holder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698