| 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 // For linux_syscall_support.h. This makes it safe to call embedded system | 5 // For linux_syscall_support.h. This makes it safe to call embedded system |
| 6 // calls when in seccomp mode. | 6 // calls when in seccomp mode. |
| 7 | 7 |
| 8 #include "components/crash/content/app/breakpad_linux.h" | 8 #include "components/crash/content/app/breakpad_linux.h" |
| 9 | 9 |
| 10 #include <fcntl.h> | 10 #include <fcntl.h> |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 base::android::BuildInfo* android_build_info = | 596 base::android::BuildInfo* android_build_info = |
| 597 base::android::BuildInfo::GetInstance(); | 597 base::android::BuildInfo::GetInstance(); |
| 598 | 598 |
| 599 AndroidLogWriteHorizontalRule(); | 599 AndroidLogWriteHorizontalRule(); |
| 600 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, | 600 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, |
| 601 "Chrome build fingerprint:"); | 601 "Chrome build fingerprint:"); |
| 602 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, | 602 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, |
| 603 android_build_info->package_version_name()); | 603 android_build_info->package_version_name()); |
| 604 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, | 604 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, |
| 605 android_build_info->package_version_code()); | 605 android_build_info->package_version_code()); |
| 606 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, | |
| 607 "Google Play services app version:"); | |
| 608 __android_log_write(ANDROID_LOG_WARN, kGoogleBreakpad, | |
| 609 android_build_info->gms_version_code()); | |
| 610 AndroidLogWriteHorizontalRule(); | 606 AndroidLogWriteHorizontalRule(); |
| 611 | 607 |
| 612 if (!is_browser_process && | 608 if (!is_browser_process && |
| 613 android_build_info->sdk_int() >= 18 && | 609 android_build_info->sdk_int() >= 18 && |
| 614 my_strcmp(android_build_info->build_type(), "eng") != 0 && | 610 my_strcmp(android_build_info->build_type(), "eng") != 0 && |
| 615 my_strcmp(android_build_info->build_type(), "userdebug") != 0) { | 611 my_strcmp(android_build_info->build_type(), "userdebug") != 0) { |
| 616 // On JB MR2 and later, the system crash handler displays a dialog. For | 612 // On JB MR2 and later, the system crash handler displays a dialog. For |
| 617 // renderer crashes, this is a bad user experience and so this is disabled | 613 // renderer crashes, this is a bad user experience and so this is disabled |
| 618 // for user builds of Android. | 614 // for user builds of Android. |
| 619 // TODO(cjhopman): There should be some way to recover the crash stack from | 615 // TODO(cjhopman): There should be some way to recover the crash stack from |
| (...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1591 static const char pid_key_name[] = "pid"; | 1587 static const char pid_key_name[] = "pid"; |
| 1592 writer.AddPairData(pid_key_name, sizeof(pid_key_name) - 1, | 1588 writer.AddPairData(pid_key_name, sizeof(pid_key_name) - 1, |
| 1593 pid_value_buf, pid_value_len); | 1589 pid_value_buf, pid_value_len); |
| 1594 writer.AddBoundary(); | 1590 writer.AddBoundary(); |
| 1595 } | 1591 } |
| 1596 #if defined(OS_ANDROID) | 1592 #if defined(OS_ANDROID) |
| 1597 // Addtional MIME blocks are added for logging on Android devices. | 1593 // Addtional MIME blocks are added for logging on Android devices. |
| 1598 static const char android_build_id[] = "android_build_id"; | 1594 static const char android_build_id[] = "android_build_id"; |
| 1599 static const char android_build_fp[] = "android_build_fp"; | 1595 static const char android_build_fp[] = "android_build_fp"; |
| 1600 static const char device[] = "device"; | 1596 static const char device[] = "device"; |
| 1597 static const char gms_core_version[] = "gms_core_version"; |
| 1601 static const char model[] = "model"; | 1598 static const char model[] = "model"; |
| 1602 static const char brand[] = "brand"; | 1599 static const char brand[] = "brand"; |
| 1603 static const char exception_info[] = "exception_info"; | 1600 static const char exception_info[] = "exception_info"; |
| 1604 | 1601 |
| 1605 base::android::BuildInfo* android_build_info = | 1602 base::android::BuildInfo* android_build_info = |
| 1606 base::android::BuildInfo::GetInstance(); | 1603 base::android::BuildInfo::GetInstance(); |
| 1607 writer.AddPairString( | 1604 writer.AddPairString( |
| 1608 android_build_id, android_build_info->android_build_id()); | 1605 android_build_id, android_build_info->android_build_id()); |
| 1609 writer.AddBoundary(); | 1606 writer.AddBoundary(); |
| 1610 writer.AddPairString( | 1607 writer.AddPairString( |
| 1611 android_build_fp, android_build_info->android_build_fp()); | 1608 android_build_fp, android_build_info->android_build_fp()); |
| 1612 writer.AddBoundary(); | 1609 writer.AddBoundary(); |
| 1613 writer.AddPairString(device, android_build_info->device()); | 1610 writer.AddPairString(device, android_build_info->device()); |
| 1614 writer.AddBoundary(); | 1611 writer.AddBoundary(); |
| 1615 writer.AddPairString(model, android_build_info->model()); | 1612 writer.AddPairString(model, android_build_info->model()); |
| 1616 writer.AddBoundary(); | 1613 writer.AddBoundary(); |
| 1617 writer.AddPairString(brand, android_build_info->brand()); | 1614 writer.AddPairString(brand, android_build_info->brand()); |
| 1618 writer.AddBoundary(); | 1615 writer.AddBoundary(); |
| 1616 writer.AddPairString(gms_core_version, |
| 1617 android_build_info->gms_version_code()); |
| 1618 writer.AddBoundary(); |
| 1619 if (android_build_info->java_exception_info() != nullptr) { | 1619 if (android_build_info->java_exception_info() != nullptr) { |
| 1620 writer.AddPairString(exception_info, | 1620 writer.AddPairString(exception_info, |
| 1621 android_build_info->java_exception_info()); | 1621 android_build_info->java_exception_info()); |
| 1622 writer.AddBoundary(); | 1622 writer.AddBoundary(); |
| 1623 } | 1623 } |
| 1624 #endif | 1624 #endif |
| 1625 writer.Flush(); | 1625 writer.Flush(); |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 if (info.process_start_time > 0) { | 1628 if (info.process_start_time > 0) { |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 const std::string& gpu_fingerprint) { | 1922 const std::string& gpu_fingerprint) { |
| 1923 g_microdump_info.Get().SetGpuFingerprint(gpu_fingerprint); | 1923 g_microdump_info.Get().SetGpuFingerprint(gpu_fingerprint); |
| 1924 } | 1924 } |
| 1925 #endif // OS_ANDROID | 1925 #endif // OS_ANDROID |
| 1926 | 1926 |
| 1927 bool IsCrashReporterEnabled() { | 1927 bool IsCrashReporterEnabled() { |
| 1928 return g_is_crash_reporter_enabled; | 1928 return g_is_crash_reporter_enabled; |
| 1929 } | 1929 } |
| 1930 | 1930 |
| 1931 } // namespace breakpad | 1931 } // namespace breakpad |
| OLD | NEW |