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

Unified Diff: third_party/libjingle/overrides/init_webrtc.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.h ('k') | third_party/libjingle/overrides/initialize_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libjingle/overrides/init_webrtc.cc
diff --git a/third_party/libjingle/overrides/init_webrtc.cc b/third_party/libjingle/overrides/init_webrtc.cc
index eda9858f8c9b166bada6f4f95f94fbb2408457b3..5c356ab89f72fdc55e4fed5e0d544e0f0b7a069c 100644
--- a/third_party/libjingle/overrides/init_webrtc.cc
+++ b/third_party/libjingle/overrides/init_webrtc.cc
@@ -8,6 +8,7 @@
#include "base/debug/trace_event.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
+#include "base/metrics/field_trial.h"
#include "base/native_library.h"
#include "base/path_service.h"
#include "talk/base/basictypes.h"
@@ -42,6 +43,17 @@ bool InitializeWebRtcModule() {
return true;
}
+// Define webrtc:field_trial::FindFullName to provide webrtc with a field trial
+// implementation. When compiled as a static library this can be done directly
+// and without pointers to functions.
+namespace webrtc {
+namespace field_trial {
+std::string FindFullName(const std::string& trial_name) {
+ return base::FieldTrialList::FindFullName(trial_name);
+}
+} // namespace field_trial
+} // namespace webrtc
+
#else // !LIBPEERCONNECTION_LIB
// When being compiled as a shared library, we need to bridge the gap between
@@ -117,6 +129,7 @@ bool InitializeWebRtcModule() {
#if !defined(OS_MACOSX) && !defined(OS_ANDROID)
&Allocate, &Dellocate,
#endif
+ &base::FieldTrialList::FindFullName,
logging::GetLogMessageHandler(),
&GetCategoryGroupEnabled, &AddTraceEvent,
&g_create_webrtc_media_engine, &g_destroy_webrtc_media_engine,
« no previous file with comments | « third_party/libjingle/overrides/init_webrtc.h ('k') | third_party/libjingle/overrides/initialize_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698