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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ | | 70 int flags = base::File::FLAG_OPEN | base::File::FLAG_READ | |
71 base::File::FLAG_WRITE; | 71 base::File::FLAG_WRITE; |
72 base::File minidump_file(minidump_path, flags); | 72 base::File minidump_file(minidump_path, flags); |
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(!base::ContainsKey(child_process_id_to_minidump_path_, |
| 81 child_process_id)); |
81 child_process_id_to_minidump_path_[child_process_id] = minidump_path; | 82 child_process_id_to_minidump_path_[child_process_id] = minidump_path; |
82 } | 83 } |
83 return minidump_file; | 84 return minidump_file; |
84 } | 85 } |
85 | 86 |
86 // static | 87 // static |
87 void CrashDumpManager::ProcessMinidump( | 88 void CrashDumpManager::ProcessMinidump( |
88 const base::FilePath& minidump_path, | 89 const base::FilePath& minidump_path, |
89 base::ProcessHandle pid, | 90 base::ProcessHandle pid, |
90 content::ProcessType process_type, | 91 content::ProcessType process_type, |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 BrowserThread::FILE, FROM_HERE, | 247 BrowserThread::FILE, FROM_HERE, |
247 base::Bind(&CrashDumpManager::ProcessMinidump, | 248 base::Bind(&CrashDumpManager::ProcessMinidump, |
248 minidump_path, | 249 minidump_path, |
249 pid, | 250 pid, |
250 process_type, | 251 process_type, |
251 termination_status, | 252 termination_status, |
252 app_state)); | 253 app_state)); |
253 } | 254 } |
254 | 255 |
255 } // namespace breakpad | 256 } // namespace breakpad |
OLD | NEW |