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

Unified Diff: content/renderer/render_thread_impl.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/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 9e9b0b8c1ce737db9303d20d7d184e621a7dbd18..220aa2bb1d83549c819b2c77f3e8e83ba61802a4 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -42,6 +42,7 @@
#include "content/common/web_database_observer_impl.h"
#include "content/public/common/compositor_util.h"
#include "content/public/common/content_constants.h"
+#include "content/public/common/content_debug_logging.h"
#include "content/public/common/content_paths.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/renderer_preferences.h"
@@ -192,6 +193,15 @@ void AddHistogramSample(void* hist, int sample) {
histogram->Add(sample);
}
+void RecordMsg(int bug_id, const std::string& msg) {
+ RenderThreadImpl::current()->Send(new ViewHostMsg_RecordMsg(bug_id, msg));
+}
+
+bool GetMessages(int bug_id, std::vector<std::string>* msgs) {
+ RenderThreadImpl::current()->Send(new ViewHostMsg_GetMessages(bug_id, msgs));
+ return !msgs->empty();
+}
+
} // namespace
class RenderThreadImpl::GpuVDAContextLostCallback
@@ -273,6 +283,8 @@ void RenderThreadImpl::Init() {
lazy_tls.Pointer()->Set(this);
+ content::debug::RegisterMessageHandlers(RecordMsg, GetMessages);
+
#if defined(OS_WIN)
// If you are running plugins in this thread you need COM active but in
// the normal case you don't.

Powered by Google App Engine
This is Rietveld 408576698