Commit 31edfccd authored by Yue Cen's avatar Yue Cen Committed by Commit Bot

Fast app reinstall: Add a switch to force show the screen

Normally the recommend-apps screen is only shown to first-time
Chromebook users. Adding this switch to skip the check so that testers
can reuse the same accounts for testing.

Bug: 835029
Change-Id: I61b1bef40e4b64f22f3890c64e24d3887a86b977
Reviewed-on: https://chromium-review.googlesource.com/1239249Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Commit-Queue: Yue Cen <rsgingerrs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593641}
parent 572173ec
......@@ -276,8 +276,10 @@ bool NetworkAllowUpdate(const chromeos::NetworkState* network) {
// is never triggered before.
bool ShouldShowRecommendAppsScreen() {
return base::FeatureList::IsEnabled(features::kOobeRecommendAppsScreen) &&
!ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
prefs::kOobeRecommendAppScreenFinished);
(!ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
prefs::kOobeRecommendAppScreenFinished) ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kForceShowRecommendAppsScreenForTest));
}
chromeos::LoginDisplayHost* GetLoginDisplayHost() {
......
......@@ -440,6 +440,11 @@ const char kForceHappinessTrackingSystem[] = "force-happiness-tracking-system";
// tests can change how it's brought up. This flag disables that.
const char kForceLoginManagerInTests[] = "force-login-manager-in-tests";
// Recommend-apps screen is only shown to first-time Chromebook users. This flag
// skips the check so that testers can reuse the same accounts.
const char kForceShowRecommendAppsScreenForTest[] =
"force-show-recommend-apps-screen-for-test";
// Force system compositor mode when set.
const char kForceSystemCompositorMode[] = "force-system-compositor-mode";
......
......@@ -125,6 +125,7 @@ CHROMEOS_EXPORT extern const char kForceDevToolsAvailable[];
CHROMEOS_EXPORT extern const char kForceFirstRunUI[];
CHROMEOS_EXPORT extern const char kForceHappinessTrackingSystem[];
CHROMEOS_EXPORT extern const char kForceLoginManagerInTests[];
CHROMEOS_EXPORT extern const char kForceShowRecommendAppsScreenForTest[];
CHROMEOS_EXPORT extern const char kForceSystemCompositorMode[];
CHROMEOS_EXPORT extern const char kGoldenScreenshotsDir[];
CHROMEOS_EXPORT extern const char kGuestSession[];
......
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