Commit d88ca476 authored by Michael Giuffrida's avatar Michael Giuffrida Committed by Commit Bot

Remove Demo Mode feature flags

Remove Demo Mode feature flags that have been default-enabled on Stable
for 2+ milestones.

Bug: None
Change-Id: Ic3dd93fd3e1dfb44ba51139e3a90baf707f9e818
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1699308
Commit-Queue: Michael Giuffrida <michaelpg@chromium.org>
Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
Cr-Commit-Position: refs/heads/master@{#678455}
parent 137d4c66
......@@ -37,7 +37,6 @@
#include "chrome/browser/ui/extensions/application_launch.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "chromeos/constants/chromeos_switches.h"
#include "chromeos/tpm/install_attributes.h"
#include "components/language/core/browser/pref_names.h"
#include "components/prefs/pref_registry_simple.h"
......@@ -346,10 +345,6 @@ bool DemoSession::ShouldDisplayInAppLauncher(const std::string& app_id) {
// static
base::Value DemoSession::GetCountryList() {
base::Value country_list(base::Value::Type::LIST);
if (!base::FeatureList::IsEnabled(
switches::kSupportCountryCustomizationInDemoMode)) {
return country_list;
}
const std::string current_country =
g_browser_process->local_state()->GetString(prefs::kDemoModeCountry);
const std::string current_locale = g_browser_process->GetApplicationLocale();
......@@ -506,19 +501,15 @@ void DemoSession::InstallAppFromUpdateUrl(const std::string& id) {
void DemoSession::OnSessionStateChanged() {
switch (session_manager::SessionManager::Get()->session_state()) {
case session_manager::SessionState::LOGIN_PRIMARY:
if (base::FeatureList::IsEnabled(switches::kShowSplashScreenInDemoMode)) {
EnsureOfflineResourcesLoaded(base::BindOnce(
&DemoSession::ShowSplashScreen, weak_ptr_factory_.GetWeakPtr()));
}
EnsureOfflineResourcesLoaded(base::BindOnce(
&DemoSession::ShowSplashScreen, weak_ptr_factory_.GetWeakPtr()));
break;
case session_manager::SessionState::ACTIVE:
if (ShouldRemoveSplashScreen())
RemoveSplashScreen();
// SystemTrayClient may not exist in unit tests.
if (SystemTrayClient::Get() &&
base::FeatureList::IsEnabled(
switches::kShowLanguageToggleInDemoMode)) {
if (SystemTrayClient::Get()) {
const std::string current_locale_iso_code =
ProfileManager::GetActiveUserProfile()->GetPrefs()->GetString(
language::prefs::kApplicationLocale);
......@@ -566,8 +557,7 @@ void DemoSession::RemoveSplashScreen() {
bool DemoSession::ShouldRemoveSplashScreen() {
// TODO(crbug.com/934979): Launch screensaver after active session starts, so
// that there's no need to check session state here.
return base::FeatureList::IsEnabled(switches::kShowSplashScreenInDemoMode) &&
session_manager::SessionManager::Get()->session_state() ==
return session_manager::SessionManager::Get()->session_state() ==
session_manager::SessionState::ACTIVE &&
screensaver_activated_;
}
......
......@@ -15,7 +15,6 @@
#include "base/macros.h"
#include "base/optional.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/timer/mock_timer.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part.h"
......@@ -33,7 +32,6 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "chromeos/constants/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "components/language/core/browser/pref_names.h"
#include "components/session_manager/core/session_manager.h"
......@@ -72,9 +70,6 @@ class DemoSessionTest : public testing::Test {
~DemoSessionTest() override = default;
void SetUp() override {
scoped_feature_list_.InitAndEnableFeature(
chromeos::switches::kShowSplashScreenInDemoMode);
ASSERT_TRUE(profile_manager_->SetUp());
chromeos::DBusThreadManager::Initialize();
DemoSession::SetDemoConfigForTesting(DemoSession::DemoModeConfig::kOnline);
......@@ -158,7 +153,6 @@ class DemoSessionTest : public testing::Test {
BrowserProcessPlatformPartTestApi browser_process_platform_part_test_api_;
user_manager::ScopedUserManager scoped_user_manager_;
chromeos::ScopedCrosSettingsTestHelper cros_settings_test_helper_;
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(DemoSessionTest);
};
......
......@@ -13,7 +13,6 @@
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time_to_iso8601.h"
#include "base/timer/timer.h"
#include "base/values.h"
......@@ -148,8 +147,6 @@ class DemoSetupTest : public LoginManagerTest {
// LoginTestManager:
void SetUpCommandLine(base::CommandLine* command_line) override {
LoginManagerTest::SetUpCommandLine(command_line);
scoped_feature_list_.InitAndEnableFeature(
chromeos::switches::kSupportCountryCustomizationInDemoMode);
command_line->AppendSwitchASCII(switches::kArcAvailability,
"officially-supported");
ASSERT_TRUE(arc::IsArcAvailable());
......@@ -460,7 +457,6 @@ class DemoSetupTest : public LoginManagerTest {
// TODO(agawronska): Maybe create a separate test fixture for offline setup.
base::ScopedTempDir fake_demo_resources_dir_;
policy::MockCloudPolicyStore mock_policy_store_;
base::test::ScopedFeatureList scoped_feature_list_;
std::unique_ptr<base::AutoReset<bool>> official_build_override_;
DISALLOW_COPY_AND_ASSIGN(DemoSetupTest);
......
......@@ -27,7 +27,6 @@
#include "chrome/browser/chromeos/policy/enrollment_config.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/generated_resources.h"
#include "chromeos/constants/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/system/statistics_provider.h"
#include "chromeos/tpm/install_attributes.h"
......@@ -463,10 +462,6 @@ bool DemoSetupController::IsOobeDemoSetupFlowInProgress() {
// static
std::string DemoSetupController::GetSubOrganizationEmail() {
if (!base::FeatureList::IsEnabled(
switches::kSupportCountryCustomizationInDemoMode)) {
return std::string();
}
const std::string country =
g_browser_process->local_state()->GetString(prefs::kDemoModeCountry);
const base::flat_set<std::string> kCountriesWithCustomization(
......
......@@ -53,18 +53,9 @@ const base::Feature kAssistantFeature{"ChromeOSAssistant",
const base::Feature kAmbientModeFeature{"ChromeOSAmbientMode",
base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kShowLanguageToggleInDemoMode{
"ShowLanguageToggleInDemoMode", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kShowPlayInDemoMode{"ShowPlayInDemoMode",
base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kShowSplashScreenInDemoMode{
"ShowSplashScreenInDemoMode", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kSupportCountryCustomizationInDemoMode{
"SupportCountryCustomizationInDemoMode", base::FEATURE_ENABLED_BY_DEFAULT};
// Please keep the order of these switches synchronized with the header file
// (i.e. in alphabetical order).
......
......@@ -208,23 +208,10 @@ extern const base::Feature kAmbientModeFeature;
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kParentalControlsSettings;
// Controls whether to show the system tray language toggle in Demo Mode.
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kShowLanguageToggleInDemoMode;
// Controls whether to show the Play Store icon in Demo Mode.
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kShowPlayInDemoMode;
// Controls whether to show a static splash screen instead of the user pods
// before demo sessions log in.
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kShowSplashScreenInDemoMode;
// Controls whether to support country-level customization in Demo Mode.
COMPONENT_EXPORT(CHROMEOS_CONSTANTS)
extern const base::Feature kSupportCountryCustomizationInDemoMode;
// Returns true if the system should wake in response to wifi traffic.
COMPONENT_EXPORT(CHROMEOS_CONSTANTS) bool WakeOnWifiEnabled();
......
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