Skip to content

Commit

Permalink
Remove stale CrostiniAdditionalEnterpriseReporting feature
Browse files Browse the repository at this point in the history
Bug: 356235625
Change-Id: I343aca9e8026919bcd446c353a991808767fb200
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6055262
Reviewed-by: Anqing Zhao <[email protected]>
Auto-Submit: David Bienvenu <[email protected]>
Commit-Queue: Anqing Zhao <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1390120}
  • Loading branch information
David Bienvenu authored and pull[bot] committed Dec 2, 2024
1 parent b939441 commit 1406698
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3049,9 +3049,7 @@ bool DeviceStatusCollector::GetCrostiniUsage(
last_launch_time_window_start);
crostini_status->set_last_launch_vm_image_version(termina_version);

if (profile->GetPrefs()->GetBoolean(crostini::prefs::kCrostiniEnabled) &&
base::FeatureList::IsEnabled(
features::kCrostiniAdditionalEnterpriseReporting)) {
if (profile->GetPrefs()->GetBoolean(crostini::prefs::kCrostiniEnabled)) {
const std::string& vm_kernel_version = profile->GetPrefs()->GetString(
crostini::prefs::kCrostiniLastLaunchTerminaKernelVersion);
crostini_status->set_last_launch_vm_kernel_version(vm_kernel_version);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2259,15 +2259,6 @@ TEST_F(DeviceStatusCollectorTest, CrostiniTerminaVmKernelVersionReporting) {
EXPECT_TRUE(got_session_status_);
EXPECT_EQ(kTerminaVmKernelVersion,
session_status_.crostini_status().last_launch_vm_kernel_version());

// Check that nothing is reported when the feature flag is disabled:
scoped_feature_list_.InitAndDisableFeature(
features::kCrostiniAdditionalEnterpriseReporting);
GetStatus();
EXPECT_TRUE(got_session_status_);
EXPECT_TRUE(session_status_.crostini_status()
.last_launch_vm_kernel_version()
.empty());
}

TEST_F(DeviceStatusCollectorTest, CrostiniAppUsageReporting) {
Expand All @@ -2289,9 +2280,6 @@ TEST_F(DeviceStatusCollectorTest, CrostiniAppUsageReporting) {

testing_profile_->GetPrefs()->SetBoolean(crostini::prefs::kCrostiniEnabled,
true);
scoped_feature_list_.InitWithFeatures(
{features::kCrostiniAdditionalEnterpriseReporting}, {});

const std::string desktop_file_id = "vim";
const std::string package_id =
"vim;2:8.0.0197-4+deb9u1;amd64;installed:debian-stable";
Expand Down Expand Up @@ -2361,9 +2349,6 @@ TEST_F(DeviceStatusCollectorTest,

testing_profile_->GetPrefs()->SetBoolean(crostini::prefs::kCrostiniEnabled,
false);
scoped_feature_list_.InitAndEnableFeature(
features::kCrostiniAdditionalEnterpriseReporting);

GetStatus();
EXPECT_TRUE(got_session_status_);

Expand Down
6 changes: 0 additions & 6 deletions chrome/common/chrome_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,6 @@ BASE_FEATURE(kEnableCertManagementUIV2EditCerts,
// Enable project Crostini, Linux VMs on Chrome OS.
BASE_FEATURE(kCrostini, "Crostini", base::FEATURE_DISABLED_BY_DEFAULT);

// Enable additional Crostini session status reporting for
// managed devices only, i.e. reports of installed apps and kernel version.
BASE_FEATURE(kCrostiniAdditionalEnterpriseReporting,
"CrostiniAdditionalEnterpriseReporting",
base::FEATURE_ENABLED_BY_DEFAULT);

// Enable advanced access controls for Crostini-related features
// (e.g. restricting VM CLI tools access, restricting Crostini root access).
BASE_FEATURE(kCrostiniAdvancedAccessControls,
Expand Down
1 change: 0 additions & 1 deletion chrome/common/chrome_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ BASE_DECLARE_FEATURE(kEnableCertManagementUIV2EditCerts);
#if BUILDFLAG(IS_CHROMEOS_ASH)
COMPONENT_EXPORT(CHROME_FEATURES) BASE_DECLARE_FEATURE(kCrostini);
COMPONENT_EXPORT(CHROME_FEATURES)
BASE_DECLARE_FEATURE(kCrostiniAdditionalEnterpriseReporting);
COMPONENT_EXPORT(CHROME_FEATURES)
BASE_DECLARE_FEATURE(kCrostiniAdvancedAccessControls);
COMPONENT_EXPORT(CHROME_FEATURES)
Expand Down

0 comments on commit 1406698

Please sign in to comment.