Commit 471c3614 authored by Clark DuVall's avatar Clark DuVall Committed by Commit Bot

Add System Profile info to Android crash reports

This was previously only being reported for Win/Mac, but would be very
useful to have on Android as well.

Bug: 965732
Change-Id: I351e00b20339469d5a3fd6bcafa0d2a3423c2f01
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1625206Reviewed-by: default avatarMark Mentovai <mark@chromium.org>
Reviewed-by: default avatarIlya Sherman <isherman@chromium.org>
Commit-Queue: Ilya Sherman <isherman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662646}
parent 0394ae01
...@@ -2782,6 +2782,7 @@ jumbo_split_static_library("browser") { ...@@ -2782,6 +2782,7 @@ jumbo_split_static_library("browser") {
"//services/proxy_resolver:lib", "//services/proxy_resolver:lib",
"//third_party/android_opengl/etc1", "//third_party/android_opengl/etc1",
"//third_party/android_sdk:cpu_features", "//third_party/android_sdk:cpu_features",
"//third_party/crashpad/crashpad/client:client",
"//third_party/libaddressinput:util", "//third_party/libaddressinput:util",
"//third_party/libphonenumber", "//third_party/libphonenumber",
"//third_party/smhasher:murmurhash2", "//third_party/smhasher:murmurhash2",
......
...@@ -149,7 +149,7 @@ ...@@ -149,7 +149,7 @@
#include "content/public/common/service_manager_connection.h" #include "content/public/common/service_manager_connection.h"
#endif #endif
#if defined(OS_WIN) || defined(OS_MACOSX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
#include "third_party/crashpad/crashpad/client/crashpad_info.h" #include "third_party/crashpad/crashpad/client/crashpad_info.h"
#endif #endif
...@@ -182,7 +182,7 @@ const int kMaxHistogramGatheringWaitDuration = 60000; // 60 seconds. ...@@ -182,7 +182,7 @@ const int kMaxHistogramGatheringWaitDuration = 60000; // 60 seconds.
// third_party/crashpad/crashpad/handler/handler_main.cc. // third_party/crashpad/crashpad/handler/handler_main.cc.
const char kCrashpadHistogramAllocatorName[] = "CrashpadMetrics"; const char kCrashpadHistogramAllocatorName[] = "CrashpadMetrics";
#if defined(OS_WIN) || defined(OS_MACOSX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
// The stream type assigned to the minidump stream that holds the serialized // The stream type assigned to the minidump stream that holds the serialized
// system profile proto. // system profile proto.
const uint32_t kSystemProfileMinidumpStreamType = 0x4B6B0003; const uint32_t kSystemProfileMinidumpStreamType = 0x4B6B0003;
...@@ -193,7 +193,7 @@ const uint32_t kSystemProfileMinidumpStreamType = 0x4B6B0003; ...@@ -193,7 +193,7 @@ const uint32_t kSystemProfileMinidumpStreamType = 0x4B6B0003;
// not assume it. // not assume it.
// TODO(manzagop): revisit this if the Crashpad API evolves. // TODO(manzagop): revisit this if the Crashpad API evolves.
base::LazyInstance<std::string>::Leaky g_environment_for_crash_reporter; base::LazyInstance<std::string>::Leaky g_environment_for_crash_reporter;
#endif // defined(OS_WIN) || defined(OS_MACOSX) #endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
void RegisterFileMetricsPreferences(PrefRegistrySimple* registry) { void RegisterFileMetricsPreferences(PrefRegistrySimple* registry) {
metrics::FileMetricsProvider::RegisterPrefs(registry, kBrowserMetricsName); metrics::FileMetricsProvider::RegisterPrefs(registry, kBrowserMetricsName);
...@@ -469,7 +469,7 @@ std::string ChromeMetricsServiceClient::GetVersionString() { ...@@ -469,7 +469,7 @@ std::string ChromeMetricsServiceClient::GetVersionString() {
} }
void ChromeMetricsServiceClient::OnEnvironmentUpdate(std::string* environment) { void ChromeMetricsServiceClient::OnEnvironmentUpdate(std::string* environment) {
#if defined(OS_WIN) || defined(OS_MACOSX) #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_ANDROID)
DCHECK(environment); DCHECK(environment);
// Register the environment with the crash reporter. Note this only registers // Register the environment with the crash reporter. Note this only registers
...@@ -490,7 +490,7 @@ void ChromeMetricsServiceClient::OnEnvironmentUpdate(std::string* environment) { ...@@ -490,7 +490,7 @@ void ChromeMetricsServiceClient::OnEnvironmentUpdate(std::string* environment) {
reinterpret_cast<const void*>( reinterpret_cast<const void*>(
g_environment_for_crash_reporter.Get().data()), g_environment_for_crash_reporter.Get().data()),
g_environment_for_crash_reporter.Get().size()); g_environment_for_crash_reporter.Get().size());
#endif // OS_WIN || OS_MACOSX #endif // OS_WIN || OS_MACOSX || OS_ANDROID
} }
void ChromeMetricsServiceClient::OnLogCleanShutdown() { void ChromeMetricsServiceClient::OnLogCleanShutdown() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment