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

Revert "lacros: Allow LacrosAllowed policy to apply to developer builds"

This reverts commit 524d9990.

Reason for revert:
Multiple developers were unable to launch lacros, due to using
@managedchrome.com or @chromium.org accounts for testing.

Until we can revisit the policy settings for common domains used
by developers, I'm going to revert.

Original change's description:
> 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/+/2628592
> Reviewed-by: Igor <igorcov@chromium.org>
> Commit-Queue: James Cook <jamescook@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#844259}

TBR=jamescook@chromium.org,igorcov@chromium.org,chromium-scoped@luci-project-accounts.iam.gserviceaccount.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1135494
Change-Id: Ice9c8695697c3362dc4170410752484e0ff05f28
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2640644Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#845359}
parent e8d10268
......@@ -180,6 +180,11 @@ bool IsLacrosEnabled(Channel channel) {
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)) {
LOG(WARNING) << "Lacros-chrome is not allowed by policy";
return false;
......
......@@ -90,10 +90,7 @@ TEST_F(BrowserUtilTest, ManagedAccountLacrosEnabled) {
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::DEV));
EXPECT_TRUE(browser_util::IsLacrosEnabled(Channel::BETA));
}
TEST_F(BrowserUtilTest, ManagedAccountLacrosDisabled) {
......@@ -104,10 +101,7 @@ TEST_F(BrowserUtilTest, ManagedAccountLacrosDisabled) {
true);
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::DEV));
EXPECT_FALSE(browser_util::IsLacrosEnabled(Channel::BETA));
}
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