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

Unified Diff: chrome/browser/crash_handler_host_linux.h

Issue 3333012: Linux: Handle renderer and plugin crashes on a separate thread. (try 2)... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/crash_handler_host_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/crash_handler_host_linux.h
===================================================================
--- chrome/browser/crash_handler_host_linux.h (revision 58409)
+++ chrome/browser/crash_handler_host_linux.h (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -8,9 +8,14 @@
#include <string>
+#include "base/message_loop.h"
+#include "base/scoped_ptr.h"
#include "base/singleton.h"
-#include "base/message_loop.h"
+namespace base {
+class Thread;
+}
+
// This is the base class for singleton objects which crash dump renderers and
// plugins on Linux. We perform the crash dump from the browser because it
// allows us to be outside the sandbox.
@@ -40,17 +45,22 @@
protected:
CrashHandlerHostLinux();
virtual ~CrashHandlerHostLinux();
+#if defined(USE_LINUX_BREAKPAD)
// This is here on purpose to make CrashHandlerHostLinux abstract.
virtual void SetProcessType() = 0;
std::string process_type_;
+#endif
private:
void Init();
int process_socket_;
int browser_socket_;
+#if defined(USE_LINUX_BREAKPAD)
MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_;
+ scoped_ptr<base::Thread> uploader_thread_;
+#endif
DISALLOW_COPY_AND_ASSIGN(CrashHandlerHostLinux);
};
@@ -58,14 +68,12 @@
class PluginCrashHandlerHostLinux : public CrashHandlerHostLinux {
private:
friend struct DefaultSingletonTraits<PluginCrashHandlerHostLinux>;
- PluginCrashHandlerHostLinux() {
- SetProcessType();
- }
- virtual ~PluginCrashHandlerHostLinux() {}
+ PluginCrashHandlerHostLinux();
+ virtual ~PluginCrashHandlerHostLinux();
- virtual void SetProcessType() {
- process_type_ = "plugin";
- }
+#if defined(USE_LINUX_BREAKPAD)
+ virtual void SetProcessType();
+#endif
DISALLOW_COPY_AND_ASSIGN(PluginCrashHandlerHostLinux);
};
@@ -73,14 +81,12 @@
class RendererCrashHandlerHostLinux : public CrashHandlerHostLinux {
private:
friend struct DefaultSingletonTraits<RendererCrashHandlerHostLinux>;
- RendererCrashHandlerHostLinux() {
- SetProcessType();
- }
- virtual ~RendererCrashHandlerHostLinux() {}
+ RendererCrashHandlerHostLinux();
+ virtual ~RendererCrashHandlerHostLinux();
- virtual void SetProcessType() {
- process_type_ = "renderer";
- }
+#if defined(USE_LINUX_BREAKPAD)
+ virtual void SetProcessType();
+#endif
DISALLOW_COPY_AND_ASSIGN(RendererCrashHandlerHostLinux);
};
« no previous file with comments | « chrome/app/breakpad_linux.cc ('k') | chrome/browser/crash_handler_host_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698