| Index: third_party/libjingle/overrides/initialize_module.cc
|
| diff --git a/third_party/libjingle/overrides/initialize_module.cc b/third_party/libjingle/overrides/initialize_module.cc
|
| index ce11567d4650cb6b4078f3063c60c3a19d274b14..09afbc2aed46b0f5be2233c1c31bc872ccba03d8 100644
|
| --- a/third_party/libjingle/overrides/initialize_module.cc
|
| +++ b/third_party/libjingle/overrides/initialize_module.cc
|
| @@ -38,11 +38,18 @@ cricket::MediaEngineInterface* CreateWebRtcMediaEngine(
|
|
|
| void DestroyWebRtcMediaEngine(cricket::MediaEngineInterface* media_engine);
|
|
|
| -// Define webrtc:field_trial::FindFullName to provide webrtc with a field trial
|
| -// implementation. The implementation is provided by the loader via the
|
| -// InitializeModule.
|
| namespace {
|
| +// Provide webrtc with a field trial and metrics implementations.
|
| +// The implementations are provided by the loader via the InitializeModule.
|
| +
|
| +// Defines webrtc::field_trial::FindFullName.
|
| FieldTrialFindFullName g_field_trial_find_ = NULL;
|
| +// Defines webrtc::metrics::RtcFactoryGetCounts.
|
| +RtcHistogramFactoryGetCounts g_factory_get_counts = NULL;
|
| +// Defines webrtc::metrics::RtcFactoryGetEnumeration.
|
| +RtcHistogramFactoryGetEnumeration g_factory_get_enumeration = NULL;
|
| +// Defines webrtc::metrics::RtcAdd.
|
| +RtcHistogramAdd g_histogram_add = NULL;
|
| }
|
|
|
| namespace webrtc {
|
| @@ -51,6 +58,23 @@ std::string FindFullName(const std::string& trial_name) {
|
| return g_field_trial_find_(trial_name);
|
| }
|
| } // namespace field_trial
|
| +
|
| +namespace metrics {
|
| +Histogram* HistogramFactoryGetCounts(
|
| + const std::string& name, int min, int max, int bucket_count) {
|
| + return g_factory_get_counts(name, min, max, bucket_count);
|
| +}
|
| +
|
| +Histogram* HistogramFactoryGetEnumeration(
|
| + const std::string& name, int boundary) {
|
| + return g_factory_get_enumeration(name, boundary);
|
| +}
|
| +
|
| +void HistogramAdd(
|
| + Histogram* histogram_pointer, const std::string& name, int sample) {
|
| + g_histogram_add(histogram_pointer, name, sample);
|
| +}
|
| +} // namespace metrics
|
| } // namespace webrtc
|
|
|
| extern "C" {
|
| @@ -65,6 +89,9 @@ bool InitializeModule(const CommandLine& command_line,
|
| DellocateFunction dealloc,
|
| #endif
|
| FieldTrialFindFullName field_trial_find,
|
| + RtcHistogramFactoryGetCounts factory_get_counts,
|
| + RtcHistogramFactoryGetEnumeration factory_get_enumeration,
|
| + RtcHistogramAdd histogram_add,
|
| logging::LogMessageHandlerFunction log_handler,
|
| webrtc::GetCategoryEnabledPtr trace_get_category_enabled,
|
| webrtc::AddTraceEventPtr trace_add_trace_event,
|
| @@ -78,6 +105,9 @@ bool InitializeModule(const CommandLine& command_line,
|
| #endif
|
|
|
| g_field_trial_find_ = field_trial_find;
|
| + g_factory_get_counts = factory_get_counts;
|
| + g_factory_get_enumeration = factory_get_enumeration;
|
| + g_histogram_add = histogram_add;
|
|
|
| *create_media_engine = &CreateWebRtcMediaEngine;
|
| *destroy_media_engine = &DestroyWebRtcMediaEngine;
|
|
|