[Project Code Inclusion] Remove whitelist/blacklist from c/b/ui code.
Most instances changed to allowlist/blocklist as per:
https://docs.google.com/document/d/1ziMxAVGMfMwIbftdf5gVni-dwhaSfSveyNVGA6Bv6jQ
Handled:
- class names
- member names
- local variables
- documentation
- UI strings referenced by the code
Not handled:
- references to classes defined elsewhere
- anything that looked like IPC or cross-compiler support
- android and ios code
As such, there are still references in the codebase, we should act to
continue removing them as we make progress on PCI.
Bug: 1100024
Change-Id: I8261a7d1f4fc73ca1b79ae09179b4e97a56e0ed1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2274145
Commit-Queue: Dana Fried <[email protected]>
Reviewed-by: Roman Sorokin [CET] <[email protected]>
Reviewed-by: Nico Weber <[email protected]>
Reviewed-by: Elly Fong-Jones <[email protected]>
Cr-Commit-Position: refs/heads/master@{#784187}
diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc
index 28cf983..dc0b428 100644
--- a/chrome/browser/ui/browser_command_controller.cc
+++ b/chrome/browser/ui/browser_command_controller.cc
@@ -1357,14 +1357,14 @@
namespace {
#if DCHECK_IS_ON()
-// Makes sure that all commands that are not whitelisted are disabled. DCHECKs
+// Makes sure that all commands that are not allowlisted are disabled. DCHECKs
// otherwise. Compiled only in debug mode.
-void NonWhitelistedCommandsAreDisabled(CommandUpdaterImpl* command_updater) {
- constexpr int kWhitelistedIds[] = {IDC_CUT, IDC_COPY, IDC_PASTE};
+void NonAllowlistedCommandsAreDisabled(CommandUpdaterImpl* command_updater) {
+ constexpr int kAllowlistedIds[] = {IDC_CUT, IDC_COPY, IDC_PASTE};
- // Go through all the command ids, skip the whitelisted ones.
+ // Go through all the command ids, skip the allowlisted ones.
for (int id : command_updater->GetAllIds()) {
- if (base::Contains(kWhitelistedIds, id)) {
+ if (base::Contains(kAllowlistedIds, id)) {
continue;
}
DCHECK(!command_updater->IsCommandEnabled(id));
@@ -1385,14 +1385,14 @@
if (is_locked_fullscreen_) {
command_updater_.DisableAllCommands();
- // Update the state of whitelisted commands:
+ // Update the state of allowlisted commands:
// IDC_CUT/IDC_COPY/IDC_PASTE,
UpdateCommandsForContentRestrictionState();
// TODO(crbug.com/904637): Re-enable Find and Zoom in locked fullscreen.
// All other commands will be disabled (there is an early return in their
// corresponding UpdateCommandsFor* functions).
#if DCHECK_IS_ON()
- NonWhitelistedCommandsAreDisabled(&command_updater_);
+ NonAllowlistedCommandsAreDisabled(&command_updater_);
#endif
} else {
// Do an init call to re-initialize command state after the