Upstream version 11.39.264.0
[platform/framework/web/crosswalk.git] / src / third_party / libjingle / overrides / init_webrtc.cc
index e11f78d..ab89d58 100644 (file)
@@ -6,8 +6,8 @@
 
 #include "base/command_line.h"
 #include "base/debug/trace_event.h"
-#include "base/file_util.h"
 #include "base/files/file_path.h"
+#include "base/files/file_util.h"
 #include "base/metrics/field_trial.h"
 #include "base/native_library.h"
 #include "base/path_service.h"
@@ -32,6 +32,16 @@ void AddTraceEvent(char phase,
                                   NULL, flags);
 }
 
+// Define webrtc:field_trial::FindFullName to provide webrtc with a field trial
+// implementation.
+namespace webrtc {
+namespace field_trial {
+std::string FindFullName(const std::string& trial_name) {
+  return base::FieldTrialList::FindFullName(trial_name);
+}
+}  // namespace field_trial
+}  // namespace webrtc
+
 #if defined(LIBPEERCONNECTION_LIB)
 
 // libpeerconnection is being compiled as a static lib.  In this case
@@ -43,17 +53,6 @@ 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
@@ -127,13 +126,16 @@ bool InitializeWebRtcModule() {
   InitDiagnosticLoggingDelegateFunctionFunction init_diagnostic_logging = NULL;
   bool init_ok = initialize_module(*CommandLine::ForCurrentProcess(),
 #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
-      &Allocate, &Dellocate,
+                                   &Allocate,
+                                   &Dellocate,
 #endif
-      &base::FieldTrialList::FindFullName,
-      logging::GetLogMessageHandler(),
-      &GetCategoryGroupEnabled, &AddTraceEvent,
-      &g_create_webrtc_media_engine, &g_destroy_webrtc_media_engine,
-      &init_diagnostic_logging);
+                                   &webrtc::field_trial::FindFullName,
+                                   logging::GetLogMessageHandler(),
+                                   &GetCategoryGroupEnabled,
+                                   &AddTraceEvent,
+                                   &g_create_webrtc_media_engine,
+                                   &g_destroy_webrtc_media_engine,
+                                   &init_diagnostic_logging);
 
   if (init_ok)
     rtc::SetExtraLoggingInit(init_diagnostic_logging);