mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Rename blacklist to blocklist
This commit is contained in:
parent
870841099a
commit
f98fbecfda
26 changed files with 181 additions and 181 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
use bluetooth_traits::{BluetoothError, BluetoothRequest};
|
||||
use bluetooth_traits::{BluetoothResponse, BluetoothResponseListener, BluetoothResponseResult};
|
||||
use bluetooth_traits::blacklist::{Blacklist, uuid_is_blacklisted};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use bluetooth_traits::scanfilter::{BluetoothScanfilter, BluetoothScanfilterSequence};
|
||||
use bluetooth_traits::scanfilter::{RequestDeviceoptions, ServiceUUIDSequence};
|
||||
use core::clone::Clone;
|
||||
|
@ -193,9 +193,9 @@ fn convert_request_device_options(filters: &Option<Vec<BluetoothRequestDeviceFil
|
|||
let uuid = try!(BluetoothUUID::service(opt_service.clone())).to_string();
|
||||
|
||||
// Step 2.7.
|
||||
// Note: What we are doing here is adding the not blacklisted UUIDs to the result vector,
|
||||
// instead of removing them from an already filled vector.
|
||||
if !uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
// Note: What we are doing here is adding the not blocklisted UUIDs to the result vector,
|
||||
// insted of removing them from an already filled vector.
|
||||
if !uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
optional_services_uuids.push(uuid);
|
||||
}
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ fn canonicalize_filter(filter: &BluetoothRequestDeviceFilter) -> Fallible<Blueto
|
|||
let uuid = try!(BluetoothUUID::service(service.clone())).to_string();
|
||||
|
||||
// Step 2.4.3.4.
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
return Err(Security)
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ fn canonicalize_filter(filter: &BluetoothRequestDeviceFilter) -> Fallible<Blueto
|
|||
let uuid = try!(BluetoothUUID::service(service_data_uuid.clone())).to_string();
|
||||
|
||||
// Step 2.4.7.3.
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
return Err(Security)
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
|
||||
use bluetooth_traits::blacklist::{Blacklist, uuid_is_blacklisted};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::BluetoothCharacteristicPropertiesBinding::
|
||||
BluetoothCharacteristicPropertiesMethods;
|
||||
|
@ -110,7 +110,7 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
|
|||
return p;
|
||||
}
|
||||
};
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
|
|||
}
|
||||
};
|
||||
if let Some(ref uuid) = uuid {
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -167,7 +167,7 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
|
|||
fn ReadValue(&self) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p_cx = p.global().get_cx();
|
||||
if uuid_is_blacklisted(self.uuid.as_ref(), Blacklist::Reads) {
|
||||
if uuid_is_blocklisted(self.uuid.as_ref(), Blocklist::Reads) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ impl BluetoothRemoteGATTCharacteristicMethods for BluetoothRemoteGATTCharacteris
|
|||
fn WriteValue(&self, value: Vec<u8>) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p_cx = p.global().get_cx();
|
||||
if uuid_is_blacklisted(self.uuid.as_ref(), Blacklist::Writes) {
|
||||
if uuid_is_blocklisted(self.uuid.as_ref(), Blocklist::Writes) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
|
||||
use bluetooth_traits::blacklist::{Blacklist, uuid_is_blacklisted};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use dom::bindings::cell::DOMRefCell;
|
||||
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
|
||||
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTCharacteristicBinding::
|
||||
|
@ -90,7 +90,7 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
|
|||
fn ReadValue(&self) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p_cx = p.global().get_cx();
|
||||
if uuid_is_blacklisted(self.uuid.as_ref(), Blacklist::Reads) {
|
||||
if uuid_is_blocklisted(self.uuid.as_ref(), Blocklist::Reads) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -109,7 +109,7 @@ impl BluetoothRemoteGATTDescriptorMethods for BluetoothRemoteGATTDescriptor {
|
|||
fn WriteValue(&self, value: Vec<u8>) -> Rc<Promise> {
|
||||
let p = Promise::new(&self.global());
|
||||
let p_cx = p.global().get_cx();
|
||||
if uuid_is_blacklisted(self.uuid.as_ref(), Blacklist::Writes) {
|
||||
if uuid_is_blocklisted(self.uuid.as_ref(), Blocklist::Writes) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
|
||||
use bluetooth_traits::blacklist::{Blacklist, uuid_is_blacklisted};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
|
||||
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding;
|
||||
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
|
||||
|
@ -101,7 +101,7 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
|
|||
return p;
|
||||
}
|
||||
};
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -130,7 +130,7 @@ impl BluetoothRemoteGATTServerMethods for BluetoothRemoteGATTServer {
|
|||
}
|
||||
};
|
||||
if let Some(ref uuid) = uuid {
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use bluetooth_traits::{BluetoothRequest, BluetoothResponse};
|
||||
use bluetooth_traits::blacklist::{Blacklist, uuid_is_blacklisted};
|
||||
use bluetooth_traits::blocklist::{Blocklist, uuid_is_blocklisted};
|
||||
use dom::bindings::codegen::Bindings::BluetoothDeviceBinding::BluetoothDeviceMethods;
|
||||
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerMethods;
|
||||
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServiceBinding;
|
||||
|
@ -105,7 +105,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
|
|||
return p;
|
||||
}
|
||||
};
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
|
|||
}
|
||||
};
|
||||
if let Some(ref uuid) = uuid {
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
|
|||
return p;
|
||||
}
|
||||
};
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
@ -200,7 +200,7 @@ impl BluetoothRemoteGATTServiceMethods for BluetoothRemoteGATTService {
|
|||
}
|
||||
};
|
||||
if let Some(ref uuid) = uuid {
|
||||
if uuid_is_blacklisted(uuid.as_ref(), Blacklist::All) {
|
||||
if uuid_is_blocklisted(uuid.as_ref(), Blocklist::All) {
|
||||
p.reject_error(p_cx, Security);
|
||||
return p;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue