Commit 6c73f465 authored by David Vallet's avatar David Vallet Committed by Commit Bot

go/coil on input_method folder

Bug: 1124062
Change-Id: I5422ddab8a7e9fafa9042bd65e59b1430dc4211a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422106Reviewed-by: default avatarKeith Lee <keithlee@chromium.org>
Commit-Queue: David Vallet <dvallet@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810058}
parent cbeb2096
......@@ -37,10 +37,10 @@ namespace chromeos {
namespace {
struct WhitelistedComponentExtensionIME {
struct AllowlistedComponentExtensionIME {
const char* id;
int manifest_resource_id;
} whitelisted_component_extensions[] = {
} allowlisted_component_extensions[] = {
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
{
// Official Google XKB Input.
......@@ -212,7 +212,7 @@ ComponentExtensionIMEManagerImpl::GetManifest(
// static
bool ComponentExtensionIMEManagerImpl::IsIMEExtensionID(const std::string& id) {
for (auto& extension : whitelisted_component_extensions) {
for (auto& extension : allowlisted_component_extensions) {
if (base::LowerCaseEqualsASCII(id, extension.id))
return true;
}
......@@ -336,7 +336,7 @@ bool ComponentExtensionIMEManagerImpl::ReadExtensionInfo(
void ComponentExtensionIMEManagerImpl::ReadComponentExtensionsInfo(
std::vector<ComponentExtensionIME>* out_imes) {
DCHECK(out_imes);
for (auto& extension : whitelisted_component_extensions) {
for (auto& extension : allowlisted_component_extensions) {
ComponentExtensionIME component_ime;
ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
component_ime.manifest =
......
......@@ -56,7 +56,7 @@ bool IsDownloadPathValid(const base::FilePath& file_path) {
}
bool IsDownloadURLValid(const GURL& url) {
// TODO(https://crbug.com/837156): Whitelist all URLs instead of some general
// TODO(https://crbug.com/837156): Allowlist all URLs instead of some general
// checks below.
return url.SchemeIs(url::kHttpsScheme) &&
url.DomainIs(chromeos::ime::kGoogleKeyboardDownloadDomain);
......
......@@ -104,7 +104,7 @@ class InputMethodEngineBrowserTest
// extension IME.
// Note: Even extension is loaded by LoadExtensionAsComponent as above, the
// IME does not managed by ComponentExtensionIMEManager or it's id won't
// start with __comp__. The component extension IME is whitelisted and
// start with __comp__. The component extension IME is allowlisted and
// managed by ComponentExtensionIMEManager, but its framework is same as
// normal extension IME.
EXPECT_EQ(3U, extension_imes.size());
......
......@@ -170,12 +170,12 @@ class InputMethodEngineTest : public testing::Test {
}
protected:
void CreateEngine(bool whitelisted) {
void CreateEngine(bool allowlisted) {
engine_.reset(new InputMethodEngine());
observer_ = new TestObserver();
std::unique_ptr<InputMethodEngineBase::Observer> observer_ptr(observer_);
engine_->Initialize(std::move(observer_ptr),
whitelisted ? kTestExtensionId : kTestExtensionId2,
allowlisted ? kTestExtensionId : kTestExtensionId2,
nullptr);
}
......@@ -268,7 +268,7 @@ TEST_F(InputMethodEngineTest, TestSwitching_Password_3rd_Party) {
EXPECT_EQ(kTestImeComponentId, observer_->GetEngineIdAndReset());
}
TEST_F(InputMethodEngineTest, TestSwitching_Password_Whitelisted) {
TEST_F(InputMethodEngineTest, TestSwitching_Password_Allowlisted) {
CreateEngine(true);
// Enable/disable with focus.
FocusIn(ui::TEXT_INPUT_TYPE_PASSWORD);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment