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

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: 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
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..c33622dfbf6464558e3dcb75baf1000540452a37 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,8 @@ bool RenderMessageFilter::OnMessageReceived(const IPC::Message& message,
IPC_MESSAGE_HANDLER(ViewHostMsg_GetMonitorColorProfile,
OnGetMonitorColorProfile)
IPC_MESSAGE_HANDLER(ViewHostMsg_MediaLogEvent, OnMediaLogEvent)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_RecordMsg, OnRecordMsg)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_GetMessages, OnGetMessages)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -979,4 +986,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::OnRecordMsg(int bug_id, const std::string& msg) {
+ content::debug::RecordMsg(bug_id, msg);
+}
+
+void RenderMessageFilter::OnGetMessages(int bug_id,
+ std::vector<std::string>* msgs) {
+ if (!content::debug::GetMessages(bug_id, msgs))
+ msgs->clear();
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698