Commit ff4ac858 authored by Tina Wang's avatar Tina Wang Committed by Commit Bot

[ios] Add feature flag for incognito mode feature

Add a feature flag to guard the changes for IncognitoModeAvailability
policy related changes.

Bug: 1148838
Change-Id: Ibc563259651424c61e189b9ee74dc5c96135af91
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2555257
Commit-Queue: Tina Wang <tinazwang@chromium.org>
Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Reviewed-by: default avatarSergio Collazos <sczs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#830642}
parent 37bc1635
...@@ -1719,6 +1719,11 @@ ...@@ -1719,6 +1719,11 @@
"owners": [ "stkhapugin", "bling-flags@google.com" ], "owners": [ "stkhapugin", "bling-flags@google.com" ],
"expiry_milestone": 90 "expiry_milestone": 90
}, },
{
"name": "enable-incognito-mode-availability-ios",
"owners": [ "tinazwang", "sebsg" ],
"expiry_milestone": 92
},
{ {
"name": "enable-incognito-shortcut-on-desktop", "name": "enable-incognito-shortcut-on-desktop",
"owners": [ "rhalavati", "chrome-privacy-core@google.com" ], "owners": [ "rhalavati", "chrome-privacy-core@google.com" ],
......
...@@ -624,6 +624,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -624,6 +624,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flag_descriptions::kIncognitoAuthenticationName, flag_descriptions::kIncognitoAuthenticationName,
flag_descriptions::kIncognitoAuthenticationDescription, flags_ui::kOsIos, flag_descriptions::kIncognitoAuthenticationDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kIncognitoAuthentication)}, FEATURE_VALUE_TYPE(kIncognitoAuthentication)},
{"enable-incognito-mode-availability-ios",
flag_descriptions::kEnableIncognitoModeAvailabilityIOSName,
flag_descriptions::kEnableIncognitoModeAvailabilityIOSDescription,
flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableIncognitoModeAvailabilityIOS)},
{"web-view-native-context-menu", {"web-view-native-context-menu",
flag_descriptions::kWebViewNativeContextMenuName, flag_descriptions::kWebViewNativeContextMenuName,
flag_descriptions::kWebViewNativeContextMenuDescription, flags_ui::kOsIos, flag_descriptions::kWebViewNativeContextMenuDescription, flags_ui::kOsIos,
......
...@@ -198,6 +198,12 @@ const char kEnableFullPageScreenshotDescription[] = ...@@ -198,6 +198,12 @@ const char kEnableFullPageScreenshotDescription[] =
"Enables the option of capturing an entire webpage as a PDF when a " "Enables the option of capturing an entire webpage as a PDF when a "
"screenshot is taken."; "screenshot is taken.";
const char kEnableIncognitoModeAvailabilityIOSName[] =
"Enable Incognito Mode Management on IOS ";
const char kEnableIncognitoModeAvailabilityIOSDescription[] =
"Enable the corresponding behaviours and UIs when incognito mode is "
"managed by the organization.";
const char kEnableIOSManagedSettingsUIName[] = "Enable IOS Managed Settings UI"; const char kEnableIOSManagedSettingsUIName[] = "Enable IOS Managed Settings UI";
const char kEnableIOSManagedSettingsUIDescription[] = const char kEnableIOSManagedSettingsUIDescription[] =
"Enable showing a different UI when the setting is managed by an " "Enable showing a different UI when the setting is managed by an "
......
...@@ -179,6 +179,10 @@ extern const char kEnableCloseAllTabsConfirmationDescription[]; ...@@ -179,6 +179,10 @@ extern const char kEnableCloseAllTabsConfirmationDescription[];
extern const char kEnableFullPageScreenshotName[]; extern const char kEnableFullPageScreenshotName[];
extern const char kEnableFullPageScreenshotDescription[]; extern const char kEnableFullPageScreenshotDescription[];
// Title and description for the flag to enable incognito mode management.
extern const char kEnableIncognitoModeAvailabilityIOSName[];
extern const char kEnableIncognitoModeAvailabilityIOSDescription[];
// Title and description for the flag to enable to show a different UI when the // Title and description for the flag to enable to show a different UI when the
// setting is managed by an enterprise policy. // setting is managed by an enterprise policy.
extern const char kEnableIOSManagedSettingsUIName[]; extern const char kEnableIOSManagedSettingsUIName[];
......
...@@ -18,6 +18,9 @@ const base::Feature kEditBookmarksIOS{"EditBookmarksIOS", ...@@ -18,6 +18,9 @@ const base::Feature kEditBookmarksIOS{"EditBookmarksIOS",
const base::Feature kManagedBookmarksIOS{"ManagedBookmarksIOS", const base::Feature kManagedBookmarksIOS{"ManagedBookmarksIOS",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kEnableIncognitoModeAvailabilityIOS{
"EnableIncognitoModeAvailabilityIOS", base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kURLBlocklistIOS{"URLBlocklistIOS", const base::Feature kURLBlocklistIOS{"URLBlocklistIOS",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
...@@ -48,6 +51,10 @@ bool IsEnterprisePolicyEnabled() { ...@@ -48,6 +51,10 @@ bool IsEnterprisePolicyEnabled() {
return !IsDisableEnterprisePolicySwitchPresent(); return !IsDisableEnterprisePolicySwitchPresent();
} }
bool IsIncognitoModeAvailable() {
return base::FeatureList::IsEnabled(kEnableIncognitoModeAvailabilityIOS);
}
bool ShouldInstallEnterprisePolicyHandlers() { bool ShouldInstallEnterprisePolicyHandlers() {
return IsEnterprisePolicyEnabled(); return IsEnterprisePolicyEnabled();
} }
......
...@@ -15,6 +15,11 @@ extern const base::Feature kManagedBookmarksIOS; ...@@ -15,6 +15,11 @@ extern const base::Feature kManagedBookmarksIOS;
// Feature flag for supporting the URLBlocklist enterprise policy on iOS. // Feature flag for supporting the URLBlocklist enterprise policy on iOS.
extern const base::Feature kURLBlocklistIOS; extern const base::Feature kURLBlocklistIOS;
// Feature flag for supporting the IncognitoModeAvailability enterprise policy
// on iOS. To define if the flag is set, using the helper method
// IsIncognitoModeAvailable().
extern const base::Feature kEnableIncognitoModeAvailabilityIOS;
// Returns true if the Chrome Browser Cloud Management flow is enabled. // Returns true if the Chrome Browser Cloud Management flow is enabled.
bool IsChromeBrowserCloudManagementEnabled(); bool IsChromeBrowserCloudManagementEnabled();
...@@ -26,6 +31,10 @@ bool IsEditBookmarksIOSEnabled(); ...@@ -26,6 +31,10 @@ bool IsEditBookmarksIOSEnabled();
// controlled by |ShouldInstallEnterprisePolicyHandlers()| below. // controlled by |ShouldInstallEnterprisePolicyHandlers()| below.
bool IsEnterprisePolicyEnabled(); bool IsEnterprisePolicyEnabled();
// Returns true if IncognitoModeAvailability enterprise policy is supported on
// iOS.
bool IsIncognitoModeAvailable();
// Returns true if enterprise policy handlers should be installed to parse // Returns true if enterprise policy handlers should be installed to parse
// policy data and make it user visible. // policy data and make it user visible.
bool ShouldInstallEnterprisePolicyHandlers(); bool ShouldInstallEnterprisePolicyHandlers();
......
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