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

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

Issue 2459523002: bluetooth: Return specific error if getPrimaryServices() is called without requesting access to any… (Closed)
Patch Set: Use script-tests pattern Created 4 years, 1 month 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/bluetooth_allowed_devices_map.h
diff --git a/content/browser/bluetooth/bluetooth_allowed_devices_map.h b/content/browser/bluetooth/bluetooth_allowed_devices_map.h
index 86dadd2143da07e4c07a8d14ddeb5563624569f7..50073f2aa399f9bde97b7c981b41388117c0e012 100644
--- a/content/browser/bluetooth/bluetooth_allowed_devices_map.h
+++ b/content/browser/bluetooth/bluetooth_allowed_devices_map.h
@@ -59,6 +59,12 @@ class CONTENT_EXPORT BluetoothAllowedDevicesMap final {
const std::string& GetDeviceAddress(const url::Origin& origin,
const WebBluetoothDeviceId& device_id);
+ // Returns true if the origin has previously been granted access to at least
+ // one service.
+ bool IsOriginAllowedToAccessAtLeastOneService(
ortuno 2016/11/03 21:31:21 Ah sorry for not noticing earlier. Please add test
François Beaufort 2016/11/04 09:57:26 Done.
+ const url::Origin& origin,
+ const WebBluetoothDeviceId& device_id) const;
+
// Returns true if the origin has previously been granted access to
// the service.
bool IsOriginAllowedToAccessService(

Powered by Google App Engine
This is Rietveld 408576698