Commit 8eefc0a1 authored by Rohit Rao's avatar Rohit Rao Committed by Commit Bot

[ios] Adds a feature flag for policy support.

BUG=1024115

Change-Id: Ib9f9491d7650dba83d6cbc7ae822eaf04f907b92
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2057116
Commit-Queue: Rohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#742218}
parent 380f04f3
...@@ -45,6 +45,7 @@ source_set("flags") { ...@@ -45,6 +45,7 @@ source_set("flags") {
"//ios/chrome/browser/drag_and_drop", "//ios/chrome/browser/drag_and_drop",
"//ios/chrome/browser/find_in_page:feature_flags", "//ios/chrome/browser/find_in_page:feature_flags",
"//ios/chrome/browser/passwords:feature_flags", "//ios/chrome/browser/passwords:feature_flags",
"//ios/chrome/browser/policy:feature_flags",
"//ios/chrome/browser/ui:feature_flags", "//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/dialogs:feature_flags", "//ios/chrome/browser/ui/dialogs:feature_flags",
"//ios/chrome/browser/ui/fullscreen:feature_flags", "//ios/chrome/browser/ui/fullscreen:feature_flags",
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include "ios/chrome/browser/find_in_page/features.h" #include "ios/chrome/browser/find_in_page/features.h"
#include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h" #include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
#include "ios/chrome/browser/passwords/password_manager_features.h" #include "ios/chrome/browser/passwords/password_manager_features.h"
#include "ios/chrome/browser/policy/policy_features.h"
#include "ios/chrome/browser/system_flags.h" #include "ios/chrome/browser/system_flags.h"
#import "ios/chrome/browser/ui/dialogs/dialog_features.h" #import "ios/chrome/browser/ui/dialogs/dialog_features.h"
#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h" #import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
...@@ -593,6 +594,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -593,6 +594,9 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flags_ui::kOsIos, flags_ui::kOsIos,
FEATURE_VALUE_TYPE( FEATURE_VALUE_TYPE(
fullscreen::features::kFullscreenControllerBrowserScoped)}, fullscreen::features::kFullscreenControllerBrowserScoped)},
{"enterprise-policy-ios", flag_descriptions::kEnterprisePolicyIOSName,
flag_descriptions::kEnterprisePolicyIOSDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kEnterprisePolicyIOS)},
}; };
// Add all switches from experimental flags to |command_line|. // Add all switches from experimental flags to |command_line|.
......
...@@ -232,6 +232,10 @@ const char kEnableSyncUSSNigoriName[] = "Enable USS for sync encryption keys"; ...@@ -232,6 +232,10 @@ const char kEnableSyncUSSNigoriName[] = "Enable USS for sync encryption keys";
const char kEnableSyncUSSNigoriDescription[] = const char kEnableSyncUSSNigoriDescription[] =
"Enables the new, experimental implementation of sync encryption keys"; "Enables the new, experimental implementation of sync encryption keys";
const char kEnterprisePolicyIOSName[] = "Enable enterprise policy";
const char kEnterprisePolicyIOSDescription[] =
"When enabled, enterprise policies will be loaded and respected.";
const char kFindInPageiFrameName[] = "Find in Page in iFrames."; const char kFindInPageiFrameName[] = "Find in Page in iFrames.";
const char kFindInPageiFrameDescription[] = const char kFindInPageiFrameDescription[] =
"When enabled, Find In Page will search in iFrames."; "When enabled, Find In Page will search in iFrames.";
......
...@@ -196,6 +196,10 @@ extern const char kEnableSyncUSSPasswordsDescription[]; ...@@ -196,6 +196,10 @@ extern const char kEnableSyncUSSPasswordsDescription[];
extern const char kEnableSyncUSSNigoriName[]; extern const char kEnableSyncUSSNigoriName[];
extern const char kEnableSyncUSSNigoriDescription[]; extern const char kEnableSyncUSSNigoriDescription[];
// Title and description for the flag to enable enterprise policy.
extern const char kEnterprisePolicyIOSName[];
extern const char kEnterprisePolicyIOSDescription[];
// Title and description for the flag to search in iFrames in Find In Page. // Title and description for the flag to search in iFrames in Find In Page.
extern const char kFindInPageiFrameName[]; extern const char kFindInPageiFrameName[];
extern const char kFindInPageiFrameDescription[]; extern const char kFindInPageiFrameDescription[];
......
# Copyright 2020 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
source_set("feature_flags") {
configs += [ "//build/config/compiler:enable_arc" ]
sources = [
"policy_features.cc",
"policy_features.h",
]
deps = [ "//base" ]
}
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "ios/chrome/browser/policy/policy_features.h"
const base::Feature kEnterprisePolicyIOS{"EnterprisePolicyIOS",
base::FEATURE_DISABLED_BY_DEFAULT};
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_CHROME_BROWSER_POLICY_POLICY_FEATURES_H_
#define IOS_CHROME_BROWSER_POLICY_POLICY_FEATURES_H_
#include "base/feature_list.h"
// Feature flag to enable enterprise policy on iOS.
extern const base::Feature kEnterprisePolicyIOS;
#endif // IOS_CHROME_BROWSER_POLICY_POLICY_FEATURES_H_
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