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 1697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1708 writer.AddPairData(pid_key_name, sizeof(pid_key_name) - 1, | 1708 writer.AddPairData(pid_key_name, sizeof(pid_key_name) - 1, |
1709 pid_value_buf, pid_value_len); | 1709 pid_value_buf, pid_value_len); |
1710 writer.AddBoundary(); | 1710 writer.AddBoundary(); |
1711 } | 1711 } |
1712 #if defined(OS_ANDROID) | 1712 #if defined(OS_ANDROID) |
1713 // Addtional MIME blocks are added for logging on Android devices. | 1713 // Addtional MIME blocks are added for logging on Android devices. |
1714 static const char android_build_id[] = "android_build_id"; | 1714 static const char android_build_id[] = "android_build_id"; |
1715 static const char android_build_fp[] = "android_build_fp"; | 1715 static const char android_build_fp[] = "android_build_fp"; |
1716 static const char device[] = "device"; | 1716 static const char device[] = "device"; |
1717 static const char gms_core_version[] = "gms_core_version"; | 1717 static const char gms_core_version[] = "gms_core_version"; |
| 1718 static const char installer_package_name[] = "installer_package_name"; |
| 1719 static const char abi_name[] = "abi_name"; |
1718 static const char model[] = "model"; | 1720 static const char model[] = "model"; |
1719 static const char brand[] = "brand"; | 1721 static const char brand[] = "brand"; |
1720 static const char exception_info[] = "exception_info"; | 1722 static const char exception_info[] = "exception_info"; |
1721 | 1723 |
1722 base::android::BuildInfo* android_build_info = | 1724 base::android::BuildInfo* android_build_info = |
1723 base::android::BuildInfo::GetInstance(); | 1725 base::android::BuildInfo::GetInstance(); |
1724 writer.AddPairString( | 1726 writer.AddPairString( |
1725 android_build_id, android_build_info->android_build_id()); | 1727 android_build_id, android_build_info->android_build_id()); |
1726 writer.AddBoundary(); | 1728 writer.AddBoundary(); |
1727 writer.AddPairString( | 1729 writer.AddPairString( |
1728 android_build_fp, android_build_info->android_build_fp()); | 1730 android_build_fp, android_build_info->android_build_fp()); |
1729 writer.AddBoundary(); | 1731 writer.AddBoundary(); |
1730 writer.AddPairString(device, android_build_info->device()); | 1732 writer.AddPairString(device, android_build_info->device()); |
1731 writer.AddBoundary(); | 1733 writer.AddBoundary(); |
1732 writer.AddPairString(model, android_build_info->model()); | 1734 writer.AddPairString(model, android_build_info->model()); |
1733 writer.AddBoundary(); | 1735 writer.AddBoundary(); |
1734 writer.AddPairString(brand, android_build_info->brand()); | 1736 writer.AddPairString(brand, android_build_info->brand()); |
1735 writer.AddBoundary(); | 1737 writer.AddBoundary(); |
1736 writer.AddPairString(gms_core_version, | 1738 writer.AddPairString(gms_core_version, |
1737 android_build_info->gms_version_code()); | 1739 android_build_info->gms_version_code()); |
1738 writer.AddBoundary(); | 1740 writer.AddBoundary(); |
| 1741 writer.AddPairString(installer_package_name, |
| 1742 android_build_info->installer_package_name()); |
| 1743 writer.AddBoundary(); |
| 1744 writer.AddPairString(abi_name, android_build_info->abi_name()); |
| 1745 writer.AddBoundary(); |
1739 WriteAndroidPackage(writer, android_build_info); | 1746 WriteAndroidPackage(writer, android_build_info); |
1740 writer.AddBoundary(); | 1747 writer.AddBoundary(); |
1741 if (android_build_info->java_exception_info() != nullptr) { | 1748 if (android_build_info->java_exception_info() != nullptr) { |
1742 writer.AddPairString(exception_info, | 1749 writer.AddPairString(exception_info, |
1743 android_build_info->java_exception_info()); | 1750 android_build_info->java_exception_info()); |
1744 writer.AddBoundary(); | 1751 writer.AddBoundary(); |
1745 } | 1752 } |
1746 #endif | 1753 #endif |
1747 writer.Flush(); | 1754 writer.Flush(); |
1748 } | 1755 } |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2086 void SuppressDumpGeneration() { | 2093 void SuppressDumpGeneration() { |
2087 g_dumps_suppressed = G_DUMPS_SUPPRESSED_MAGIC; | 2094 g_dumps_suppressed = G_DUMPS_SUPPRESSED_MAGIC; |
2088 } | 2095 } |
2089 #endif // OS_ANDROID | 2096 #endif // OS_ANDROID |
2090 | 2097 |
2091 bool IsCrashReporterEnabled() { | 2098 bool IsCrashReporterEnabled() { |
2092 return g_is_crash_reporter_enabled; | 2099 return g_is_crash_reporter_enabled; |
2093 } | 2100 } |
2094 | 2101 |
2095 } // namespace breakpad | 2102 } // namespace breakpad |
OLD | NEW |