summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos.cc9
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos.h10
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos_experimental.cc4
-rw-r--r--device/bluetooth/bluetooth_adapter_chromeos_experimental.h4
-rw-r--r--device/bluetooth/bluetooth_adapter_factory.cc22
-rw-r--r--device/bluetooth/bluetooth_adapter_factory.h3
6 files changed, 3 insertions, 49 deletions
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.cc b/device/bluetooth/bluetooth_adapter_chromeos.cc
index 335cd77..d5e7977 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.cc
+++ b/device/bluetooth/bluetooth_adapter_chromeos.cc
@@ -141,15 +141,6 @@ void BluetoothAdapterChromeOS::TrackDefaultAdapter() {
weak_ptr_factory_.GetWeakPtr()));
}
-void BluetoothAdapterChromeOS::FindAdapter(const std::string& address) {
- VLOG(1) << "Using adapter " << address;
- track_default_ = false;
- DBusThreadManager::Get()->GetBluetoothManagerClient()->
- FindAdapter(address,
- base::Bind(&BluetoothAdapterChromeOS::AdapterCallback,
- weak_ptr_factory_.GetWeakPtr()));
-}
-
void BluetoothAdapterChromeOS::AdapterCallback(
const dbus::ObjectPath& adapter_path,
bool success) {
diff --git a/device/bluetooth/bluetooth_adapter_chromeos.h b/device/bluetooth/bluetooth_adapter_chromeos.h
index 7806b21..093cdd0 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos.h
+++ b/device/bluetooth/bluetooth_adapter_chromeos.h
@@ -74,13 +74,9 @@ class BluetoothAdapterChromeOS
// and tracks future changes to it.
void TrackDefaultAdapter();
- // Obtains the object paht for the adapter named by |address| from the
- // Bluetooth Daemon.
- void FindAdapter(const std::string& address);
-
- // Called by dbus:: in response to the method call sent by both
- // DefaultAdapter() and FindAdapter(), |object_path| will contain the
- // dbus object path of the requested adapter when |success| is true.
+ // Called by dbus:: in response to the method call sent by DefaultAdapter().
+ // |object_path| will contain the dbus object path of the requested adapter
+ // when |success| is true.
void AdapterCallback(const dbus::ObjectPath& adapter_path, bool success);
// BluetoothManagerClient::Observer override.
diff --git a/device/bluetooth/bluetooth_adapter_chromeos_experimental.cc b/device/bluetooth/bluetooth_adapter_chromeos_experimental.cc
index e0991d3..c382f08 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos_experimental.cc
+++ b/device/bluetooth/bluetooth_adapter_chromeos_experimental.cc
@@ -73,8 +73,4 @@ void BluetoothAdapterChromeOSExperimental::ReadLocalOutOfBandPairingData(
void BluetoothAdapterChromeOSExperimental::TrackDefaultAdapter() {
}
-void BluetoothAdapterChromeOSExperimental::FindAdapter(
- const std::string& address) {
-}
-
} // namespace chromeos
diff --git a/device/bluetooth/bluetooth_adapter_chromeos_experimental.h b/device/bluetooth/bluetooth_adapter_chromeos_experimental.h
index 891ca7a..fdb0ca5 100644
--- a/device/bluetooth/bluetooth_adapter_chromeos_experimental.h
+++ b/device/bluetooth/bluetooth_adapter_chromeos_experimental.h
@@ -60,10 +60,6 @@ class BluetoothAdapterChromeOSExperimental
// and tracks future changes to it.
void TrackDefaultAdapter();
- // Obtains the object paht for the adapter named by |address| from the
- // Bluetooth Daemon.
- void FindAdapter(const std::string& address);
-
// Note: This should remain the last member so it'll be destroyed and
// invalidate its weak pointers before any other members are destroyed.
base::WeakPtrFactory<BluetoothAdapterChromeOSExperimental> weak_ptr_factory_;
diff --git a/device/bluetooth/bluetooth_adapter_factory.cc b/device/bluetooth/bluetooth_adapter_factory.cc
index 869a2fd..f772431 100644
--- a/device/bluetooth/bluetooth_adapter_factory.cc
+++ b/device/bluetooth/bluetooth_adapter_factory.cc
@@ -104,26 +104,4 @@ scoped_refptr<BluetoothAdapter> BluetoothAdapterFactory::MaybeGetAdapter() {
return scoped_refptr<BluetoothAdapter>(default_adapter.Get());
}
-// static
-BluetoothAdapter* BluetoothAdapterFactory::Create(const std::string& address) {
- BluetoothAdapter* adapter = NULL;
-#if defined(OS_CHROMEOS)
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- chromeos::switches::kEnableExperimentalBluetooth)) {
- chromeos::BluetoothAdapterChromeOSExperimental* adapter_chromeos =
- new chromeos::BluetoothAdapterChromeOSExperimental;
- adapter_chromeos->FindAdapter(address);
- adapter = adapter_chromeos;
- } else {
- chromeos::BluetoothAdapterChromeOS* adapter_chromeos =
- new chromeos::BluetoothAdapterChromeOS;
- adapter_chromeos->FindAdapter(address);
- adapter = adapter_chromeos;
- }
-#elif defined(OS_WIN)
- adapter = new BluetoothAdapterWin(base::Bind(&RunAdapterCallbacks));
-#endif
- return adapter;
-}
-
} // namespace device
diff --git a/device/bluetooth/bluetooth_adapter_factory.h b/device/bluetooth/bluetooth_adapter_factory.h
index 4975337..3b6a2c2 100644
--- a/device/bluetooth/bluetooth_adapter_factory.h
+++ b/device/bluetooth/bluetooth_adapter_factory.h
@@ -35,9 +35,6 @@ class BluetoothAdapterFactory {
// but may or may not have been initialized.
// It returns NULL if no adapter has been created at the time.
static scoped_refptr<BluetoothAdapter> MaybeGetAdapter();
-
- // Creates an instance for a specific adapter at address |address|.
- static BluetoothAdapter* Create(const std::string& address);
};
} // namespace device