Remove the deprecated static metrics APIs.
Review URL: http://codereview.chromium.org/2037011
diff --git a/crash_reporter.cc b/crash_reporter.cc
index 234ab83..6a620d1 100644
--- a/crash_reporter.cc
+++ b/crash_reporter.cc
@@ -30,6 +30,7 @@
CRASH_KIND_MAX
};
+static MetricsLibrary s_metrics_lib;
static SystemLoggingImpl s_system_log;
static bool IsMetricsCollectionAllowed() {
@@ -46,9 +47,9 @@
}
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 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,