Bug 1173266 - [cleanup] Remove unused |isConnected| from bluetooth2, r=tzimmermann
authorBen Tian <btian@mozilla.com>
Wed, 05 Aug 2015 15:19:43 +0800
changeset 288048 f9cac61e12353feda19306c1f87907bb008c60e5
parent 288047 eadf97ca605e55aa55752b7ec6d107f46adeb9d1
child 288049 58c131a75dd9a6a0bfaaba50fffa94c5884dd042
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstzimmermann
bugs1173266
milestone42.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 1173266 - [cleanup] Remove unused |isConnected| from bluetooth2, r=tzimmermann
dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
dom/bluetooth/bluetooth2/BluetoothService.h
dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.cpp
dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.h
dom/bluetooth/bluez/BluetoothDBusService.cpp
dom/bluetooth/bluez/BluetoothDBusService.h
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.cpp
@@ -1463,21 +1463,17 @@ void
 BluetoothServiceBluedroid::Disconnect(
   const nsAString& aDeviceAddress, uint16_t aServiceUuid,
   BluetoothReplyRunnable* aRunnable)
 {
   ConnectDisconnect(false, aDeviceAddress, aRunnable, aServiceUuid);
 }
 
 #ifndef MOZ_B2G_BT_API_V1
-bool
-BluetoothServiceBluedroid::IsConnected(uint16_t aProfileId)
-{
-  return true;
-}
+  // Missing in bluetooth2
 #else
 void
 BluetoothServiceBluedroid::IsConnected(const uint16_t aServiceUuid,
                                        BluetoothReplyRunnable* aRunnable)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aRunnable);
 
--- a/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
+++ b/dom/bluetooth/bluedroid/BluetoothServiceBluedroid.h
@@ -154,18 +154,17 @@ public:
 
   virtual void
   Connect(const nsAString& aDeviceAddress,
           uint32_t aCod,
           uint16_t aServiceUuid,
           BluetoothReplyRunnable* aRunnable);
 
 #ifndef MOZ_B2G_BT_API_V1
-  virtual bool
-  IsConnected(uint16_t aProfileId);
+  // Missing in bluetooth2
 #else
   virtual void
   IsConnected(const uint16_t aServiceUuid,
               BluetoothReplyRunnable* aRunnable) override;
 #endif
 
   virtual void
   Disconnect(const nsAString& aDeviceAddress, uint16_t aServiceUuid,
--- a/dom/bluetooth/bluetooth2/BluetoothService.h
+++ b/dom/bluetooth/bluetooth2/BluetoothService.h
@@ -277,19 +277,16 @@ public:
   virtual void
   Connect(const nsAString& aDeviceAddress, uint32_t aCod, uint16_t aServiceUuid,
           BluetoothReplyRunnable* aRunnable) = 0;
 
   virtual void
   Disconnect(const nsAString& aDeviceAddress, uint16_t aServiceUuid,
              BluetoothReplyRunnable* aRunnable) = 0;
 
-  virtual bool
-  IsConnected(uint16_t aServiceUuid) = 0;
-
   virtual void
   SendFile(const nsAString& aDeviceAddress,
            BlobParent* aBlobParent,
            BlobChild* aBlobChild,
            BluetoothReplyRunnable* aRunnable) = 0;
 
   virtual void
   SendFile(const nsAString& aDeviceAddress,
--- a/dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.cpp
+++ b/dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.cpp
@@ -552,22 +552,16 @@ BluetoothServiceChildProcess::HandleShut
   // If this process is shutting down then we need to disconnect ourselves from
   // the parent.
   if (sBluetoothChild) {
     sBluetoothChild->BeginShutdown();
   }
   return NS_OK;
 }
 
-bool
-BluetoothServiceChildProcess::IsConnected(uint16_t aServiceUuid)
-{
-  MOZ_CRASH("This should never be called!");
-}
-
 nsresult
 BluetoothServiceChildProcess::SendSinkMessage(const nsAString& aDeviceAddresses,
                                               const nsAString& aMessage)
 {
   MOZ_CRASH("This should never be called!");
 }
 
 nsresult
--- a/dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.h
+++ b/dom/bluetooth/bluetooth2/ipc/BluetoothServiceChildProcess.h
@@ -124,19 +124,16 @@ public:
           uint16_t aServiceUuid,
           BluetoothReplyRunnable* aRunnable) override;
 
   virtual void
   Disconnect(const nsAString& aDeviceAddress,
              uint16_t aServiceUuid,
              BluetoothReplyRunnable* aRunnable) override;
 
-  virtual bool
-  IsConnected(uint16_t aServiceUuid) override;
-
   virtual void
   SendFile(const nsAString& aDeviceAddress,
            BlobParent* aBlobParent,
            BlobChild* aBlobChild,
            BluetoothReplyRunnable* aRunnable) override;
 
   virtual void
   SendFile(const nsAString& aDeviceAddress,
--- a/dom/bluetooth/bluez/BluetoothDBusService.cpp
+++ b/dom/bluetooth/bluez/BluetoothDBusService.cpp
@@ -3710,31 +3710,17 @@ void
 BluetoothDBusService::Disconnect(const nsAString& aDeviceAddress,
                                  uint16_t aServiceUuid,
                                  BluetoothReplyRunnable* aRunnable)
 {
   ConnectDisconnect(false, aDeviceAddress, aRunnable, aServiceUuid);
 }
 
 #ifndef MOZ_B2G_BT_API_V1
-bool
-BluetoothDBusService::IsConnected(const uint16_t aServiceUuid)
-{
-  MOZ_ASSERT(NS_IsMainThread());
-
-  BluetoothProfileManagerBase* profile =
-    BluetoothUuidHelper::GetBluetoothProfileManager(aServiceUuid);
-  if (!profile) {
-    BT_WARNING(ERR_UNKNOWN_PROFILE);
-    return false;
-  }
-
-  NS_ENSURE_TRUE(profile, false);
-  return profile->IsConnected();
-}
+  // Missing in bluetooth2
 #else
 void
 BluetoothDBusService::IsConnected(const uint16_t aServiceUuid,
                                   BluetoothReplyRunnable* aRunnable)
 {
   MOZ_ASSERT(NS_IsMainThread());
   MOZ_ASSERT(aRunnable);
 
--- a/dom/bluetooth/bluez/BluetoothDBusService.h
+++ b/dom/bluetooth/bluez/BluetoothDBusService.h
@@ -149,18 +149,17 @@ public:
 
   virtual void
   Connect(const nsAString& aDeviceAddress,
           uint32_t aCod,
           uint16_t aServiceUuid,
           BluetoothReplyRunnable* aRunnable) override;
 
 #ifndef MOZ_B2G_BT_API_V1
-  virtual bool
-  IsConnected(uint16_t aServiceUuid) override;
+  // Missing in bluetooth2
 #else
   virtual void
   IsConnected(const uint16_t aServiceUuid,
               BluetoothReplyRunnable* aRunnable) override;
 #endif
 
   virtual void
   Disconnect(const nsAString& aDeviceAddress, uint16_t aServiceUuid,