Bug 798033 - Remove 'using namespace' from dom/ headers. r=echou
authorBirunthan Mohanathas <birunthan@mohanathas.com>
Sun, 08 Dec 2013 21:53:11 -0500
changeset 175162 0974fda4a15422728e302bb32a5d58e4392b8a29
parent 175161 e0776db3b102510504fdcf57b7f65dfa1da3b46d
child 175163 6f362df0b72436ec4082e89d37b38721f336e38c
push idunknown
push userunknown
push dateunknown
reviewersechou
bugs798033
milestone28.0a1
Bug 798033 - Remove 'using namespace' from dom/ headers. r=echou
dom/bluetooth/BluetoothSocketObserver.h
dom/bluetooth/bluedroid/BluetoothOppManager.h
dom/bluetooth/bluez/BluetoothHfpManager.h
dom/bluetooth/bluez/BluetoothOppManager.h
dom/system/gonk/AudioManager.h
--- a/dom/bluetooth/BluetoothSocketObserver.h
+++ b/dom/bluetooth/BluetoothSocketObserver.h
@@ -3,29 +3,28 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_BluetoothSocketObserver_h
 #define mozilla_dom_bluetooth_BluetoothSocketObserver_h
 
 #include "BluetoothCommon.h"
-#include <mozilla/ipc/UnixSocket.h>
-
-using namespace mozilla::ipc;
+#include "mozilla/ipc/UnixSocket.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothSocket;
 
 class BluetoothSocketObserver
 {
 public:
-  virtual void ReceiveSocketData(BluetoothSocket* aSocket,
-                                 nsAutoPtr<UnixSocketRawData>& aMessage) = 0;
+  virtual void ReceiveSocketData(
+    BluetoothSocket* aSocket,
+    nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aMessage) = 0;
 
    /**
     * A callback function which would be called when a socket connection
     * is established successfully. To be more specific, this would be called
     * when socket state changes from CONNECTING/LISTENING to CONNECTED.
     */
   virtual void OnSocketConnectSuccess(BluetoothSocket* aSocket) = 0;
 
--- a/dom/bluetooth/bluedroid/BluetoothOppManager.h
+++ b/dom/bluetooth/bluedroid/BluetoothOppManager.h
@@ -110,17 +110,18 @@ private:
    * Usually we won't get a full PUT packet in one operation, which means that
    * a packet may be devided into several parts and BluetoothOppManager should
    * be in charge of assembling.
    *
    * @return true if a packet has been fully received.
    *         false if the received length exceeds/not reaches the expected
    *         length.
    */
-  bool ComposePacket(uint8_t aOpCode, UnixSocketRawData* aMessage);
+  bool ComposePacket(uint8_t aOpCode,
+                     mozilla::ipc::UnixSocketRawData* aMessage);
 
   /**
    * OBEX session status.
    * Set when OBEX session is established.
    */
   bool mConnected;
   nsString mDeviceAddress;
 
--- a/dom/bluetooth/bluez/BluetoothHfpManager.h
+++ b/dom/bluetooth/bluez/BluetoothHfpManager.h
@@ -217,17 +217,17 @@ private:
   nsRefPtr<BluetoothSocket> mSocket;
 
   // Server sockets. Once an inbound connection is established, it will hand
   // over the ownership to mSocket, and get a new server socket while Listen()
   // is called.
   nsRefPtr<BluetoothSocket> mHandsfreeSocket;
   nsRefPtr<BluetoothSocket> mHeadsetSocket;
   nsRefPtr<BluetoothSocket> mScoSocket;
-  SocketConnectionStatus mScoSocketStatus;
+  mozilla::ipc::SocketConnectionStatus mScoSocketStatus;
 
 #ifdef MOZ_B2G_RIL
   // CDMA-specific variable
   Call mCdmaSecondCall;
 #endif
 };
 
 END_BLUETOOTH_NAMESPACE
--- a/dom/bluetooth/bluez/BluetoothOppManager.h
+++ b/dom/bluetooth/bluez/BluetoothOppManager.h
@@ -110,17 +110,18 @@ private:
    * Usually we won't get a full PUT packet in one operation, which means that
    * a packet may be devided into several parts and BluetoothOppManager should
    * be in charge of assembling.
    *
    * @return true if a packet has been fully received.
    *         false if the received length exceeds/not reaches the expected
    *         length.
    */
-  bool ComposePacket(uint8_t aOpCode, UnixSocketRawData* aMessage);
+  bool ComposePacket(uint8_t aOpCode,
+                     mozilla::ipc::UnixSocketRawData* aMessage);
 
   /**
    * OBEX session status.
    * Set when OBEX session is established.
    */
   bool mConnected;
   nsString mConnectedDeviceAddress;
 
--- a/dom/system/gonk/AudioManager.h
+++ b/dom/system/gonk/AudioManager.h
@@ -23,18 +23,16 @@
 #include "AudioChannelAgent.h"
 #include "android_audio/AudioSystem.h"
 
 // {b2b51423-502d-4d77-89b3-7786b562b084}
 #define NS_AUDIOMANAGER_CID {0x94f6fd70, 0x7615, 0x4af9, \
       {0x89, 0x10, 0xf9, 0x3c, 0x55, 0xe6, 0x62, 0xec}}
 #define NS_AUDIOMANAGER_CONTRACTID "@mozilla.org/telephony/audiomanager;1"
 
-using namespace mozilla::dom;
-
 namespace mozilla {
 namespace hal {
 class SwitchEvent;
 typedef Observer<SwitchEvent> SwitchObserver;
 } // namespace hal
 
 namespace dom {
 namespace gonk {