Merge system_wrappers:metrics and system_wrappers:metrics_default.
After this CL, WebRTC clients will be able to exclude the default
metrics implementation by defining the preprocessor macro
WEBRTC_EXCLUDE_METRICS_DEFAULT (if GN is used, it will be enough
to set rtc_exclude_metrics_default to true).
Bug: webrtc:9631
Change-Id: Id6db23cc4b6c292d9f97372a8014c0c467ed0538
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/98102
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24747}
diff --git a/system_wrappers/source/metrics_default.cc b/system_wrappers/source/metrics.cc
similarity index 98%
rename from system_wrappers/source/metrics_default.cc
rename to system_wrappers/source/metrics.cc
index 7b62c81..662e64e 100644
--- a/system_wrappers/source/metrics_default.cc
+++ b/system_wrappers/source/metrics.cc
@@ -7,13 +7,12 @@
// be found in the AUTHORS file in the root of the source tree.
//
-#include "system_wrappers/include/metrics_default.h"
+#include "system_wrappers/include/metrics.h"
#include <algorithm>
#include "rtc_base/criticalsection.h"
#include "rtc_base/thread_annotations.h"
-#include "system_wrappers/include/metrics.h"
// Default implementation of histogram methods for WebRTC clients that do not
// want to provide their own implementation.
@@ -203,6 +202,7 @@
}
} // namespace
+#ifndef WEBRTC_EXCLUDE_METRICS_DEFAULT
// Implementation of histogram methods in
// webrtc/system_wrappers/interface/metrics.h.
@@ -259,6 +259,8 @@
ptr->Add(sample);
}
+#endif // WEBRTC_EXCLUDE_METRICS_DEFAULT
+
SampleInfo::SampleInfo(const std::string& name,
int min,
int max,