Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1897)

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_device.cc

Issue 10854121: Fixes for handling of MockDBusThreadManager::GetSystemBus(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the build for sure Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_network_functions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/bluetooth/bluetooth_device.cc
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_device.cc b/chrome/browser/chromeos/bluetooth/bluetooth_device.cc
index 3fd8969876718d5f0b4b16bbbc1ff1431c214a4a..39fce947c3fc961120a14aed0e963c3e994fdeed 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()->
« no previous file with comments | « no previous file | chrome/browser/chromeos/cros/cros_network_functions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698