Commit fb25f09c authored by Danan S's avatar Danan S Committed by Commit Bot

Put Supervised User deprecation notices behind a feature flag

The feature is enabled by default.  The feature flag is:
SupervisedUserDeprecationNotice.

Bug: 899017
Change-Id: Ibe8257043fae62e6bad7f98c3ec936803f75afed
Reviewed-on: https://chromium-review.googlesource.com/c/1344871Reviewed-by: default avatarJacob Dufault <jdufault@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Reviewed-by: default avatarDan Erat <derat@chromium.org>
Commit-Queue: Danan S <danan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611366}
parent 6ffc46e2
...@@ -1475,7 +1475,8 @@ void LockContentsView::OnBigUserChanged() { ...@@ -1475,7 +1475,8 @@ void LockContentsView::OnBigUserChanged() {
} }
// http://crbug/866790: After Supervised Users are deprecated, remove this. // http://crbug/866790: After Supervised Users are deprecated, remove this.
if (big_user->basic_user_info->type == user_manager::USER_TYPE_SUPERVISED) { if (ash::features::IsSupervisedUserDeprecationNoticeEnabled() &&
big_user->basic_user_info->type == user_manager::USER_TYPE_SUPERVISED) {
base::string16 message = l10n_util::GetStringUTF16( base::string16 message = l10n_util::GetStringUTF16(
IDS_ASH_LOGIN_POD_LEGACY_SUPERVISED_EXPIRATION_WARNING); IDS_ASH_LOGIN_POD_LEGACY_SUPERVISED_EXPIRATION_WARNING);
// Shows supervised user deprecation message as a persistent error bubble. // Shows supervised user deprecation message as a persistent error bubble.
......
...@@ -63,6 +63,9 @@ const base::Feature kViewsLogin{"ViewsLogin", base::FEATURE_ENABLED_BY_DEFAULT}; ...@@ -63,6 +63,9 @@ const base::Feature kViewsLogin{"ViewsLogin", base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kUseBluetoothSystemInAsh{"UseBluetoothSystemInAsh", const base::Feature kUseBluetoothSystemInAsh{"UseBluetoothSystemInAsh",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kSupervisedUserDeprecationNotice{
"SupervisedUserDeprecationNotice", base::FEATURE_ENABLED_BY_DEFAULT};
bool IsDockedMagnifierEnabled() { bool IsDockedMagnifierEnabled() {
return base::FeatureList::IsEnabled(kDockedMagnifier); return base::FeatureList::IsEnabled(kDockedMagnifier);
} }
...@@ -119,5 +122,9 @@ bool IsViewsLoginEnabled() { ...@@ -119,5 +122,9 @@ bool IsViewsLoginEnabled() {
base::FeatureList::IsEnabled(kViewsLogin); base::FeatureList::IsEnabled(kViewsLogin);
} }
bool IsSupervisedUserDeprecationNoticeEnabled() {
return base::FeatureList::IsEnabled(kSupervisedUserDeprecationNotice);
}
} // namespace features } // namespace features
} // namespace ash } // namespace ash
...@@ -82,6 +82,9 @@ ASH_PUBLIC_EXPORT extern const base::Feature kViewsLogin; ...@@ -82,6 +82,9 @@ ASH_PUBLIC_EXPORT extern const base::Feature kViewsLogin;
// Enables using the BluetoothSystem Mojo interface for Bluetooth operations. // Enables using the BluetoothSystem Mojo interface for Bluetooth operations.
ASH_PUBLIC_EXPORT extern const base::Feature kUseBluetoothSystemInAsh; ASH_PUBLIC_EXPORT extern const base::Feature kUseBluetoothSystemInAsh;
// Enables the Supervised User Deprecation notices.
ASH_PUBLIC_EXPORT extern const base::Feature kSupervisedUserDeprecationNotice;
ASH_PUBLIC_EXPORT bool IsDockedMagnifierEnabled(); ASH_PUBLIC_EXPORT bool IsDockedMagnifierEnabled();
ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerAppEnabled(); ASH_PUBLIC_EXPORT bool IsKeyboardShortcutViewerAppEnabled();
...@@ -106,6 +109,8 @@ ASH_PUBLIC_EXPORT bool IsTrilinearFilteringEnabled(); ...@@ -106,6 +109,8 @@ ASH_PUBLIC_EXPORT bool IsTrilinearFilteringEnabled();
ASH_PUBLIC_EXPORT bool IsViewsLoginEnabled(); ASH_PUBLIC_EXPORT bool IsViewsLoginEnabled();
ASH_PUBLIC_EXPORT bool IsSupervisedUserDeprecationNoticeEnabled();
} // namespace features } // namespace features
} // namespace ash } // namespace ash
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "ash/public/cpp/ash_features.h"
#include "ash/public/cpp/notification_utils.h" #include "ash/public/cpp/notification_utils.h"
#include "ash/public/cpp/vector_icons/vector_icons.h" #include "ash/public/cpp/vector_icons/vector_icons.h"
#include "base/base_paths.h" #include "base/base_paths.h"
...@@ -1343,7 +1344,8 @@ void UserSessionManager::UserProfileInitialized(Profile* profile, ...@@ -1343,7 +1344,8 @@ void UserSessionManager::UserProfileInitialized(Profile* profile,
bool is_incognito_profile, bool is_incognito_profile,
const AccountId& account_id) { const AccountId& account_id) {
// http://crbug/866790: After Supervised Users are deprecated, remove this. // http://crbug/866790: After Supervised Users are deprecated, remove this.
if (user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser()) if (ash::features::IsSupervisedUserDeprecationNoticeEnabled() &&
user_manager::UserManager::Get()->IsLoggedInAsSupervisedUser())
ShowSupervisedUserDeprecationNotification(profile); ShowSupervisedUserDeprecationNotification(profile);
// Demo user signed in. // Demo user signed in.
......
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