| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef COMPONENTS_BREAKPAD_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ | 5 #ifndef COMPONENTS_BREAKPAD_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ |
| 6 #define COMPONENTS_BREAKPAD_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ | 6 #define COMPONENTS_BREAKPAD_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ |
| 7 | 7 |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 | 54 |
| 55 // MessageLoop::DestructionObserver impl: | 55 // MessageLoop::DestructionObserver impl: |
| 56 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; | 56 virtual void WillDestroyCurrentMessageLoop() OVERRIDE; |
| 57 | 57 |
| 58 // Whether we are shutting down or not. | 58 // Whether we are shutting down or not. |
| 59 bool IsShuttingDown() const; | 59 bool IsShuttingDown() const; |
| 60 | 60 |
| 61 private: | 61 private: |
| 62 void Init(); | 62 void Init(); |
| 63 | 63 |
| 64 // Do work on the FILE thread for OnFileCanReadWithoutBlocking(). | 64 // Do work in a sequenced worker pool for OnFileCanReadWithoutBlocking(). |
| 65 void WriteDumpFile(BreakpadInfo* info, | 65 void WriteDumpFile(scoped_ptr<BreakpadInfo> info, |
| 66 scoped_ptr<char[]> crash_context, |
| 66 pid_t crashing_pid, | 67 pid_t crashing_pid, |
| 67 char* crash_context, | |
| 68 int signal_fd); | 68 int signal_fd); |
| 69 | 69 |
| 70 // Continue OnFileCanReadWithoutBlocking()'s work on the IO thread. | 70 // Continue OnFileCanReadWithoutBlocking()'s work on the IO thread. |
| 71 void QueueCrashDumpTask(BreakpadInfo* info, int signal_fd); | 71 void QueueCrashDumpTask(scoped_ptr<BreakpadInfo> info, int signal_fd); |
| 72 | 72 |
| 73 std::string process_type_; | 73 std::string process_type_; |
| 74 base::FilePath dumps_path_; | 74 base::FilePath dumps_path_; |
| 75 bool upload_; | 75 bool upload_; |
| 76 | 76 |
| 77 int process_socket_; | 77 int process_socket_; |
| 78 int browser_socket_; | 78 int browser_socket_; |
| 79 | 79 |
| 80 base::MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_; | 80 base::MessageLoopForIO::FileDescriptorWatcher file_descriptor_watcher_; |
| 81 scoped_ptr<base::Thread> uploader_thread_; | 81 scoped_ptr<base::Thread> uploader_thread_; |
| 82 bool shutting_down_; | 82 bool shutting_down_; |
| 83 | 83 |
| 84 // Unique sequence token so that writing crash dump won't be blocked | 84 // Unique sequence token so that writing crash dump won't be blocked |
| 85 // by other tasks. | 85 // by other tasks. |
| 86 base::SequencedWorkerPool::SequenceToken worker_pool_token_; | 86 base::SequencedWorkerPool::SequenceToken worker_pool_token_; |
| 87 | 87 |
| 88 #if defined(ADDRESS_SANITIZER) | |
| 89 char* asan_report_str_; | |
| 90 #endif | |
| 91 | |
| 92 DISALLOW_COPY_AND_ASSIGN(CrashHandlerHostLinux); | 88 DISALLOW_COPY_AND_ASSIGN(CrashHandlerHostLinux); |
| 93 }; | 89 }; |
| 94 | 90 |
| 95 } // namespace breakpad | 91 } // namespace breakpad |
| 96 | 92 |
| 97 #endif // COMPONENTS_BREAKPAD_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ | 93 #endif // COMPONENTS_BREAKPAD_BROWSER_CRASH_HANDLER_HOST_LINUX_H_ |
| OLD | NEW |