Bug 992206: Cleanup fields in |DroidSocketImpl|, r=shuang

|DroidSocketImpl| contains several unused fields that are removed
by this patch.
This commit is contained in:
Thomas Zimmermann 2014-08-07 11:37:47 +02:00
Родитель 7b79fafbe7
Коммит b9008c0397
1 изменённых файлов: 3 добавлений и 38 удалений

Просмотреть файл

@ -75,42 +75,13 @@ public:
SOCKET_IS_CONNECTED
};
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer, int aFd)
: ipc::UnixFdWatcher(aIOLoop, aFd)
, mConsumer(aConsumer)
, mShuttingDownOnIOThread(false)
, mChannel(0)
, mAuth(false)
, mEncrypt(false)
, mConnectionStatus(SOCKET_IS_DISCONNECTED)
{ }
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer,
int aChannel, bool aAuth, bool aEncrypt)
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer)
: ipc::UnixFdWatcher(aIOLoop)
, mConsumer(aConsumer)
, mShuttingDownOnIOThread(false)
, mChannel(aChannel)
, mAuth(aAuth)
, mEncrypt(aEncrypt)
, mConnectionStatus(SOCKET_IS_DISCONNECTED)
{ }
DroidSocketImpl(MessageLoop* aIOLoop, BluetoothSocket* aConsumer,
const nsAString& aDeviceAddress,
int aChannel, bool aAuth, bool aEncrypt)
: ipc::UnixFdWatcher(aIOLoop)
, mConsumer(aConsumer)
, mShuttingDownOnIOThread(false)
, mDeviceAddress(aDeviceAddress)
, mChannel(aChannel)
, mAuth(aAuth)
, mEncrypt(aEncrypt)
, mConnectionStatus(SOCKET_IS_DISCONNECTED)
{
MOZ_ASSERT(!mDeviceAddress.IsEmpty());
}
~DroidSocketImpl()
{
MOZ_ASSERT(NS_IsMainThread());
@ -205,10 +176,6 @@ private:
*/
bool mShuttingDownOnIOThread;
nsString mDeviceAddress;
int mChannel;
bool mAuth;
bool mEncrypt;
ConnectionStatus mConnectionStatus;
};
@ -848,8 +815,7 @@ BluetoothSocket::Connect(const nsAString& aDeviceAddress, int aChannel)
MOZ_ASSERT(NS_IsMainThread());
NS_ENSURE_FALSE(mImpl, false);
mImpl = new DroidSocketImpl(XRE_GetIOMessageLoop(), this, aDeviceAddress,
aChannel, mAuth, mEncrypt);
mImpl = new DroidSocketImpl(XRE_GetIOMessageLoop(), this);
// TODO: uuid as argument
sBluetoothSocketInterface->Connect(
@ -896,8 +862,7 @@ BluetoothSocket::Listen(int aChannel)
MOZ_ASSERT(NS_IsMainThread());
NS_ENSURE_FALSE(mImpl, false);
mImpl = new DroidSocketImpl(XRE_GetIOMessageLoop(), this, aChannel, mAuth,
mEncrypt);
mImpl = new DroidSocketImpl(XRE_GetIOMessageLoop(), this);
sBluetoothSocketInterface->Listen(
BluetoothSocketType::RFCOMM,