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); |
}; |