| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/crash_handler_host_linux.h" | 5 #include "chrome/browser/crash_handler_host_linux.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <sys/socket.h> | 9 #include <sys/socket.h> |
| 10 #include <sys/types.h> | 10 #include <sys/types.h> |
| 11 #include <unistd.h> | 11 #include <unistd.h> |
| 12 | 12 |
| 13 #include "base/eintr_wrapper.h" | 13 #include "base/eintr_wrapper.h" |
| 14 #include "base/file_path.h" | 14 #include "base/file_path.h" |
| 15 #include "base/format_macros.h" | 15 #include "base/format_macros.h" |
| 16 #include "base/linux_util.h" | 16 #include "base/linux_util.h" |
| 17 #include "base/logging.h" | 17 #include "base/logging.h" |
| 18 #include "base/message_loop.h" | 18 #include "base/message_loop.h" |
| 19 #include "base/path_service.h" | 19 #include "base/path_service.h" |
| 20 #include "base/rand_util.h" | 20 #include "base/rand_util.h" |
| 21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
| 22 #include "breakpad/linux/exception_handler.h" | 22 #include "breakpad/src/client/linux/handler/exception_handler.h" |
| 23 #include "breakpad/linux/linux_dumper.h" | 23 #include "breakpad/src/client/linux/minidump_writer/linux_dumper.h" |
| 24 #include "breakpad/linux/minidump_writer.h" | 24 #include "breakpad/src/client/linux/minidump_writer/minidump_writer.h" |
| 25 #include "chrome/app/breakpad_linux.h" | 25 #include "chrome/app/breakpad_linux.h" |
| 26 #include "chrome/browser/chrome_thread.h" | 26 #include "chrome/browser/chrome_thread.h" |
| 27 #include "chrome/common/chrome_paths.h" | 27 #include "chrome/common/chrome_paths.h" |
| 28 | 28 |
| 29 // Since classes derived from CrashHandlerHostLinux are singletons, it's only | 29 // Since classes derived from CrashHandlerHostLinux are singletons, it's only |
| 30 // destroyed at the end of the processes lifetime, which is greater in span than | 30 // destroyed at the end of the processes lifetime, which is greater in span than |
| 31 // the lifetime of the IO message loop. | 31 // the lifetime of the IO message loop. |
| 32 template<> struct RunnableMethodTraits<CrashHandlerHostLinux> { | 32 template<> struct RunnableMethodTraits<CrashHandlerHostLinux> { |
| 33 void RetainCallee(CrashHandlerHostLinux*) { } | 33 void RetainCallee(CrashHandlerHostLinux*) { } |
| 34 void ReleaseCallee(CrashHandlerHostLinux*) { } | 34 void ReleaseCallee(CrashHandlerHostLinux*) { } |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 info.guid_length = strlen(guid); | 233 info.guid_length = strlen(guid); |
| 234 info.distro = distro; | 234 info.distro = distro; |
| 235 info.distro_length = strlen(distro); | 235 info.distro_length = strlen(distro); |
| 236 info.upload = upload; | 236 info.upload = upload; |
| 237 HandleCrashDump(info); | 237 HandleCrashDump(info); |
| 238 } | 238 } |
| 239 | 239 |
| 240 void CrashHandlerHostLinux::WillDestroyCurrentMessageLoop() { | 240 void CrashHandlerHostLinux::WillDestroyCurrentMessageLoop() { |
| 241 file_descriptor_watcher_.StopWatchingFileDescriptor(); | 241 file_descriptor_watcher_.StopWatchingFileDescriptor(); |
| 242 } | 242 } |
| OLD | NEW |