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

Unified Diff: chromeos/dbus/bluetooth_input_client.cc

Issue 11743026: Bluetooth: Increment the timeout for Connect dbus call (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 12 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/bluetooth_input_client.cc
diff --git a/chromeos/dbus/bluetooth_input_client.cc b/chromeos/dbus/bluetooth_input_client.cc
index 62d370d664e4f1617ec871eef86616b2a70a8d34..ded2b30050df46adea968252199d04aabd4a7203 100644
--- a/chromeos/dbus/bluetooth_input_client.cc
+++ b/chromeos/dbus/bluetooth_input_client.cc
@@ -18,6 +18,15 @@
#include "dbus/object_proxy.h"
#include "third_party/cros_system_api/dbus/service_constants.h"
+namespace {
+
+// The |Connect| DBus call needs a longer timeout than the default in order to
+// give BlueZ enough time to return the timeout error response.
+// See crosbug.com/37607
+const int kConnectTimeoutMs = 50 * 1000;
+
+} // namespace
+
namespace chromeos {
const char BluetoothInputClient::kNoResponseError[] =
@@ -92,7 +101,7 @@ class BluetoothInputClientImpl: public BluetoothInputClient,
object_proxy->CallMethodWithErrorCallback(
&method_call,
- dbus::ObjectProxy::TIMEOUT_USE_DEFAULT,
+ kConnectTimeoutMs,
base::Bind(&BluetoothInputClientImpl::OnConnect,
weak_ptr_factory_.GetWeakPtr(), object_path,
callback),
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698