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

Unified Diff: content/browser/renderer_host/render_message_filter.cc

Issue 10908078: Code to collect issue 97285 debugging info for crash reports. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase against r155094. Created 8 years, 3 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/renderer_host/render_message_filter.h ('k') | content/common/content_debug_logging.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_message_filter.cc
diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc
index aa971df62b281432d35dba2dfc1ed9d3c4bce12a..628a84eed0a5f928c0bf666d2960d995c365dce8 100644
--- a/content/browser/renderer_host/render_message_filter.cc
+++ b/content/browser/renderer_host/render_message_filter.cc
@@ -39,6 +39,7 @@
#include "content/public/browser/plugin_service_filter.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/user_metrics.h"
+#include "content/public/common/content_debug_logging.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/context_menu_params.h"
#include "content/public/common/url_constants.h"
@@ -237,6 +238,10 @@ class RenderMessageFilter::OpenChannelToNpapiPluginCallback
}
virtual void OnChannelOpened(const IPC::ChannelHandle& handle) OVERRIDE {
+#if defined(OS_MACOSX)
+ content::debug::RecordMsg(97285, base::StringPrintf(
+ "OnChannelOpened({%s, %d})", handle.name.c_str(), handle.socket.fd));
+#endif
WriteReplyAndDeleteThis(handle);
}
@@ -392,6 +397,10 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message,
IPC_MESSAGE_HANDLER(ViewHostMsg_GetMonitorColorProfile,
OnGetMonitorColorProfile)
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvent, OnMediaLogEvent)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_ContentDebugRecordMsg,
+ OnContentDebugRecordMsg)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_ContentDebugGetMessages,
+ OnContentDebugGetMessages)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -979,4 +988,15 @@ void RenderMessageFilter::OnUpdateIsDelayed(const IPC::Message& msg) {
render_widget_helper_->DidReceiveBackingStoreMsg(msg);
}
+// TODO(shess): Could this be annotated WRT the sending renderer?
+void RenderMessageFilter::OnContentDebugRecordMsg(int bug_id,
+ const std::string& msg) {
+ content::debug::RecordMsg(bug_id, msg);
+}
+
+void RenderMessageFilter::OnContentDebugGetMessages(
+ int bug_id, bool* handled, std::vector<std::string>* msgs) {
+ *handled = content::debug::GetMessages(bug_id, msgs);
+}
+
} // namespace content
« no previous file with comments | « content/browser/renderer_host/render_message_filter.h ('k') | content/common/content_debug_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698