Commit 1136cf17 authored by Alexander Alekseev's avatar Alexander Alekseev Committed by Commit Bot

Chrome OS: hide experimeltal user service id "usm" behind a flag.

Not yet suported service "usm" needs to be behind flag CrOSEnableUSMUserService.

Bug: 837107
Change-Id: If3bfc4d58d1894074fb7b50c94b8fe91ee459e5a
Reviewed-on: https://chromium-review.googlesource.com/1038813Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Alexander Alekseev <alemate@chromium.org>
Cr-Commit-Position: refs/heads/master@{#555488}
parent f617d01a
...@@ -224,7 +224,12 @@ void GetVersionAndConsent(std::string* out_version, bool* out_consent) { ...@@ -224,7 +224,12 @@ void GetVersionAndConsent(std::string* out_version, bool* out_consent) {
user_manager::UserType GetUsertypeFromServicesString( user_manager::UserType GetUsertypeFromServicesString(
const ::login::StringList& services) { const ::login::StringList& services) {
bool is_child = false; bool is_child = false;
const base::flat_set<std::string> known_flags = {"uca", "usm"}; const bool support_usm =
base::FeatureList::IsEnabled(features::kCrOSEnableUSMUserService);
using KnownFlags = base::flat_set<std::string>;
const KnownFlags known_flags =
support_usm ? KnownFlags({"uca", "usm"}) : KnownFlags({"uca"});
size_t i = 0; size_t i = 0;
for (const std::string& item : services) { for (const std::string& item : services) {
if (known_flags.find(item) != known_flags.end()) { if (known_flags.find(item) != known_flags.end()) {
......
...@@ -650,6 +650,11 @@ const base::Feature kEasyUnlockPromotions{"EasyUnlockPromotions", ...@@ -650,6 +650,11 @@ const base::Feature kEasyUnlockPromotions{"EasyUnlockPromotions",
const base::Feature kTPMFirmwareUpdate{"TPMFirmwareUpdate", const base::Feature kTPMFirmwareUpdate{"TPMFirmwareUpdate",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
// Enables or disables "usm" service in the list of user services returned by
// userInfo Gaia message.
const base::Feature kCrOSEnableUSMUserService{
"CrOSEnableUSMUserService", base::FEATURE_DISABLED_BY_DEFAULT};
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
} // namespace features } // namespace features
...@@ -351,6 +351,8 @@ extern const base::Feature kInstantTethering; ...@@ -351,6 +351,8 @@ extern const base::Feature kInstantTethering;
extern const base::Feature kEasyUnlockPromotions; extern const base::Feature kEasyUnlockPromotions;
extern const base::Feature kTPMFirmwareUpdate; extern const base::Feature kTPMFirmwareUpdate;
extern const base::Feature kCrOSEnableUSMUserService;
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
bool PrefServiceEnabled(); bool PrefServiceEnabled();
......
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