Rename the webrtc_adm_linux* namespaces to webrtc::adm_linux*

We shouldn't pollute the global namespace.

BUG=webrtc:7484

Review-Url: https://codereview.webrtc.org/2818563003
Cr-Commit-Position: refs/heads/master@{#17734}
diff --git a/webrtc/modules/audio_device/linux/alsasymboltable_linux.cc b/webrtc/modules/audio_device/linux/alsasymboltable_linux.cc
index a391590..2459625 100644
--- a/webrtc/modules/audio_device/linux/alsasymboltable_linux.cc
+++ b/webrtc/modules/audio_device/linux/alsasymboltable_linux.cc
@@ -27,7 +27,8 @@
 
 #include "webrtc/modules/audio_device/linux/alsasymboltable_linux.h"
 
-namespace webrtc_adm_linux_alsa {
+namespace webrtc {
+namespace adm_linux_alsa {
 
 LATE_BINDING_SYMBOL_TABLE_DEFINE_BEGIN(AlsaSymbolTable, "libasound.so.2")
 #define X(sym) \
@@ -36,4 +37,5 @@
 #undef X
 LATE_BINDING_SYMBOL_TABLE_DEFINE_END(AlsaSymbolTable)
 
-}  // namespace webrtc_adm_linux_alsa
+}  // namespace adm_linux_alsa
+}  // namespace webrtc
diff --git a/webrtc/modules/audio_device/linux/alsasymboltable_linux.h b/webrtc/modules/audio_device/linux/alsasymboltable_linux.h
index 82690c5..14b016c 100644
--- a/webrtc/modules/audio_device/linux/alsasymboltable_linux.h
+++ b/webrtc/modules/audio_device/linux/alsasymboltable_linux.h
@@ -30,7 +30,8 @@
 
 #include "webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h"
 
-namespace webrtc_adm_linux_alsa {
+namespace webrtc {
+namespace adm_linux_alsa {
 
 // The ALSA symbols we need, as an X-Macro list.
 // This list must contain precisely every libasound function that is used in
@@ -142,6 +143,7 @@
 #undef X
 LATE_BINDING_SYMBOL_TABLE_DECLARE_END(AlsaSymbolTable)
 
-}  // namespace webrtc_adm_linux_alsa
+}  // namespace adm_linux_alsa
+}  // namespace webrtc
 
 #endif  // WEBRTC_AUDIO_DEVICE_ALSASYMBOLTABLE_LINUX_H
diff --git a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
index 3b8cf24..defae6b 100644
--- a/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_device_alsa_linux.cc
@@ -18,13 +18,13 @@
 #include "webrtc/system_wrappers/include/sleep.h"
 #include "webrtc/system_wrappers/include/trace.h"
 
-webrtc_adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable;
+webrtc::adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable;
 
 // Accesses ALSA functions through our late-binding symbol table instead of
 // directly. This way we don't have to link to libasound, which means our binary
 // will work on systems that don't have it.
 #define LATE(sym) \
-  LATESYM_GET(webrtc_adm_linux_alsa::AlsaSymbolTable, &AlsaSymbolTable, sym)
+  LATESYM_GET(webrtc::adm_linux_alsa::AlsaSymbolTable, &AlsaSymbolTable, sym)
 
 // Redefine these here to be able to do late-binding
 #undef snd_ctl_card_info_alloca
diff --git a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
index a486ee5..bbc6fad 100644
--- a/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_device_pulse_linux.cc
@@ -17,13 +17,14 @@
 #include "webrtc/system_wrappers/include/event_wrapper.h"
 #include "webrtc/system_wrappers/include/trace.h"
 
-webrtc_adm_linux_pulse::PulseAudioSymbolTable PaSymbolTable;
+webrtc::adm_linux_pulse::PulseAudioSymbolTable PaSymbolTable;
 
 // Accesses Pulse functions through our late-binding symbol table instead of
 // directly. This way we don't have to link to libpulse, which means our binary
 // will work on systems that don't have it.
-#define LATE(sym) \
-  LATESYM_GET(webrtc_adm_linux_pulse::PulseAudioSymbolTable, &PaSymbolTable, sym)
+#define LATE(sym)                                                             \
+  LATESYM_GET(webrtc::adm_linux_pulse::PulseAudioSymbolTable, &PaSymbolTable, \
+              sym)
 
 namespace webrtc
 {
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
index be5e17e..1a30fec 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.cc
@@ -13,13 +13,13 @@
 #include "webrtc/modules/audio_device/linux/audio_mixer_manager_alsa_linux.h"
 #include "webrtc/system_wrappers/include/trace.h"
 
-extern webrtc_adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable;
+extern webrtc::adm_linux_alsa::AlsaSymbolTable AlsaSymbolTable;
 
 // Accesses ALSA functions through our late-binding symbol table instead of
 // directly. This way we don't have to link to libalsa, which means our binary
 // will work on systems that don't have it.
 #define LATE(sym) \
-  LATESYM_GET(webrtc_adm_linux_alsa::AlsaSymbolTable, &AlsaSymbolTable, sym)
+  LATESYM_GET(webrtc::adm_linux_alsa::AlsaSymbolTable, &AlsaSymbolTable, sym)
 
 namespace webrtc
 {
diff --git a/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc b/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
index f73a399..a9b3d47 100644
--- a/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
+++ b/webrtc/modules/audio_device/linux/audio_mixer_manager_pulse_linux.cc
@@ -14,14 +14,14 @@
 #include "webrtc/system_wrappers/include/trace.h"
 #include "webrtc/base/checks.h"
 
-extern webrtc_adm_linux_pulse::PulseAudioSymbolTable PaSymbolTable;
+extern webrtc::adm_linux_pulse::PulseAudioSymbolTable PaSymbolTable;
 
 // Accesses Pulse functions through our late-binding symbol table instead of
 // directly. This way we don't have to link to libpulse, which means our
 // binary will work on systems that don't have it.
-#define LATE(sym) \
-  LATESYM_GET(webrtc_adm_linux_pulse::PulseAudioSymbolTable, \
-              &PaSymbolTable, sym)
+#define LATE(sym)                                                             \
+  LATESYM_GET(webrtc::adm_linux_pulse::PulseAudioSymbolTable, &PaSymbolTable, \
+              sym)
 
 namespace webrtc
 {
diff --git a/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc b/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc
index bc5a3f8..1052f86 100644
--- a/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc
+++ b/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.cc
@@ -16,10 +16,8 @@
 #include <dlfcn.h>
 #endif
 
-// TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead.
-using namespace webrtc;
-
-namespace webrtc_adm_linux {
+namespace webrtc {
+namespace adm_linux {
 
 inline static const char *GetDllError() {
 #ifdef WEBRTC_LINUX
@@ -107,4 +105,5 @@
   return true;
 }
 
-}  // namespace webrtc_adm_linux
+}  // namespace adm_linux
+}  // namespace webrtc
diff --git a/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h b/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h
index 4b3569c..d62f00a 100644
--- a/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h
+++ b/webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h
@@ -22,7 +22,8 @@
 // supports Linux and pure C symbols.
 // See talk/sound/pulseaudiosymboltable.(h|cc) for an example.
 
-namespace webrtc_adm_linux {
+namespace webrtc {
+namespace adm_linux {
 
 #ifdef WEBRTC_LINUX
 typedef void *DllHandle;
@@ -132,18 +133,19 @@
   ClassName##_SYMBOL_TABLE_INDEX_##sym,
 
 // This macro completes the header declaration.
-#define LATE_BINDING_SYMBOL_TABLE_DECLARE_END(ClassName) \
-  ClassName##_SYMBOL_TABLE_SIZE \
-}; \
-\
-extern const char ClassName##_kDllName[]; \
-extern const char *const \
-    ClassName##_kSymbolNames[ClassName##_SYMBOL_TABLE_SIZE]; \
-\
-typedef ::webrtc_adm_linux::LateBindingSymbolTable<ClassName##_SYMBOL_TABLE_SIZE, \
-                                            ClassName##_kDllName, \
-                                            ClassName##_kSymbolNames> \
-    ClassName;
+#define LATE_BINDING_SYMBOL_TABLE_DECLARE_END(ClassName)       \
+  ClassName##_SYMBOL_TABLE_SIZE                                \
+  }                                                            \
+  ;                                                            \
+                                                               \
+  extern const char ClassName##_kDllName[];                    \
+  extern const char* const                                     \
+      ClassName##_kSymbolNames[ClassName##_SYMBOL_TABLE_SIZE]; \
+                                                               \
+  typedef ::webrtc::adm_linux::LateBindingSymbolTable<         \
+      ClassName##_SYMBOL_TABLE_SIZE, ClassName##_kDllName,     \
+      ClassName##_kSymbolNames>                                \
+      ClassName;
 
 // This macro must be invoked in a .cc file to define a previously-declared
 // symbol table class.
@@ -170,6 +172,7 @@
   (*reinterpret_cast<typeof(&sym)>( \
       (inst)->GetSymbol(LATESYM_INDEXOF(ClassName, sym))))
 
-}  // namespace webrtc_adm_linux
+}  // namespace adm_linux
+}  // namespace webrtc
 
 #endif  // WEBRTC_ADM_LATEBINDINGSYMBOLTABLE_LINUX_H
diff --git a/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc b/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc
index 1f1890a..26a173d 100644
--- a/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc
+++ b/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.cc
@@ -27,7 +27,8 @@
 
 #include "webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h"
 
-namespace webrtc_adm_linux_pulse {
+namespace webrtc {
+namespace adm_linux_pulse {
 
 LATE_BINDING_SYMBOL_TABLE_DEFINE_BEGIN(PulseAudioSymbolTable, "libpulse.so.0")
 #define X(sym) \
@@ -36,4 +37,5 @@
 #undef X
 LATE_BINDING_SYMBOL_TABLE_DEFINE_END(PulseAudioSymbolTable)
 
-}  // namespace webrtc_adm_linux_pulse
+}  // namespace adm_linux_pulse
+}  // namespace webrtc
diff --git a/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h b/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h
index 7f3ccab..f0d6d38 100644
--- a/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h
+++ b/webrtc/modules/audio_device/linux/pulseaudiosymboltable_linux.h
@@ -30,7 +30,8 @@
 
 #include "webrtc/modules/audio_device/linux/latebindingsymboltable_linux.h"
 
-namespace webrtc_adm_linux_pulse {
+namespace webrtc {
+namespace adm_linux_pulse {
 
 // The PulseAudio symbols we need, as an X-Macro list.
 // This list must contain precisely every libpulse function that is used in
@@ -99,6 +100,7 @@
 #undef X
 LATE_BINDING_SYMBOL_TABLE_DECLARE_END(PulseAudioSymbolTable)
 
-}  // namespace webrtc_adm_linux_pulse
+}  // namespace adm_linux_pulse
+}  // namespace webrtc
 
 #endif  // WEBRTC_AUDIO_DEVICE_PULSEAUDIOSYMBOLTABLE_LINUX_H