diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 21:28:50 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-02 21:28:50 +0000 |
commit | 8137f3170df7543e5213c051443f3157d168d859 (patch) | |
tree | 30bfc178eff4729854efba9f8e3093f30946f9c6 /chrome/browser/crash_handler_host_linux.h | |
parent | d03c658c4baabe124e5eb3e540f13da296d64d8a (diff) | |
download | chromium_src-8137f3170df7543e5213c051443f3157d168d859.zip chromium_src-8137f3170df7543e5213c051443f3157d168d859.tar.gz chromium_src-8137f3170df7543e5213c051443f3157d168d859.tar.bz2 |
Linux: Handle renderer and plugin crashes on a separate thread.
Also set retries / timeouts for wget to attempt to limit the duration of each crash handler. Move some code out of headers while we're at it.
BUG=54071
TEST=change /usr/bin/wget to sleep forever, visit about:crash in a Breakpad-enabled build, make sure other renderers continue to work.
Review URL: http://codereview.chromium.org/3308007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/crash_handler_host_linux.h')
-rw-r--r-- | chrome/browser/crash_handler_host_linux.h | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/chrome/browser/crash_handler_host_linux.h b/chrome/browser/crash_handler_host_linux.h index 625ac8e..7aa8dbe 100644 --- a/chrome/browser/crash_handler_host_linux.h +++ b/chrome/browser/crash_handler_host_linux.h @@ -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,8 +8,13 @@ #include <string> -#include "base/singleton.h" #include "base/message_loop.h" +#include "base/scoped_ptr.h" +#include "base/singleton.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 @@ -51,6 +56,7 @@ class CrashHandlerHostLinux : public MessageLoopForIO::Watcher, int process_socket_; int browser_socket_; MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_; + scoped_ptr<base::Thread> uploader_thread_; DISALLOW_COPY_AND_ASSIGN(CrashHandlerHostLinux); }; @@ -58,14 +64,10 @@ class CrashHandlerHostLinux : public MessageLoopForIO::Watcher, class PluginCrashHandlerHostLinux : public CrashHandlerHostLinux { private: friend struct DefaultSingletonTraits<PluginCrashHandlerHostLinux>; - PluginCrashHandlerHostLinux() { - SetProcessType(); - } - virtual ~PluginCrashHandlerHostLinux() {} + PluginCrashHandlerHostLinux(); + virtual ~PluginCrashHandlerHostLinux(); - virtual void SetProcessType() { - process_type_ = "plugin"; - } + virtual void SetProcessType(); DISALLOW_COPY_AND_ASSIGN(PluginCrashHandlerHostLinux); }; @@ -73,14 +75,10 @@ class PluginCrashHandlerHostLinux : public CrashHandlerHostLinux { class RendererCrashHandlerHostLinux : public CrashHandlerHostLinux { private: friend struct DefaultSingletonTraits<RendererCrashHandlerHostLinux>; - RendererCrashHandlerHostLinux() { - SetProcessType(); - } - virtual ~RendererCrashHandlerHostLinux() {} + RendererCrashHandlerHostLinux(); + virtual ~RendererCrashHandlerHostLinux(); - virtual void SetProcessType() { - process_type_ = "renderer"; - } + virtual void SetProcessType(); DISALLOW_COPY_AND_ASSIGN(RendererCrashHandlerHostLinux); }; |