| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/android/crash_dump_manager.h" | 5 #include "components/breakpad/browser/crash_dump_manager_android.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/posix/global_descriptors.h" | 11 #include "base/posix/global_descriptors.h" |
| 12 #include "base/process/process.h" | 12 #include "base/process/process.h" |
| 13 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
| 14 #include "base/stl_util.h" | 14 #include "base/stl_util.h" |
| 15 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
| 16 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
| 17 #include "content/public/browser/child_process_data.h" | 17 #include "content/public/browser/child_process_data.h" |
| 18 #include "content/public/browser/file_descriptor_info.h" | 18 #include "content/public/browser/file_descriptor_info.h" |
| 19 #include "content/public/browser/notification_service.h" | 19 #include "content/public/browser/notification_service.h" |
| 20 #include "content/public/browser/notification_types.h" | 20 #include "content/public/browser/notification_types.h" |
| 21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
| 22 | 22 |
| 23 using content::BrowserThread; | 23 using content::BrowserThread; |
| 24 | 24 |
| 25 namespace breakpad { |
| 26 |
| 25 // static | 27 // static |
| 26 CrashDumpManager* CrashDumpManager::instance_ = NULL; | 28 CrashDumpManager* CrashDumpManager::instance_ = NULL; |
| 27 | 29 |
| 28 // static | 30 // static |
| 29 CrashDumpManager* CrashDumpManager::GetInstance() { | 31 CrashDumpManager* CrashDumpManager::GetInstance() { |
| 30 return instance_; | 32 return instance_; |
| 31 } | 33 } |
| 32 | 34 |
| 33 CrashDumpManager::CrashDumpManager(const base::FilePath& crash_dump_dir) | 35 CrashDumpManager::CrashDumpManager(const base::FilePath& crash_dump_dir) |
| 34 : crash_dump_dir_(crash_dump_dir) { | 36 : crash_dump_dir_(crash_dump_dir) { |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 // NOTIFICATION_RENDERER_PROCESS_CLOSED. | 162 // NOTIFICATION_RENDERER_PROCESS_CLOSED. |
| 161 return; | 163 return; |
| 162 } | 164 } |
| 163 minidump_path = iter->second; | 165 minidump_path = iter->second; |
| 164 child_process_id_to_minidump_path_.erase(iter); | 166 child_process_id_to_minidump_path_.erase(iter); |
| 165 } | 167 } |
| 166 BrowserThread::PostTask( | 168 BrowserThread::PostTask( |
| 167 BrowserThread::FILE, FROM_HERE, | 169 BrowserThread::FILE, FROM_HERE, |
| 168 base::Bind(&CrashDumpManager::ProcessMinidump, minidump_path, pid)); | 170 base::Bind(&CrashDumpManager::ProcessMinidump, minidump_path, pid)); |
| 169 } | 171 } |
| 172 |
| 173 } // namespace breakpad |
| OLD | NEW |