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

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: 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/public/common/content_debug_logging.h ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 6ba22d8760e6293f07e5ed6e212ea4cca3e98c39..8f9bb72bccdbf9578fc197063fa1cf088a513ab0 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,18 @@ void AddHistogramSample(void* hist, int sample) {
histogram->Add(sample);
}
+void RecordMsg(int bug_id, const std::string& msg) {
+ RenderThreadImpl::current()->Send(
+ new ViewHostMsg_ContentDebugRecordMsg(bug_id, msg));
+}
+
+bool GetMessages(int bug_id, std::vector<std::string>* msgs) {
+ bool handled = false;
+ RenderThreadImpl::current()->Send(
+ new ViewHostMsg_ContentDebugGetMessages(bug_id, &handled, msgs));
+ return handled;
+}
+
} // namespace
class RenderThreadImpl::GpuVDAContextLostCallback
@@ -273,6 +286,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.
« no previous file with comments | « content/public/common/content_debug_logging.h ('k') | content/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698