Clean up EnableCrdFileTransferForKiosk feature flag
Bug: b:356624696 Change-Id: Ibc980f09ad52d48a4b0ba5e517145e2f6779f2cb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6563741 Reviewed-by: Jeroen Dhollander <jeroendh@google.com> Reviewed-by: Joe Downing <joedow@chromium.org> Commit-Queue: Ashutosh Singhal <macinashutosh@google.com> Cr-Commit-Position: refs/heads/main@{#1463279}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
7a0d99153a
commit
46fc8e67be
chrome/browser/ash/policy/remote_commands/crd
remoting/host/chromeos
@ -486,9 +486,7 @@ bool DeviceCommandStartCrdSessionJob::ShouldAllowTroubleshootingTools() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool DeviceCommandStartCrdSessionJob::ShouldAllowFileTransfer() const {
|
bool DeviceCommandStartCrdSessionJob::ShouldAllowFileTransfer() const {
|
||||||
return IsKioskSession(GetCurrentUserSessionType()) &&
|
return IsKioskSession(GetCurrentUserSessionType());
|
||||||
base::FeatureList::IsEnabled(
|
|
||||||
remoting::features::kEnableCrdFileTransferForKiosk);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DeviceCommandStartCrdSessionJob::ShouldAutoAcceptSession(
|
bool DeviceCommandStartCrdSessionJob::ShouldAutoAcceptSession(
|
||||||
|
@ -50,7 +50,6 @@ using chromeos::network_config::mojom::NetworkType;
|
|||||||
using chromeos::network_config::mojom::OncSource;
|
using chromeos::network_config::mojom::OncSource;
|
||||||
using remoting::features::kAutoApproveEnterpriseSharedSessions;
|
using remoting::features::kAutoApproveEnterpriseSharedSessions;
|
||||||
using remoting::features::kEnableCrdAdminRemoteAccessV2;
|
using remoting::features::kEnableCrdAdminRemoteAccessV2;
|
||||||
using remoting::features::kEnableCrdFileTransferForKiosk;
|
|
||||||
using remoting::features::kEnableCrdSharedSessionToUnattendedDevice;
|
using remoting::features::kEnableCrdSharedSessionToUnattendedDevice;
|
||||||
using test::TestSessionType;
|
using test::TestSessionType;
|
||||||
|
|
||||||
@ -900,9 +899,7 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
|
TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
|
||||||
ShouldAllowFileTransferForKioskSessionsWhenFeatureIsEnabled) {
|
ShouldAllowFileTransferForKioskSessions) {
|
||||||
EnableFeature(kEnableCrdFileTransferForKiosk);
|
|
||||||
|
|
||||||
TestSessionType user_session_type = GetParam();
|
TestSessionType user_session_type = GetParam();
|
||||||
SCOPED_TRACE(base::StringPrintf("Testing session type %s",
|
SCOPED_TRACE(base::StringPrintf("Testing session type %s",
|
||||||
SessionTypeToString(user_session_type)));
|
SessionTypeToString(user_session_type)));
|
||||||
@ -918,24 +915,6 @@ TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
|
|||||||
supports_file_transfer);
|
supports_file_transfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(DeviceCommandStartCrdSessionJobTestParameterized,
|
|
||||||
ShouldNotAllowFileTransferForAnySessionWhenFeatureIsNotEnabled) {
|
|
||||||
base::test::ScopedFeatureList feature_list;
|
|
||||||
feature_list.InitAndDisableFeature(kEnableCrdFileTransferForKiosk);
|
|
||||||
|
|
||||||
TestSessionType user_session_type = GetParam();
|
|
||||||
SCOPED_TRACE(base::StringPrintf("Testing session type %s",
|
|
||||||
SessionTypeToString(user_session_type)));
|
|
||||||
if (!SupportsRemoteSupport(user_session_type)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
StartSessionOfType(user_session_type);
|
|
||||||
RunJobAndWaitForResult();
|
|
||||||
|
|
||||||
EXPECT_EQ(delegate().session_parameters().allow_file_transfer, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(DeviceCommandStartCrdSessionJobTest,
|
TEST_F(DeviceCommandStartCrdSessionJobTest,
|
||||||
ShouldSendErrorUmaLogWhenUserTypeIsNotSupported) {
|
ShouldSendErrorUmaLogWhenUserTypeIsNotSupported) {
|
||||||
base::HistogramTester histogram_tester;
|
base::HistogramTester histogram_tester;
|
||||||
@ -1234,7 +1213,7 @@ TEST_P(DeviceCommandStartCrdSessionJobRemoteAccessTestParameterized,
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(DeviceCommandStartCrdSessionJobRemoteAccessTestParameterized,
|
TEST_P(DeviceCommandStartCrdSessionJobRemoteAccessTestParameterized,
|
||||||
ShouldNeverAllowFileTransferForRemoteAccessWhenFeatureIsEnabled) {
|
ShouldNeverAllowFileTransferForRemoteAccess) {
|
||||||
TestSessionType user_session_type = GetParam();
|
TestSessionType user_session_type = GetParam();
|
||||||
SCOPED_TRACE(base::StringPrintf("Testing session type %s",
|
SCOPED_TRACE(base::StringPrintf("Testing session type %s",
|
||||||
SessionTypeToString(user_session_type)));
|
SessionTypeToString(user_session_type)));
|
||||||
@ -1242,7 +1221,6 @@ TEST_P(DeviceCommandStartCrdSessionJobRemoteAccessTestParameterized,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EnableFeature(kEnableCrdFileTransferForKiosk);
|
|
||||||
StartSessionOfType(user_session_type);
|
StartSessionOfType(user_session_type);
|
||||||
AddActiveManagedNetwork();
|
AddActiveManagedNetwork();
|
||||||
RunJobAndWaitForResult(
|
RunJobAndWaitForResult(
|
||||||
|
@ -12,10 +12,6 @@ BASE_FEATURE(kEnableCrdAdminRemoteAccessV2,
|
|||||||
"EnableCrdAdminRemoteAccessV2",
|
"EnableCrdAdminRemoteAccessV2",
|
||||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||||
|
|
||||||
BASE_FEATURE(kEnableCrdFileTransferForKiosk,
|
|
||||||
"EnableCrdFileTransferForKiosk",
|
|
||||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
|
||||||
|
|
||||||
BASE_FEATURE(kEnableCrdSharedSessionToUnattendedDevice,
|
BASE_FEATURE(kEnableCrdSharedSessionToUnattendedDevice,
|
||||||
"EnableCrdSharedSessionToUnattendedDevice",
|
"EnableCrdSharedSessionToUnattendedDevice",
|
||||||
base::FEATURE_ENABLED_BY_DEFAULT);
|
base::FEATURE_ENABLED_BY_DEFAULT);
|
||||||
|
@ -13,9 +13,6 @@ namespace remoting::features {
|
|||||||
// to GA.
|
// to GA.
|
||||||
BASE_DECLARE_FEATURE(kEnableCrdAdminRemoteAccessV2);
|
BASE_DECLARE_FEATURE(kEnableCrdAdminRemoteAccessV2);
|
||||||
|
|
||||||
// Enable to allow file transfer in CRD video streaming to Kiosk devices.
|
|
||||||
BASE_DECLARE_FEATURE(kEnableCrdFileTransferForKiosk);
|
|
||||||
|
|
||||||
// Enable to allow shared CRD session to the login/lock screen.
|
// Enable to allow shared CRD session to the login/lock screen.
|
||||||
BASE_DECLARE_FEATURE(kEnableCrdSharedSessionToUnattendedDevice);
|
BASE_DECLARE_FEATURE(kEnableCrdSharedSessionToUnattendedDevice);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user