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

Unified Diff: device/bluetooth/bluetooth_device_win.h

Issue 424093004: Improve processing of Bluetooth device discovery on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address code review feedback (nits and memory leak). Created 6 years, 5 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 | « device/bluetooth/bluetooth_adapter_win_unittest.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/bluetooth/bluetooth_device_win.h
diff --git a/device/bluetooth/bluetooth_device_win.h b/device/bluetooth/bluetooth_device_win.h
index aa262bd48d445cf434855092c202a92c11b8b08d..8479fbe6b94f28e01182270f2f2dc675aaad2033 100644
--- a/device/bluetooth/bluetooth_device_win.h
+++ b/device/bluetooth/bluetooth_device_win.h
@@ -22,9 +22,9 @@ class BluetoothSocketThread;
class BluetoothDeviceWin : public BluetoothDevice {
public:
explicit BluetoothDeviceWin(
- const BluetoothTaskManagerWin::DeviceState& state,
- scoped_refptr<base::SequencedTaskRunner> ui_task_runner,
- scoped_refptr<BluetoothSocketThread> socket_thread,
+ const BluetoothTaskManagerWin::DeviceState& device_state,
+ const scoped_refptr<base::SequencedTaskRunner>& ui_task_runner,
+ const scoped_refptr<BluetoothSocketThread>& socket_thread,
net::NetLog* net_log,
const net::NetLog::Source& net_log_source);
virtual ~BluetoothDeviceWin();
@@ -76,6 +76,14 @@ class BluetoothDeviceWin : public BluetoothDevice {
const BluetoothServiceRecordWin* GetServiceRecord(
const device::BluetoothUUID& uuid) const;
+ // Returns true if all fields and services of this instance are equal to the
+ // fields and services stored in |device_state|.
+ bool IsEqual(const BluetoothTaskManagerWin::DeviceState& device_state);
+
+ // Updates this instance with all fields and properties stored in
+ // |device_state|.
+ void Update(const BluetoothTaskManagerWin::DeviceState& device_state);
+
protected:
// BluetoothDevice override
virtual std::string GetDeviceName() const OVERRIDE;
@@ -87,6 +95,9 @@ class BluetoothDeviceWin : public BluetoothDevice {
// discovery.
void SetVisible(bool visible);
+ // Updates the services with services stored in |device_state|.
+ void UpdateServices(const BluetoothTaskManagerWin::DeviceState& device_state);
+
scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
scoped_refptr<BluetoothSocketThread> socket_thread_;
net::NetLog* net_log_;
« no previous file with comments | « device/bluetooth/bluetooth_adapter_win_unittest.cc ('k') | device/bluetooth/bluetooth_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698