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

Unified Diff: content/browser/renderer_host/render_view_host_impl.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
Index: content/browser/renderer_host/render_view_host_impl.cc
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index fb4a9e7ba3035c153d1c9076410ea80ac68855a0..19d5672a83fa50f5cc366ef0f66ad203d95dfa56 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -25,6 +25,7 @@
#include "base/trace_event/trace_event.h"
#include "base/values.h"
#include "cc/base/switches.h"
+#include "content/browser/bad_message.h"
#include "content/browser/child_process_security_policy_impl.h"
#include "content/browser/dom_storage/session_storage_namespace_impl.h"
#include "content/browser/frame_host/frame_tree.h"
@@ -1011,7 +1012,8 @@ void RenderViewHostImpl::OnUpdateState(int32 page_id, const PageState& state) {
// Without this check, the renderer can trick the browser into using
// filenames it can't access in a future session restore.
if (!CanAccessFilesOfPageState(state)) {
- GetProcess()->ReceivedBadMessage();
+ bad_message::ReceivedBadMessage(
+ GetProcess(), bad_message::RVH_CAN_ACCESS_FILES_OF_PAGE_STATE);
return;
}
@@ -1377,7 +1379,8 @@ void RenderViewHostImpl::OnRunFileChooser(const FileChooserParams& params) {
// renderer to coerce the browser to perform I/O on a renderer controlled
// path.
if (params.default_file_name != params.default_file_name.BaseName()) {
- GetProcess()->ReceivedBadMessage();
+ bad_message::ReceivedBadMessage(GetProcess(),
+ bad_message::RVH_FILE_CHOOSER_PATH);
return;
}
« no previous file with comments | « content/browser/renderer_host/render_process_host_impl.cc ('k') | content/browser/renderer_host/render_widget_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698