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

Unified Diff: content/browser/bluetooth/web_bluetooth_service_impl.h

Issue 2019853002: bluetooth: Use WebBluetoothDeviceId instead of string (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-uuid-typemap
Patch Set: Address jyasskin's comments Created 4 years, 6 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: content/browser/bluetooth/web_bluetooth_service_impl.h
diff --git a/content/browser/bluetooth/web_bluetooth_service_impl.h b/content/browser/bluetooth/web_bluetooth_service_impl.h
index 9940f0f7b7a07b0bf45a609f5719bb4d9ee1e27a..e4e625ac19a2c6aadd200eb5357c5ad21328c7c1 100644
--- a/content/browser/bluetooth/web_bluetooth_service_impl.h
+++ b/content/browser/bluetooth/web_bluetooth_service_impl.h
@@ -97,11 +97,11 @@ class WebBluetoothServiceImpl : public blink::mojom::WebBluetoothService,
void RequestDevice(blink::mojom::WebBluetoothRequestDeviceOptionsPtr options,
const RequestDeviceCallback& callback) override;
void RemoteServerConnect(
- const mojo::String& device_id,
+ const BluetoothDeviceId& device_id,
const RemoteServerConnectCallback& callback) override;
- void RemoteServerDisconnect(const mojo::String& device_id) override;
+ void RemoteServerDisconnect(const BluetoothDeviceId& device_id) override;
void RemoteServerGetPrimaryService(
- const mojo::String& device_id,
+ const BluetoothDeviceId& device_id,
const base::Optional<device::BluetoothUUID>& service_uuid,
const RemoteServerGetPrimaryServiceCallback& callback) override;
void RemoteServiceGetCharacteristics(
@@ -145,12 +145,11 @@ class WebBluetoothServiceImpl : public blink::mojom::WebBluetoothService,
// Callbacks for BluetoothDevice::CreateGattConnection.
void OnCreateGATTConnectionSuccess(
- const std::string& device_id,
+ const BluetoothDeviceId& device_id,
base::TimeTicks start_time,
const RemoteServerConnectCallback& callback,
std::unique_ptr<device::BluetoothGattConnection> connection);
void OnCreateGATTConnectionFailed(
- const std::string& device_id,
base::TimeTicks start_time,
const RemoteServerConnectCallback& callback,
device::BluetoothDevice::ConnectErrorCode error_code);
@@ -192,7 +191,7 @@ class WebBluetoothServiceImpl : public blink::mojom::WebBluetoothService,
// Queries the platform cache for a Device with |device_id| for |origin|.
// Fills in the |outcome| field and the |device| field if successful.
- CacheQueryResult QueryCacheForDevice(const std::string& device_id);
+ CacheQueryResult QueryCacheForDevice(const BluetoothDeviceId& device_id);
// Queries the platform cache for a Service with |service_instance_id|. Fills
// in the |outcome| field, and |device| and |service| fields if successful.

Powered by Google App Engine
This is Rietveld 408576698