Skip to content

Commit d08cfce

Browse files
authored
chore: use more inclusive language in a few places (electron#24023)
* chore: use more inclusive language in lint script * whitelist -> allowed_extension_ids in plugin_utils * some other places
1 parent b2ef299 commit d08cfce

File tree

4 files changed

+17
-16
lines changed

4 files changed

+17
-16
lines changed

docs/api/structures/trace-config.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* `trace_buffer_size_in_events` number (optional) - maximum size of the trace
77
recording buffer in events.
88
* `enable_argument_filter` boolean (optional) - if true, filter event data
9-
according to a whitelist of events that have been manually vetted to not
9+
according to a specific list of events that have been manually vetted to not
1010
include any PII. See [the implementation in
1111
Chromium][trace_event_args_whitelist.cc] for specifics.
1212
* `included_categories` String[] (optional) - a list of tracing categories to

script/lint.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const path = require('path');
1010
const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
1111
const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools');
1212

13-
const BLACKLIST = new Set([
13+
const IGNORELIST = new Set([
1414
['shell', 'browser', 'resources', 'win', 'resource.h'],
1515
['shell', 'browser', 'notifications', 'mac', 'notification_center_delegate.h'],
1616
['shell', 'browser', 'ui', 'cocoa', 'event_dispatching_window.h'],
@@ -232,16 +232,16 @@ async function findMatchingFiles (top, test) {
232232

233233
async function findFiles (args, linter) {
234234
let filenames = [];
235-
let whitelist = null;
235+
let includelist = null;
236236

237-
// build the whitelist
237+
// build the includelist
238238
if (args.changed) {
239-
whitelist = await findChangedFiles(SOURCE_ROOT);
240-
if (!whitelist.size) {
239+
includelist = await findChangedFiles(SOURCE_ROOT);
240+
if (!includelist.size) {
241241
return [];
242242
}
243243
} else if (args.only) {
244-
whitelist = new Set(args._.map(p => path.resolve(p)));
244+
includelist = new Set(args._.map(p => path.resolve(p)));
245245
}
246246

247247
// accumulate the raw list of files
@@ -258,12 +258,12 @@ async function findFiles (args, linter) {
258258
filenames = filenames.filter(fileName => !ignoreFiles.has(fileName));
259259
}
260260

261-
// remove blacklisted files
262-
filenames = filenames.filter(x => !BLACKLIST.has(x));
261+
// remove ignored files
262+
filenames = filenames.filter(x => !IGNORELIST.has(x));
263263

264-
// if a whitelist exists, remove anything not in it
265-
if (whitelist) {
266-
filenames = filenames.filter(x => whitelist.has(x));
264+
// if a includelist exists, remove anything not in it
265+
if (includelist) {
266+
filenames = filenames.filter(x => includelist.has(x));
267267
}
268268

269269
// it's important that filenames be relative otherwise clang-format will

shell/browser/plugins/plugin_utils.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
3636
content::BrowserContext* browser_context) {
3737
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
3838
#if BUILDFLAG(ENABLE_EXTENSIONS)
39-
std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
39+
std::vector<std::string> allowed_extension_ids =
40+
MimeTypesHandler::GetMIMETypeWhitelist();
4041
// Go through the white-listed extensions and try to use them to intercept
4142
// the URL request.
42-
for (const std::string& extension_id : whitelist) {
43+
for (const std::string& extension_id : allowed_extension_ids) {
4344
const extensions::Extension* extension =
4445
extensions::ExtensionRegistry::Get(browser_context)
4546
->enabled_extensions()

shell/renderer/electron_renderer_pepper_host_factory.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ ElectronRendererPepperHostFactory::CreateResourceHost(
9595

9696
// Permissions for the following interfaces will be checked at the
9797
// time of the corresponding instance's method calls. Currently these
98-
// interfaces are available only for whitelisted apps which may not have
99-
// access to the other private interfaces.
98+
// interfaces are available only for specifically permitted apps which may
99+
// not have access to the other private interfaces.
100100
switch (message.type()) {
101101
case PpapiHostMsg_UMA_Create::ID: {
102102
return std::make_unique<PepperUMAHost>(host_, instance, resource);

0 commit comments

Comments
 (0)