summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/bluetooth
diff options
context:
space:
mode:
authorsatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-13 20:29:52 +0000
committersatorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-08-13 20:29:52 +0000
commit693d0144003f6dc825994efdd39b27dfcac81166 (patch)
treeb7ec02364aab7b07ca5219c979391783c047bebd /chrome/browser/chromeos/bluetooth
parent2e78f92ee0d23210d77ff4f4895501ca8f9d2db6 (diff)
downloadchromium_src-693d0144003f6dc825994efdd39b27dfcac81166.zip
chromium_src-693d0144003f6dc825994efdd39b27dfcac81166.tar.gz
chromium_src-693d0144003f6dc825994efdd39b27dfcac81166.tar.bz2
Fixes for handling of MockDBusThreadManager::GetSystemBus().
This is a patch taken over from zel's original patch: http://codereview.chromium.org/10832258/ BUG=131915 TEST=NetworkScreenTest.* and number of other tests should start passing in BVT CrOS tests TBR=zelidrag@chromium.org Review URL: https://chromiumcodereview.appspot.com/10854121 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@151336 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/bluetooth')
-rw-r--r--chrome/browser/chromeos/bluetooth/bluetooth_device.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
index 3fd8969..39fce94 100644
--- a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
@@ -249,9 +249,13 @@ void BluetoothDevice::Connect(PairingDelegate* pairing_delegate,
agent_path_basename);
dbus::Bus* system_bus = DBusThreadManager::Get()->GetSystemBus();
- agent_.reset(BluetoothAgentServiceProvider::Create(system_bus,
- agent_path,
- this));
+ if (system_bus) {
+ agent_.reset(BluetoothAgentServiceProvider::Create(system_bus,
+ agent_path,
+ this));
+ } else {
+ agent_.reset(NULL);
+ }
DVLOG(1) << "Pairing: " << address_;
DBusThreadManager::Get()->GetBluetoothAdapterClient()->