OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h" | 5 #include "android_webview/common/crash_reporter/aw_microdump_crash_reporter.h" |
6 | 6 |
7 #include <random> | 7 #include <random> |
8 | 8 |
9 #include "android_webview/common/aw_descriptors.h" | 9 #include "android_webview/common/aw_descriptors.h" |
10 #include "android_webview/common/aw_paths.h" | 10 #include "android_webview/common/aw_paths.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 sanitization_info.skip_dump_if_principal_mapping_not_referenced = true; | 203 sanitization_info.skip_dump_if_principal_mapping_not_referenced = true; |
204 sanitization_info.address_within_principal_mapping = | 204 sanitization_info.address_within_principal_mapping = |
205 reinterpret_cast<uintptr_t>(&EnableCrashReporter); | 205 reinterpret_cast<uintptr_t>(&EnableCrashReporter); |
206 #endif // defined(COMPONENT_BUILD) | 206 #endif // defined(COMPONENT_BUILD) |
207 | 207 |
208 bool is_browser_process = | 208 bool is_browser_process = |
209 process_type.empty() || | 209 process_type.empty() || |
210 process_type == breakpad::kWebViewSingleProcessType || | 210 process_type == breakpad::kWebViewSingleProcessType || |
211 process_type == breakpad::kBrowserProcessType; | 211 process_type == breakpad::kBrowserProcessType; |
212 if (is_browser_process) { | 212 if (is_browser_process) { |
213 breakpad::InitCrashReporter("", sanitization_info); | 213 breakpad::InitCrashReporter(process_type, sanitization_info); |
214 } else { | 214 } else { |
215 breakpad::InitNonBrowserCrashReporterForAndroid(process_type, | 215 breakpad::InitNonBrowserCrashReporterForAndroid(process_type, |
216 sanitization_info); | 216 sanitization_info); |
217 } | 217 } |
218 g_enabled = true; | 218 g_enabled = true; |
219 } | 219 } |
220 | 220 |
221 bool GetCrashDumpLocation(base::FilePath* crash_dir) { | 221 bool GetCrashDumpLocation(base::FilePath* crash_dir) { |
222 return g_crash_reporter_client.Get().GetCrashDumpLocation(crash_dir); | 222 return g_crash_reporter_client.Get().GetCrashDumpLocation(crash_dir); |
223 } | 223 } |
(...skipping 11 matching lines...) Expand all Loading... |
235 bool IsCrashReporterEnabled() { | 235 bool IsCrashReporterEnabled() { |
236 return breakpad::IsCrashReporterEnabled(); | 236 return breakpad::IsCrashReporterEnabled(); |
237 } | 237 } |
238 | 238 |
239 void SuppressDumpGeneration() { | 239 void SuppressDumpGeneration() { |
240 breakpad::SuppressDumpGeneration(); | 240 breakpad::SuppressDumpGeneration(); |
241 } | 241 } |
242 | 242 |
243 } // namespace crash_reporter | 243 } // namespace crash_reporter |
244 } // namespace android_webview | 244 } // namespace android_webview |
OLD | NEW |