| 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 #include "components/crash/content/browser/crash_dump_manager_android.h" | 5 #include "components/crash/content/browser/crash_dump_manager_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (!minidump_file.IsValid()) { | 73 if (!minidump_file.IsValid()) { |
| 74 LOG(ERROR) << "Failed to create temporary file, crash won't be reported."; | 74 LOG(ERROR) << "Failed to create temporary file, crash won't be reported."; |
| 75 return base::File(); | 75 return base::File(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 { | 78 { |
| 79 base::AutoLock auto_lock(child_process_id_to_minidump_path_lock_); | 79 base::AutoLock auto_lock(child_process_id_to_minidump_path_lock_); |
| 80 DCHECK(!ContainsKey(child_process_id_to_minidump_path_, child_process_id)); | 80 DCHECK(!ContainsKey(child_process_id_to_minidump_path_, child_process_id)); |
| 81 child_process_id_to_minidump_path_[child_process_id] = minidump_path; | 81 child_process_id_to_minidump_path_[child_process_id] = minidump_path; |
| 82 } | 82 } |
| 83 return minidump_file.Pass(); | 83 return minidump_file; |
| 84 } | 84 } |
| 85 | 85 |
| 86 // static | 86 // static |
| 87 void CrashDumpManager::ProcessMinidump( | 87 void CrashDumpManager::ProcessMinidump( |
| 88 const base::FilePath& minidump_path, | 88 const base::FilePath& minidump_path, |
| 89 base::ProcessHandle pid, | 89 base::ProcessHandle pid, |
| 90 content::ProcessType process_type, | 90 content::ProcessType process_type, |
| 91 base::TerminationStatus termination_status, | 91 base::TerminationStatus termination_status, |
| 92 base::android::ApplicationState app_state) { | 92 base::android::ApplicationState app_state) { |
| 93 DCHECK_CURRENTLY_ON(BrowserThread::FILE); | 93 DCHECK_CURRENTLY_ON(BrowserThread::FILE); |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 BrowserThread::FILE, FROM_HERE, | 246 BrowserThread::FILE, FROM_HERE, |
| 247 base::Bind(&CrashDumpManager::ProcessMinidump, | 247 base::Bind(&CrashDumpManager::ProcessMinidump, |
| 248 minidump_path, | 248 minidump_path, |
| 249 pid, | 249 pid, |
| 250 process_type, | 250 process_type, |
| 251 termination_status, | 251 termination_status, |
| 252 app_state)); | 252 app_state)); |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace breakpad | 255 } // namespace breakpad |
| OLD | NEW |