summaryrefslogtreecommitdiffstats
path: root/device/bluetooth
diff options
context:
space:
mode:
authorkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 03:46:32 +0000
committerkeybuk@chromium.org <keybuk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-12 03:46:32 +0000
commit8654103c577f6602dd9c8300e4ba06886589224c (patch)
tree862a884e32b391e2d4de28603155658c33f6d9d8 /device/bluetooth
parent592b2407313c2b515c17c6e3d6523b1afb5ceac9 (diff)
downloadchromium_src-8654103c577f6602dd9c8300e4ba06886589224c.zip
chromium_src-8654103c577f6602dd9c8300e4ba06886589224c.tar.gz
chromium_src-8654103c577f6602dd9c8300e4ba06886589224c.tar.bz2
Remove BluetoothAdapterFactory::Create
We never used the ability to pull up a particular Bluetooth Adapter by address or device name, and it was never really supported in Windows - and is equally difficult in Mac and in Chromium OS when using the Bluetooth Smart-capable backend. So drop it. BUG=none TEST=device_unittests Review URL: https://chromiumcodereview.appspot.com/12413011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@187476 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth')
-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