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

Side by Side Diff: components/proximity_auth/bluetooth_util.h

Issue 652403002: [Clean up] Expose ConnectToServiceInsecurely as a BluetoothDevice API on all platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase: Restore deps rather than public_deps Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H 5 #ifndef COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H
6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H 6 #define COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback_forward.h" 10 #include "base/callback_forward.h"
11 #include "device/bluetooth/bluetooth_device.h"
12 11
13 namespace device { 12 namespace base {
14 class BluetoothUUID; 13 class TaskRunner;
15 } 14 }
16 15
17 namespace proximity_auth { 16 namespace proximity_auth {
18 namespace bluetooth_util { 17 namespace bluetooth_util {
19 18
20 typedef base::Callback<void(const std::string& error_message)> ErrorCallback; 19 typedef base::Callback<void(const std::string& error_message)> ErrorCallback;
21 20
22 // Connects to the SDP service on the Bluetooth device with the given 21 // Connects to the SDP service on the Bluetooth device with the given
23 // |device_address|, if possible. Calls the |callback| on success, or the 22 // |device_address|, if possible. Calls the |callback| on success, or the
24 // |error_callback| with an error message on failure. Because this can be an 23 // |error_callback| with an error message on failure. Because this can be an
25 // expensive operation, the work will be run on the provided |task_runner|, 24 // expensive operation, the work will be run on the provided |task_runner|,
26 // which should correspond to a background thread. 25 // which should correspond to a background thread.
27 void SeekDeviceByAddress(const std::string& device_address, 26 void SeekDeviceByAddress(const std::string& device_address,
28 const base::Closure& callback, 27 const base::Closure& callback,
29 const ErrorCallback& error_callback, 28 const ErrorCallback& error_callback,
30 base::TaskRunner* task_runner); 29 base::TaskRunner* task_runner);
31 30
32 void ConnectToServiceInsecurely(
33 device::BluetoothDevice* device,
34 const device::BluetoothUUID& uuid,
35 const device::BluetoothDevice::ConnectToServiceCallback& callback,
36 const device::BluetoothDevice::ConnectToServiceErrorCallback&
37 error_callback);
38
39 } // namespace bluetooth_util 31 } // namespace bluetooth_util
40 } // namespace proximity_auth 32 } // namespace proximity_auth
41 33
42 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H 34 #endif // COMPONENTS_PROXIMITY_AUTH_BLUETOOTH_UTIL_H
OLDNEW
« no previous file with comments | « components/proximity_auth/bluetooth_connection_unittest.cc ('k') | components/proximity_auth/bluetooth_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698