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

Unified Diff: device/bluetooth/bluetooth_device.h

Issue 180163009: chrome.bluetooth API improvements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix threading ownership related to ApiResourceManager<BluetoothApiSocket> and BluetoothSocketEventD… Created 6 years, 9 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
Index: device/bluetooth/bluetooth_device.h
diff --git a/device/bluetooth/bluetooth_device.h b/device/bluetooth/bluetooth_device.h
index cb1e7ec6994f4ad565b5c5d2a36e9f0d795079ac..8e46cbd34fa358a9c3bf70e757ff0a1820095a53 100644
--- a/device/bluetooth/bluetooth_device.h
+++ b/device/bluetooth/bluetooth_device.h
@@ -11,6 +11,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_vector.h"
#include "base/strings/string16.h"
+#include "net/base/net_log.h"
namespace device {
@@ -240,7 +241,7 @@ class BluetoothDevice {
// The ErrorCallback is used for methods that can fail in which case it
// is called, in the success case the callback is simply not called.
- typedef base::Callback<void()> ErrorCallback;
+ typedef base::Callback<void(const std::string&)> ErrorCallback;
// The ConnectErrorCallback is used for methods that can fail with an error,
// passed back as an error code argument to this callback.
@@ -356,9 +357,14 @@ class BluetoothDevice {
// identified by |profile|, on success the profile's connection callback
// will be called as well as |callback|; on failure |error_callback| will be
// called.
- virtual void ConnectToProfile(BluetoothProfile* profile,
- const base::Closure& callback,
- const ErrorCallback& error_callback) = 0;
+ virtual void ConnectToProfile(
+ BluetoothProfile* profile,
+ scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
+ scoped_refptr<base::SequencedTaskRunner> file_task_runner,
+ net::NetLog* net_log,
+ const net::NetLog::Source& source,
keybuk 2014/03/14 21:13:48 What's the justification for these added parameter
rpaquay 2014/03/14 21:48:09 That is a good point, the task runners definitely
rpaquay 2014/03/20 00:48:18 Done.
+ const base::Closure& callback,
+ const ErrorCallback& error_callback) = 0;
// Sets the Out Of Band pairing data for this device to |data|. Exactly one
// of |callback| or |error_callback| will be run.

Powered by Google App Engine
This is Rietveld 408576698