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

Unified Diff: content/browser/plugin_process_host.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/plugin_process_host.cc
diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc
index 23cac73d8e36c9333c7d9efa6f582dbae2f01755..2c1804a85672711347d81713866759a76da9c16c 100644
--- a/content/browser/plugin_process_host.cc
+++ b/content/browser/plugin_process_host.cc
@@ -32,6 +32,7 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/plugin_service.h"
+#include "content/public/common/content_debug_logging.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/process_type.h"
#include "ipc/ipc_switches.h"
@@ -333,6 +334,8 @@ bool PluginProcessHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(PluginProcessHostMsg_PluginSetCursorVisibility,
OnPluginSetCursorVisibility)
#endif
+ IPC_MESSAGE_HANDLER(PluginProcessHostMsg_RecordMsg, OnRecordMsg)
+ IPC_MESSAGE_HANDLER(PluginProcessHostMsg_GetMessages, OnGetMessages)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -454,3 +457,14 @@ void PluginProcessHost::OnChannelCreated(
client->OnChannelOpened(channel_handle);
sent_requests_.pop_front();
}
+
+// TODO(shess): Could this be annotated WRT the sending plugin?
+void PluginProcessHost::OnRecordMsg(int bug_id, const std::string& msg) {
+ content::debug::RecordMsg(bug_id, msg);
+}
+
+void PluginProcessHost::OnGetMessages(int bug_id,
+ std::vector<std::string>* msgs) {
+ if (!content::debug::GetMessages(bug_id, msgs))
Bernhard Bauer 2012/09/05 15:04:55 Doesn't GetMessages() return false if the out vect
Scott Hess - ex-Googler 2012/09/05 17:17:05 GetMessages() returns false if there is no handler
+ msgs->clear();
+}

Powered by Google App Engine
This is Rietveld 408576698