Commit 524d9990 authored by James Cook's avatar James Cook Committed by Chromium LUCI CQ

lacros: Allow LacrosAllowed policy to apply to developer builds

Clean up some leftover logic from when we disabled lacros in M87 for
non-google managed users. In particular, don't skip the policy check
for developer builds with channel unknown. The LacrosAllowed pref
defaults to true, so this doesn't affect developers who aren't working
with policy.

Bug: 1135494
Test: updated unit_tests
Change-Id: I510ada8de5d266626ba8adef64a7dd33202574a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2628592Reviewed-by: default avatarIgor <igorcov@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844259}
parent 2a127f5b
...@@ -180,11 +180,6 @@ bool IsLacrosEnabled(Channel channel) { ...@@ -180,11 +180,6 @@ bool IsLacrosEnabled(Channel channel) {
return false; return false;
} }
// TODO(https://crbug.com/1135494): Remove the free ticket for
// Channel::UNKNOWN after the policy is set on server side for developers.
if (channel == Channel::UNKNOWN)
return true;
if (!g_browser_process->local_state()->GetBoolean(prefs::kLacrosAllowed)) { if (!g_browser_process->local_state()->GetBoolean(prefs::kLacrosAllowed)) {
LOG(WARNING) << "Lacros-chrome is not allowed by policy"; LOG(WARNING) << "Lacros-chrome is not allowed by policy";
return false; return false;
......
...@@ -90,7 +90,10 @@ TEST_F(BrowserUtilTest, ManagedAccountLacrosEnabled) { ...@@ -90,7 +90,10 @@ TEST_F(BrowserUtilTest, ManagedAccountLacrosEnabled) {
true); true);
g_browser_process->local_state()->SetBoolean(prefs::kLacrosAllowed, true); g_browser_process->local_state()->SetBoolean(prefs::kLacrosAllowed, true);
EXPECT_TRUE(browser_util::IsLacrosEnabled(Channel::UNKNOWN));
EXPECT_TRUE(browser_util::IsLacrosEnabled(Channel::CANARY)); EXPECT_TRUE(browser_util::IsLacrosEnabled(Channel::CANARY));
EXPECT_TRUE(browser_util::IsLacrosEnabled(Channel::DEV));
EXPECT_TRUE(browser_util::IsLacrosEnabled(Channel::BETA));
} }
TEST_F(BrowserUtilTest, ManagedAccountLacrosDisabled) { TEST_F(BrowserUtilTest, ManagedAccountLacrosDisabled) {
...@@ -101,7 +104,10 @@ TEST_F(BrowserUtilTest, ManagedAccountLacrosDisabled) { ...@@ -101,7 +104,10 @@ TEST_F(BrowserUtilTest, ManagedAccountLacrosDisabled) {
true); true);
g_browser_process->local_state()->SetBoolean(prefs::kLacrosAllowed, false); g_browser_process->local_state()->SetBoolean(prefs::kLacrosAllowed, false);
EXPECT_FALSE(browser_util::IsLacrosEnabled(Channel::UNKNOWN));
EXPECT_FALSE(browser_util::IsLacrosEnabled(Channel::CANARY)); EXPECT_FALSE(browser_util::IsLacrosEnabled(Channel::CANARY));
EXPECT_FALSE(browser_util::IsLacrosEnabled(Channel::DEV));
EXPECT_FALSE(browser_util::IsLacrosEnabled(Channel::BETA));
} }
TEST_F(BrowserUtilTest, BlockedForChildUser) { TEST_F(BrowserUtilTest, BlockedForChildUser) {
......
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