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

Unified Diff: third_party/libjingle/overrides/initialize_module.cc

Issue 272503004: Wire up chrome field trials with webrtc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Chrome provides implementation of webrtc::field_trial::FindFullName Created 6 years, 7 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 | « third_party/libjingle/overrides/init_webrtc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 fd1af1196bb9028504fba0ffe5b3bc6f1b212dee..c7ef38290ebf27505f830df6b72e74d1ab775efe 100644
--- a/third_party/libjingle/overrides/initialize_module.cc
+++ b/third_party/libjingle/overrides/initialize_module.cc
@@ -38,6 +38,21 @@ 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 {
+FieldTrialFindFullName g_field_trial_find_ = NULL;
+}
+
+namespace webrtc {
+namespace field_trial {
+std::string FindFullName(const std::string& trial_name) {
+ return g_field_trial_find_(trial_name);
+}
+} // namespace field_trial
+} // namespace webrtc
+
extern "C" {
// Initialize logging, set the forward allocator functions (not on mac), and
@@ -49,6 +64,7 @@ bool InitializeModule(const CommandLine& command_line,
AllocateFunction alloc,
DellocateFunction dealloc,
#endif
+ FieldTrialFindFullName field_trial_find,
logging::LogMessageHandlerFunction log_handler,
webrtc::GetCategoryEnabledPtr trace_get_category_enabled,
webrtc::AddTraceEventPtr trace_add_trace_event,
@@ -61,6 +77,8 @@ bool InitializeModule(const CommandLine& command_line,
g_dealloc = dealloc;
#endif
+ g_field_trial_find_ = field_trial_find;
+
*create_media_engine = &CreateWebRtcMediaEngine;
*destroy_media_engine = &DestroyWebRtcMediaEngine;
*init_diagnostic_logging = &talk_base::InitDiagnosticLoggingDelegateFunction;
« no previous file with comments | « third_party/libjingle/overrides/init_webrtc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698