Bug 992922: Cleanup unused code for Bluedroid sockets
authorThomas Zimmermann <tdz@users.sourceforge.net>
Tue, 15 Apr 2014 15:35:00 +0200
changeset 197098 bbd8d3685ddd4ef66b1c560bfc9a2dbfb34da92b
parent 197097 55674e8ebee77c81ac3e8b391c613cca2eeebc1d
child 197099 fede1218a369ff97450128d96ca4afb736d2186f
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs992922
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 992922: Cleanup unused code for Bluedroid sockets
dom/bluetooth/bluedroid/BluetoothSocket.cpp
dom/bluetooth/bluedroid/BluetoothSocket.h
--- a/dom/bluetooth/bluedroid/BluetoothSocket.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothSocket.cpp
@@ -457,31 +457,16 @@ public:
   {
     MOZ_ASSERT(!NS_IsMainThread());
     if (!IsCanceled()) {
       GetDroidSocketImpl()->Listen();
     }
   }
 };
 
-class SocketSetUpIOTask : public Task
-{
-  virtual void Run()
-  {
-    MOZ_ASSERT(!NS_IsMainThread());
-    mImpl->SetUpIO(mWrite);
-  }
-
-  DroidSocketImpl* mImpl;
-  bool mWrite;
-public:
-  SocketSetUpIOTask(DroidSocketImpl* aImpl, bool aWrite)
-  : mImpl(aImpl), mWrite(aWrite) { }
-};
-
 class SocketConnectClientFdTask : public Task
 {
   virtual void Run()
   {
     MOZ_ASSERT(!NS_IsMainThread());
     mImpl->ConnectClientFd();
   }
 
@@ -741,29 +726,16 @@ BluetoothSocket::CloseDroidSocket()
   XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
                                    new ShutdownSocketTask(mImpl));
   mImpl = nullptr;
 
   OnDisconnect();
 }
 
 bool
-BluetoothSocket::CreateDroidSocket(int aFd)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-  NS_ENSURE_FALSE(mImpl, false);
-
-  mImpl = new DroidSocketImpl(this, aFd);
-  XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
-                                   new SocketSetUpIOTask(mImpl, !mIsServer));
-
-  return true;
-}
-
-bool
 BluetoothSocket::Connect(const nsAString& aDeviceAddress, int aChannel)
 {
   MOZ_ASSERT(NS_IsMainThread());
   NS_ENSURE_FALSE(mImpl, false);
 
   mIsServer = false;
   mImpl = new DroidSocketImpl(this, aDeviceAddress, aChannel, mAuth, mEncrypt);
   XRE_GetIOMessageLoop()->PostTask(FROM_HERE,
--- a/dom/bluetooth/bluedroid/BluetoothSocket.h
+++ b/dom/bluetooth/bluedroid/BluetoothSocket.h
@@ -72,15 +72,14 @@ private:
   BluetoothSocketObserver* mObserver;
   DroidSocketImpl* mImpl;
   nsString mDeviceAddress;
   bool mAuth;
   bool mEncrypt;
   bool mIsServer;
   int mReceivedSocketInfoLength;
 
-  bool CreateDroidSocket(int aFd);
   bool ReceiveSocketInfo(nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aMessage);
 };
 
 END_BLUETOOTH_NAMESPACE
 
 #endif