Commit 81467b8c authored by edchin's avatar edchin Committed by Commit Bot

[ios] Add ScreenTime experiment flag

Bug: 1123704
Change-Id: Ifb025407075376c7046c79e361bdc4c690db905d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2386843Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Reviewed-by: default avatarMike Dougherty <michaeldo@chromium.org>
Commit-Queue: edchin <edchin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#804357}
parent 014ef33b
...@@ -4019,6 +4019,11 @@ ...@@ -4019,6 +4019,11 @@
"owners": [ "bingler", "chlily" ], "owners": [ "bingler", "chlily" ],
"expiry_milestone": 90 "expiry_milestone": 90
}, },
{
"name": "screen-time-integration-ios",
"owners": [ "edchin", "bling-flags@google.com" ],
"expiry_milestone": 92
},
{ {
"name": "scroll-to-text-ios", "name": "scroll-to-text-ios",
"owners": [ "tmartino" ], "owners": [ "tmartino" ],
......
...@@ -56,6 +56,7 @@ source_set("flags") { ...@@ -56,6 +56,7 @@ source_set("flags") {
"//ios/chrome/browser/ui/fullscreen:feature_flags", "//ios/chrome/browser/ui/fullscreen:feature_flags",
"//ios/chrome/browser/ui/infobars:feature_flags", "//ios/chrome/browser/ui/infobars:feature_flags",
"//ios/chrome/browser/ui/page_info:features", "//ios/chrome/browser/ui/page_info:features",
"//ios/chrome/browser/ui/screen_time:feature_flags",
"//ios/chrome/browser/ui/settings/autofill:feature_flags", "//ios/chrome/browser/ui/settings/autofill:feature_flags",
"//ios/chrome/browser/ui/tab_grid:features", "//ios/chrome/browser/ui/tab_grid:features",
"//ios/chrome/browser/ui/table_view:feature_flags", "//ios/chrome/browser/ui/table_view:feature_flags",
......
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
#import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h" #import "ios/chrome/browser/ui/fullscreen/fullscreen_features.h"
#import "ios/chrome/browser/ui/infobars/infobar_feature.h" #import "ios/chrome/browser/ui/infobars/infobar_feature.h"
#import "ios/chrome/browser/ui/page_info/features.h" #import "ios/chrome/browser/ui/page_info/features.h"
#include "ios/chrome/browser/ui/screen_time/features.h"
#include "ios/chrome/browser/ui/settings/autofill/features.h" #include "ios/chrome/browser/ui/settings/autofill/features.h"
#import "ios/chrome/browser/ui/tab_grid/features.h" #import "ios/chrome/browser/ui/tab_grid/features.h"
#import "ios/chrome/browser/ui/table_view/feature_flags.h" #import "ios/chrome/browser/ui/table_view/feature_flags.h"
...@@ -682,6 +683,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = { ...@@ -682,6 +683,10 @@ const flags_ui::FeatureEntry kFeatureEntries[] = {
flag_descriptions::kEnableCloseAllTabsConfirmationName, flag_descriptions::kEnableCloseAllTabsConfirmationName,
flag_descriptions::kEnableCloseAllTabsConfirmationDescription, flag_descriptions::kEnableCloseAllTabsConfirmationDescription,
flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableCloseAllTabsConfirmation)}, flags_ui::kOsIos, FEATURE_VALUE_TYPE(kEnableCloseAllTabsConfirmation)},
{"screen-time-integration-ios",
flag_descriptions::kScreenTimeIntegrationName,
flag_descriptions::kScreenTimeIntegrationDescription, flags_ui::kOsIos,
FEATURE_VALUE_TYPE(kScreenTimeIntegration)},
}; };
bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) { bool SkipConditionalFeatureEntry(const flags_ui::FeatureEntry& entry) {
......
...@@ -426,6 +426,10 @@ const char kSaveCardInfobarMessagesUIName[] = "Save Card Infobar Messages UI"; ...@@ -426,6 +426,10 @@ const char kSaveCardInfobarMessagesUIName[] = "Save Card Infobar Messages UI";
const char kSaveCardInfobarMessagesUIDescription[] = const char kSaveCardInfobarMessagesUIDescription[] =
"When enabled, Save Card Infobar uses the new Messages UI."; "When enabled, Save Card Infobar uses the new Messages UI.";
const char kScreenTimeIntegrationName[] = "Enables ScreenTime Integration";
const char kScreenTimeIntegrationDescription[] =
"Enables integration with ScreenTime in iOS 14.0 and above.";
const char kScrollToTextIOSName[] = "Enable Scroll to Text"; const char kScrollToTextIOSName[] = "Enable Scroll to Text";
const char kScrollToTextIOSDescription[] = const char kScrollToTextIOSDescription[] =
"When enabled, opening a URL with a text fragment (e.g., " "When enabled, opening a URL with a text fragment (e.g., "
......
...@@ -367,6 +367,11 @@ extern const char kSafetyCheckIOSDescription[]; ...@@ -367,6 +367,11 @@ extern const char kSafetyCheckIOSDescription[];
extern const char kSaveCardInfobarMessagesUIName[]; extern const char kSaveCardInfobarMessagesUIName[];
extern const char kSaveCardInfobarMessagesUIDescription[]; extern const char kSaveCardInfobarMessagesUIDescription[];
// Title and description for the flag to enable integration with the ScreenTime
// system.
extern const char kScreenTimeIntegrationName[];
extern const char kScreenTimeIntegrationDescription[];
// Title and description for the flag to enable the Scroll to Text feature. // Title and description for the flag to enable the Scroll to Text feature.
extern const char kScrollToTextIOSName[]; extern const char kScrollToTextIOSName[];
extern const char kScrollToTextIOSDescription[]; extern const char kScrollToTextIOSDescription[];
......
# 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") {
sources = [
"features.h",
"features.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [ "//base" ]
}
edchin@chromium.org
michaeldo@chromium.org
# TEAM: ios-directory-owners@chromium.org
# OS: iOS
\ No newline at end of file
// 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_UI_SCREEN_TIME_FEATURES_H_
#define IOS_CHROME_BROWSER_UI_SCREEN_TIME_FEATURES_H_
#include "base/feature_list.h"
// Feature flag to enable ScreenTime integration.
extern const base::Feature kScreenTimeIntegration;
// Returns true if ScreenTime integration is enabled.
bool IsScreenTimeIntegrationEnabled();
#endif // IOS_CHROME_BROWSER_UI_SCREEN_TIME_FEATURES_H_
// 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.
#import "ios/chrome/browser/ui/screen_time/features.h"
#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
#endif
const base::Feature kScreenTimeIntegration{"ScreenTimeIntegration",
base::FEATURE_DISABLED_BY_DEFAULT};
bool IsScreenTimeIntegrationEnabled() {
if (@available(iOS 14, *)) {
return base::FeatureList::IsEnabled(kScreenTimeIntegration);
}
return false;
}
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