Browse Source

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
Jeremy Rose 4 years ago
parent
commit
d08cfce6cb

+ 1 - 1
docs/api/structures/trace-config.md

@@ -6,7 +6,7 @@
 * `trace_buffer_size_in_events` number (optional) - maximum size of the trace
   recording buffer in events.
 * `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
   Chromium][trace_event_args_whitelist.cc] for specifics.
 * `included_categories` String[] (optional) - a list of tracing categories to

+ 11 - 11
script/lint.js

@@ -10,7 +10,7 @@ const path = require('path');
 const SOURCE_ROOT = path.normalize(path.dirname(__dirname));
 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', 'notifications', 'mac', 'notification_center_delegate.h'],
   ['shell', 'browser', 'ui', 'cocoa', 'event_dispatching_window.h'],
@@ -232,16 +232,16 @@ async function findMatchingFiles (top, test) {
 
 async function findFiles (args, linter) {
   let filenames = [];
-  let whitelist = null;
+  let includelist = null;
 
-  // build the whitelist
+  // build the includelist
   if (args.changed) {
-    whitelist = await findChangedFiles(SOURCE_ROOT);
-    if (!whitelist.size) {
+    includelist = await findChangedFiles(SOURCE_ROOT);
+    if (!includelist.size) {
       return [];
     }
   } 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
@@ -258,12 +258,12 @@ async function findFiles (args, linter) {
     filenames = filenames.filter(fileName => !ignoreFiles.has(fileName));
   }
 
-  // remove blacklisted files
-  filenames = filenames.filter(x => !BLACKLIST.has(x));
+  // remove ignored files
+  filenames = filenames.filter(x => !IGNORELIST.has(x));
 
-  // if a whitelist exists, remove anything not in it
-  if (whitelist) {
-    filenames = filenames.filter(x => whitelist.has(x));
+  // if a includelist exists, remove anything not in it
+  if (includelist) {
+    filenames = filenames.filter(x => includelist.has(x));
   }
 
   // it's important that filenames be relative otherwise clang-format will

+ 3 - 2
shell/browser/plugins/plugin_utils.cc

@@ -36,10 +36,11 @@ PluginUtils::GetMimeTypeToExtensionIdMap(
     content::BrowserContext* browser_context) {
   base::flat_map<std::string, std::string> mime_type_to_extension_id_map;
 #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
   // the URL request.
-  for (const std::string& extension_id : whitelist) {
+  for (const std::string& extension_id : allowed_extension_ids) {
     const extensions::Extension* extension =
         extensions::ExtensionRegistry::Get(browser_context)
             ->enabled_extensions()

+ 2 - 2
shell/renderer/electron_renderer_pepper_host_factory.cc

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