Remove ui::EndpointType::kLacros in Lacros supported builds
Lacros is deprecated. Remove all the usages of ui::EndpointType::kLacros. This is a final clean up for this usage. Bug: 374585768, 374122148, 373972275, 373971535 Change-Id: I395a6de42c17994f9818ec16839c644b9fe321f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5965199 Commit-Queue: Maksim Sisov <msisov@igalia.com> Reviewed-by: Sergey Poromov <poromov@chromium.org> Reviewed-by: Dominic Farolino <dom@chromium.org> Reviewed-by: Hidehiko Abe <hidehiko@chromium.org> Cr-Commit-Position: refs/heads/main@{#1374704}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
c008ea8f23
commit
1f32fedce7
chrome/browser
ash
exo
policy
chromeos
policy
resources
chromeos
dlp_internals
ui
webui
ash
dlp_internals
components/exo
ui/base/data_transfer_policy
@ -79,9 +79,6 @@ ui::EndpointType ChromeDataExchangeDelegate::GetDataTransferEndpointType(
|
||||
return ui::EndpointType::kBorealis;
|
||||
}
|
||||
|
||||
if (crosapi::browser_util::IsLacrosWindow(top_level_window))
|
||||
return ui::EndpointType::kLacros;
|
||||
|
||||
if (crostini::IsCrostiniWindow(top_level_window))
|
||||
return ui::EndpointType::kCrostini;
|
||||
|
||||
|
@ -129,9 +129,6 @@ TEST_F(ChromeDataExchangeDelegateTest, GetDataTransferEndpointType) {
|
||||
ui::EndpointType::kCrostini,
|
||||
data_exchange_delegate.GetDataTransferEndpointType(crostini_window));
|
||||
|
||||
EXPECT_EQ(ui::EndpointType::kLacros,
|
||||
data_exchange_delegate.GetDataTransferEndpointType(lacros_window));
|
||||
|
||||
EXPECT_EQ(
|
||||
ui::EndpointType::kPluginVm,
|
||||
data_exchange_delegate.GetDataTransferEndpointType(plugin_vm_window));
|
||||
|
@ -2483,8 +2483,6 @@ INSTANTIATE_TEST_SUITE_P(
|
||||
::dlp::DlpComponent::CROSTINI),
|
||||
std::make_tuple(ui::DataTransferEndpoint(ui::EndpointType::kPluginVm),
|
||||
::dlp::DlpComponent::PLUGIN_VM),
|
||||
std::make_tuple(ui::DataTransferEndpoint(ui::EndpointType::kLacros),
|
||||
::dlp::DlpComponent::UNKNOWN_COMPONENT),
|
||||
std::make_tuple(ui::DataTransferEndpoint(ui::EndpointType::kDefault),
|
||||
::dlp::DlpComponent::UNKNOWN_COMPONENT),
|
||||
std::make_tuple(
|
||||
|
@ -157,13 +157,6 @@ DlpRulesManager::Level IsDataTransferAllowed(
|
||||
break;
|
||||
}
|
||||
|
||||
case ui::EndpointType::kLacros: {
|
||||
// Return ALLOW for Lacros destinations, as Lacros itself will make DLP
|
||||
// checks.
|
||||
level = DlpRulesManager::Level::kAllow;
|
||||
break;
|
||||
}
|
||||
|
||||
case ui::EndpointType::kUnknownVm:
|
||||
case ui::EndpointType::kBorealis:
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
@ -215,19 +215,6 @@ TEST_F(DataTransferDlpControllerTest, ClipboardHistoryDst) {
|
||||
false, 1);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
TEST_F(DataTransferDlpControllerTest, LacrosDst) {
|
||||
ui::DataTransferEndpoint data_src((GURL(kExample1Url)));
|
||||
ui::DataTransferEndpoint data_dst(ui::EndpointType::kLacros);
|
||||
EXPECT_EQ(true, dlp_controller_->IsClipboardReadAllowed(data_src, data_dst,
|
||||
std::nullopt));
|
||||
histogram_tester_.ExpectUniqueSample(
|
||||
data_controls::GetDlpHistogramPrefix() +
|
||||
data_controls::dlp::kClipboardReadBlockedUMA,
|
||||
false, 1);
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
TEST_F(DataTransferDlpControllerTest, PasteIfAllowed_Allow) {
|
||||
ui::DataTransferEndpoint data_src((GURL(kExample1Url)));
|
||||
ui::DataTransferEndpoint data_dst((GURL(kExample2Url)));
|
||||
|
@ -122,7 +122,6 @@ DlpFileDestination DTEndpointToFileDestination(
|
||||
case ui::EndpointType::kPluginVm:
|
||||
return DlpFileDestination(data_controls::Component::kPluginVm);
|
||||
|
||||
case ui::EndpointType::kLacros:
|
||||
case ui::EndpointType::kDefault:
|
||||
case ui::EndpointType::kClipboardHistory:
|
||||
case ui::EndpointType::kBorealis:
|
||||
|
@ -14,7 +14,6 @@ export const EndpointTypeMap = {
|
||||
[EndpointType.kBorealis]: 'Borealis',
|
||||
[EndpointType.kCrostini]: 'Crostini',
|
||||
[EndpointType.kPluginVm]: 'Plugin VM',
|
||||
[EndpointType.kLacros]: 'Lacros',
|
||||
};
|
||||
|
||||
export const DestinationComponentMap = {
|
||||
|
@ -18,7 +18,6 @@ enum EndpointType {
|
||||
kBorealis = 5,
|
||||
kCrostini = 6,
|
||||
kPluginVm = 7,
|
||||
kLacros = 8,
|
||||
};
|
||||
|
||||
struct DataTransferEndpoint {
|
||||
|
@ -235,10 +235,6 @@ void DlpInternalsPageHandler::GetClipboardDataSource(
|
||||
case ui::EndpointType::kPluginVm:
|
||||
mojom_source->type = dlp_internals::mojom::EndpointType::kPluginVm;
|
||||
break;
|
||||
|
||||
case ui::EndpointType::kLacros:
|
||||
mojom_source->type = dlp_internals::mojom::EndpointType::kLacros;
|
||||
break;
|
||||
}
|
||||
|
||||
if (source->IsUrlType()) {
|
||||
|
@ -235,11 +235,6 @@ void Seat::SetSelection(DataSource* source) {
|
||||
|
||||
size_t num_data_read_callbacks = DataSource::kMaxDataTypes;
|
||||
|
||||
// Lacros sends additional metadata, in a custom MIME type, to sync clipboard
|
||||
// source metadata,
|
||||
if (endpoint_type == ui::EndpointType::kLacros)
|
||||
++num_data_read_callbacks;
|
||||
|
||||
base::RepeatingClosure data_read_callback = base::BarrierClosure(
|
||||
num_data_read_callbacks,
|
||||
base::BindOnce(&Seat::OnAllReadsFinished, weak_ptr_factory_.GetWeakPtr(),
|
||||
|
@ -27,7 +27,6 @@ enum class EndpointType {
|
||||
kBorealis = 5, // Borealis OS.
|
||||
kCrostini = 6, // Crostini.
|
||||
kPluginVm = 7, // Plugin VM App.
|
||||
kLacros = 8, // Lacros browser.
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user