| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ | 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ |
| 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ | 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 // Malformed pairs in the string are ignored, including invalid UUID or | 58 // Malformed pairs in the string are ignored, including invalid UUID or |
| 59 // exclusion values. Duplicate UUIDs follow Add()'s merging rule. | 59 // exclusion values. Duplicate UUIDs follow Add()'s merging rule. |
| 60 void Add(base::StringPiece blocklist_string); | 60 void Add(base::StringPiece blocklist_string); |
| 61 | 61 |
| 62 // Returns if a UUID is excluded from all operations. UUID must be valid. | 62 // Returns if a UUID is excluded from all operations. UUID must be valid. |
| 63 bool IsExcluded(const device::BluetoothUUID&) const; | 63 bool IsExcluded(const device::BluetoothUUID&) const; |
| 64 | 64 |
| 65 // Returns if any UUID in a set of filters is excluded from all operations. | 65 // Returns if any UUID in a set of filters is excluded from all operations. |
| 66 // UUID must be valid. | 66 // UUID must be valid. |
| 67 bool IsExcluded( | 67 bool IsExcluded( |
| 68 const mojo::Array<blink::mojom::WebBluetoothScanFilterPtr>& filters); | 68 const std::vector<blink::mojom::WebBluetoothScanFilterPtr>& filters); |
| 69 | 69 |
| 70 // Returns if a UUID is excluded from read operations. UUID must be valid. | 70 // Returns if a UUID is excluded from read operations. UUID must be valid. |
| 71 bool IsExcludedFromReads(const device::BluetoothUUID&) const; | 71 bool IsExcludedFromReads(const device::BluetoothUUID&) const; |
| 72 | 72 |
| 73 // Returns if a UUID is excluded from write operations. UUID must be valid. | 73 // Returns if a UUID is excluded from write operations. UUID must be valid. |
| 74 bool IsExcludedFromWrites(const device::BluetoothUUID&) const; | 74 bool IsExcludedFromWrites(const device::BluetoothUUID&) const; |
| 75 | 75 |
| 76 // Modifies |options->optional_services|, removing any UUIDs with | 76 // Modifies |options->optional_services|, removing any UUIDs with |
| 77 // Value::EXCLUDE. | 77 // Value::EXCLUDE. |
| 78 void RemoveExcludedUUIDs( | 78 void RemoveExcludedUUIDs( |
| (...skipping 18 matching lines...) Expand all Loading... |
| 97 | 97 |
| 98 // Map of UUID to blocklisted value. | 98 // Map of UUID to blocklisted value. |
| 99 std::map<device::BluetoothUUID, Value> blocklisted_uuids_; | 99 std::map<device::BluetoothUUID, Value> blocklisted_uuids_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(BluetoothBlocklist); | 101 DISALLOW_COPY_AND_ASSIGN(BluetoothBlocklist); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace content | 104 } // namespace content |
| 105 | 105 |
| 106 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ | 106 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_BLOCKLIST_H_ |
| OLD | NEW |