Index: src/platform/crash/crash_reporter.cc |
diff --git a/src/platform/crash/crash_reporter.cc b/src/platform/crash/crash_reporter.cc |
index 234ab830834fe20a6f73784b8cb5bce5a269bfe6..6a620d19232fbd39ccccf549337f706377cc774e 100644 |
--- a/src/platform/crash/crash_reporter.cc |
+++ b/src/platform/crash/crash_reporter.cc |
@@ -30,6 +30,7 @@ enum CrashKinds { |
CRASH_KIND_MAX |
}; |
+static MetricsLibrary s_metrics_lib; |
static SystemLoggingImpl s_system_log; |
static bool IsMetricsCollectionAllowed() { |
@@ -46,9 +47,9 @@ static void CheckUncleanShutdown() { |
} |
s_system_log.LogWarning("Last shutdown was not clean"); |
if (IsMetricsCollectionAllowed()) { |
- MetricsLibrary::SendEnumToChrome(std::string(kCrashCounterHistogram), |
- CRASH_KIND_KERNEL, |
- CRASH_KIND_MAX); |
+ s_metrics_lib.SendEnumToUMA(std::string(kCrashCounterHistogram), |
+ CRASH_KIND_KERNEL, |
+ CRASH_KIND_MAX); |
} |
if (!file_util::Delete(unclean_file_path, false)) { |
s_system_log.LogError("Failed to delete unclean shutdown file %s", |
@@ -70,15 +71,16 @@ static void SignalCleanShutdown() { |
static void CountUserCrash() { |
CHECK(IsMetricsCollectionAllowed()); |
- MetricsLibrary::SendEnumToChrome(std::string(kCrashCounterHistogram), |
- CRASH_KIND_USER, |
- CRASH_KIND_MAX); |
+ s_metrics_lib.SendEnumToUMA(std::string(kCrashCounterHistogram), |
+ CRASH_KIND_USER, |
+ CRASH_KIND_MAX); |
} |
int main(int argc, char *argv[]) { |
google::ParseCommandLineFlags(&argc, &argv, true); |
FilePath my_path(argv[0]); |
file_util::AbsolutePath(&my_path); |
+ s_metrics_lib.Init(); |
s_system_log.Initialize(my_path.BaseName().value().c_str()); |
UserCollector user_collector; |
user_collector.Initialize(CountUserCrash, |