chore: use more inclusive language in a few places (#24023)
* chore: use more inclusive language in lint script * whitelist -> allowed_extension_ids in plugin_utils * some other places
This commit is contained in:
parent
b2ef299efc
commit
d08cfce6cb
4 changed files with 17 additions and 16 deletions
|
@ -6,7 +6,7 @@
|
||||||
* `trace_buffer_size_in_events` number (optional) - maximum size of the trace
|
* `trace_buffer_size_in_events` number (optional) - maximum size of the trace
|
||||||
recording buffer in events.
|
recording buffer in events.
|
||||||
* `enable_argument_filter` boolean (optional) - if true, filter event data
|
* `enable_argument_filter` boolean (optional) - if true, filter event data
|
||||||
according to a whitelist of events that have been manually vetted to not
|
according to a specific list of events that have been manually vetted to not
|
||||||
include any PII. See [the implementation in
|
include any PII. See [the implementation in
|
||||||
Chromium][trace_event_args_whitelist.cc] for specifics.
|
Chromium][trace_event_args_whitelist.cc] for specifics.
|
||||||
* `included_categories` String[] (optional) - a list of tracing categories to
|
* `included_categories` String[] (optional) - a list of tracing categories to
|
||||||
|
|
|
@ -10,7 +10,7 @@ const path = require('path');
|
||||||
const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
|
const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
|
||||||
const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools');
|
const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools');
|
||||||
|
|
||||||
const BLACKLIST = new Set([
|
const IGNORELIST = new Set([
|
||||||
['shell', 'browser', 'resources', 'win', 'resource.h'],
|
['shell', 'browser', 'resources', 'win', 'resource.h'],
|
||||||
['shell', 'browser', 'notifications', 'mac', 'notification_center_delegate.h'],
|
['shell', 'browser', 'notifications', 'mac', 'notification_center_delegate.h'],
|
||||||
['shell', 'browser', 'ui', 'cocoa', 'event_dispatching_window.h'],
|
['shell', 'browser', 'ui', 'cocoa', 'event_dispatching_window.h'],
|
||||||
|
@ -232,16 +232,16 @@ async function findMatchingFiles (top, test) {
|
||||||
|
|
||||||
async function findFiles (args, linter) {
|
async function findFiles (args, linter) {
|
||||||
let filenames = [];
|
let filenames = [];
|
||||||
let whitelist = null;
|
let includelist = null;
|
||||||
|
|
||||||
// build the whitelist
|
// build the includelist
|
||||||
if (args.changed) {
|
if (args.changed) {
|
||||||
whitelist = await findChangedFiles(SOURCE_ROOT);
|
includelist = await findChangedFiles(SOURCE_ROOT);
|
||||||
if (!whitelist.size) {
|
if (!includelist.size) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
} else if (args.only) {
|
} else if (args.only) {
|
||||||
whitelist = new Set(args._.map(p => path.resolve(p)));
|
includelist = new Set(args._.map(p => path.resolve(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// accumulate the raw list of files
|
// accumulate the raw list of files
|
||||||
|
@ -258,12 +258,12 @@ async function findFiles (args, linter) {
|
||||||
filenames = filenames.filter(fileName => !ignoreFiles.has(fileName));
|
filenames = filenames.filter(fileName => !ignoreFiles.has(fileName));
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove blacklisted files
|
// remove ignored files
|
||||||
filenames = filenames.filter(x => !BLACKLIST.has(x));
|
filenames = filenames.filter(x => !IGNORELIST.has(x));
|
||||||
|
|
||||||
// if a whitelist exists, remove anything not in it
|
// if a includelist exists, remove anything not in it
|
||||||
if (whitelist) {
|
if (includelist) {
|
||||||
filenames = filenames.filter(x => whitelist.has(x));
|
filenames = filenames.filter(x => includelist.has(x));
|
||||||
}
|
}
|
||||||
|
|
||||||
// it's important that filenames be relative otherwise clang-format will
|
// it's important that filenames be relative otherwise clang-format will
|
||||||
|
|
|
@ -36,10 +36,11 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
|
||||||
content::BrowserContext* browser_context) {
|
content::BrowserContext* browser_context) {
|
||||||
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
|
base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
|
||||||
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
#if BUILDFLAG(ENABLE_EXTENSIONS)
|
||||||
std::vector<std::string> whitelist = MimeTypesHandler::GetMIMETypeWhitelist();
|
std::vector<std::string> allowed_extension_ids =
|
||||||
|
MimeTypesHandler::GetMIMETypeWhitelist();
|
||||||
// Go through the white-listed extensions and try to use them to intercept
|
// Go through the white-listed extensions and try to use them to intercept
|
||||||
// the URL request.
|
// the URL request.
|
||||||
for (const std::string& extension_id : whitelist) {
|
for (const std::string& extension_id : allowed_extension_ids) {
|
||||||
const extensions::Extension* extension =
|
const extensions::Extension* extension =
|
||||||
extensions::ExtensionRegistry::Get(browser_context)
|
extensions::ExtensionRegistry::Get(browser_context)
|
||||||
->enabled_extensions()
|
->enabled_extensions()
|
||||||
|
|
|
@ -95,8 +95,8 @@ ElectronRendererPepperHostFactory::CreateResourceHost(
|
||||||
|
|
||||||
// Permissions for the following interfaces will be checked at the
|
// Permissions for the following interfaces will be checked at the
|
||||||
// time of the corresponding instance's method calls. Currently these
|
// time of the corresponding instance's method calls. Currently these
|
||||||
// interfaces are available only for whitelisted apps which may not have
|
// interfaces are available only for specifically permitted apps which may
|
||||||
// access to the other private interfaces.
|
// not have access to the other private interfaces.
|
||||||
switch (message.type()) {
|
switch (message.type()) {
|
||||||
case PpapiHostMsg_UMA_Create::ID: {
|
case PpapiHostMsg_UMA_Create::ID: {
|
||||||
return std::make_unique<PepperUMAHost>(host_, instance, resource);
|
return std::make_unique<PepperUMAHost>(host_, instance, resource);
|
||||||
|
|
Loading…
Add table
Reference in a new issue