Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(569)

Unified Diff: third_party/webrtc_overrides/init_webrtc.cc

Issue 2337913002: Add functions needed by the new WebRTC histogram API. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/webrtc_overrides/init_webrtc.cc
diff --git a/third_party/webrtc_overrides/init_webrtc.cc b/third_party/webrtc_overrides/init_webrtc.cc
index 33ebc88ca2da27cd532a0f825c33544271fc8a2a..cd937abd2243f3eb12889f6d038f79b1ca583db3 100644
--- a/third_party/webrtc_overrides/init_webrtc.cc
+++ b/third_party/webrtc_overrides/init_webrtc.cc
@@ -58,6 +58,18 @@ Histogram* HistogramFactoryGetEnumeration(
base::HistogramBase::kUmaTargetedHistogramFlag));
}
+const std::string& GetHistogramName(Histogram* histogram_pointer) {
+ base::HistogramBase* ptr =
+ reinterpret_cast<base::HistogramBase*>(histogram_pointer);
+ return ptr->histogram_name();
+}
+
+void HistogramAdd(Histogram* histogram_pointer, int sample) {
+ base::HistogramBase* ptr =
+ reinterpret_cast<base::HistogramBase*>(histogram_pointer);
+ ptr->Add(sample);
+}
+
void HistogramAdd(
Histogram* histogram_pointer, const std::string& name, int sample) {
base::HistogramBase* ptr =
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698