Commit 2b2e5af1 authored by Yue Cen's avatar Yue Cen Committed by Commit Bot

Fast app reinstall: Remove first-time Chromebook user check

I created a syncable pref in crrev.com/c/1213521 to check if a user has
gone through OOBE before. Now that the server side will conduct the
check so the syncable pref is no longer necessary.

Please see b/114134918 for more details.

Bug: 835029
Change-Id: Iab53007458ecd4f42915571fba96c91b894625a5
Reviewed-on: https://chromium-review.googlesource.com/1252851
Commit-Queue: Yue Cen <rsgingerrs@chromium.org>
Reviewed-by: default avatarWenzhao (Colin) Zang <wzang@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Reviewed-by: default avatarStefan Kuhne <skuhne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595566}
parent bd890fba
...@@ -275,14 +275,9 @@ bool NetworkAllowUpdate(const chromeos::NetworkState* network) { ...@@ -275,14 +275,9 @@ bool NetworkAllowUpdate(const chromeos::NetworkState* network) {
return true; return true;
} }
// Return true if the feature flag for recommend app screen is on and the screen // Return true if the feature flag for recommend app screen is on.
// is never triggered before.
bool ShouldShowRecommendAppsScreen() { bool ShouldShowRecommendAppsScreen() {
return base::FeatureList::IsEnabled(features::kOobeRecommendAppsScreen) && return base::FeatureList::IsEnabled(features::kOobeRecommendAppsScreen);
(!ProfileManager::GetActiveUserProfile()->GetPrefs()->GetBoolean(
prefs::kOobeRecommendAppScreenFinished) ||
base::CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kForceShowRecommendAppsScreenForTest));
} }
chromeos::LoginDisplayHost* GetLoginDisplayHost() { chromeos::LoginDisplayHost* GetLoginDisplayHost() {
......
...@@ -422,9 +422,6 @@ void ProfileImpl::RegisterProfilePrefs( ...@@ -422,9 +422,6 @@ void ProfileImpl::RegisterProfilePrefs(
registry->RegisterIntegerPref(prefs::kPrintingColorDefault, 0); registry->RegisterIntegerPref(prefs::kPrintingColorDefault, 0);
registry->RegisterIntegerPref(prefs::kPrintingDuplexDefault, 0); registry->RegisterIntegerPref(prefs::kPrintingDuplexDefault, 0);
registry->RegisterDictionaryPref(prefs::kPrintingSizeDefault); registry->RegisterDictionaryPref(prefs::kPrintingSizeDefault);
registry->RegisterBooleanPref(
prefs::kOobeRecommendAppScreenFinished, false,
user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
#endif // BUILDFLAG(ENABLE_PRINTING) #endif // BUILDFLAG(ENABLE_PRINTING)
registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false); registry->RegisterBooleanPref(prefs::kPrintPreviewDisabled, false);
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/app_list/arc/arc_fast_app_reinstall_starter.h" #include "chrome/browser/ui/app_list/arc/arc_fast_app_reinstall_starter.h"
#include "chrome/common/pref_names.h"
#include "chrome/grit/component_extension_resources.h" #include "chrome/grit/component_extension_resources.h"
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "components/arc/arc_prefs.h" #include "components/arc/arc_prefs.h"
...@@ -125,8 +124,6 @@ void RecommendAppsScreenHandler::Show() { ...@@ -125,8 +124,6 @@ void RecommendAppsScreenHandler::Show() {
Profile* profile = ProfileManager::GetActiveUserProfile(); Profile* profile = ProfileManager::GetActiveUserProfile();
pref_service_ = profile->GetPrefs(); pref_service_ = profile->GetPrefs();
profile->GetPrefs()->SetBoolean(prefs::kOobeRecommendAppScreenFinished, true);
} }
void RecommendAppsScreenHandler::Hide() {} void RecommendAppsScreenHandler::Hide() {}
......
...@@ -1833,10 +1833,6 @@ const char kOobeScreenPending[] = "OobeScreenPending"; ...@@ -1833,10 +1833,6 @@ const char kOobeScreenPending[] = "OobeScreenPending";
// and get enrolled into a domain automatically. // and get enrolled into a domain automatically.
const char kOobeControllerDetected[] = "OobeControllerDetected"; const char kOobeControllerDetected[] = "OobeControllerDetected";
// A boolean pref to indicate if the Recommend App screen in OOBE is finished
// for the user.
const char kOobeRecommendAppScreenFinished[] = "OobeRecommendAppScreenFinished";
// A boolean pref for whether the Goodies promotion webpage has been displayed, // A boolean pref for whether the Goodies promotion webpage has been displayed,
// or otherwise disqualified for auto-display, on this device. // or otherwise disqualified for auto-display, on this device.
const char kCanShowOobeGoodiesPage[] = "CanShowOobeGoodiesPage"; const char kCanShowOobeGoodiesPage[] = "CanShowOobeGoodiesPage";
......
...@@ -617,7 +617,6 @@ extern const char kInitialLocale[]; ...@@ -617,7 +617,6 @@ extern const char kInitialLocale[];
extern const char kOobeComplete[]; extern const char kOobeComplete[];
extern const char kOobeScreenPending[]; extern const char kOobeScreenPending[];
extern const char kOobeControllerDetected[]; extern const char kOobeControllerDetected[];
extern const char kOobeRecommendAppScreenFinished[];
extern const char kCanShowOobeGoodiesPage[]; extern const char kCanShowOobeGoodiesPage[];
extern const char kDeviceRegistered[]; extern const char kDeviceRegistered[];
extern const char kEnrollmentRecoveryRequired[]; extern const char kEnrollmentRecoveryRequired[];
......
...@@ -437,11 +437,6 @@ const char kForceHappinessTrackingSystem[] = "force-happiness-tracking-system"; ...@@ -437,11 +437,6 @@ const char kForceHappinessTrackingSystem[] = "force-happiness-tracking-system";
// tests can change how it's brought up. This flag disables that. // tests can change how it's brought up. This flag disables that.
const char kForceLoginManagerInTests[] = "force-login-manager-in-tests"; 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. // Force system compositor mode when set.
const char kForceSystemCompositorMode[] = "force-system-compositor-mode"; const char kForceSystemCompositorMode[] = "force-system-compositor-mode";
......
...@@ -124,7 +124,6 @@ CHROMEOS_EXPORT extern const char kForceDevToolsAvailable[]; ...@@ -124,7 +124,6 @@ CHROMEOS_EXPORT extern const char kForceDevToolsAvailable[];
CHROMEOS_EXPORT extern const char kForceFirstRunUI[]; CHROMEOS_EXPORT extern const char kForceFirstRunUI[];
CHROMEOS_EXPORT extern const char kForceHappinessTrackingSystem[]; CHROMEOS_EXPORT extern const char kForceHappinessTrackingSystem[];
CHROMEOS_EXPORT extern const char kForceLoginManagerInTests[]; CHROMEOS_EXPORT extern const char kForceLoginManagerInTests[];
CHROMEOS_EXPORT extern const char kForceShowRecommendAppsScreenForTest[];
CHROMEOS_EXPORT extern const char kForceSystemCompositorMode[]; CHROMEOS_EXPORT extern const char kForceSystemCompositorMode[];
CHROMEOS_EXPORT extern const char kGoldenScreenshotsDir[]; CHROMEOS_EXPORT extern const char kGoldenScreenshotsDir[];
CHROMEOS_EXPORT extern const char kGuestSession[]; 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