Skip to content

Commit

Permalink
[ios] Move ScreenTime feature flag out of ios/c/b/ui
Browse files Browse the repository at this point in the history
* Moves feature flag file to //ios/chrome/browser/screen_time

This was placed in the wrong place to begin with.
This ensures that //ios/c/b does not depend on //ios/c/b/ui.

Bug: 1123704
Change-Id: I103ad33fc14b56109249ee794c1e52a92f1a8a2b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2393300
Commit-Queue: edchin <edchin@chromium.org>
Reviewed-by: Rohit Rao <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807119}
  • Loading branch information
edx246 authored and Commit Bot committed Sep 15, 2020
1 parent 2075d60 commit 769d8a1
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 18 deletions.
2 changes: 1 addition & 1 deletion ios/chrome/browser/flags/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ source_set("flags") {
"//ios/chrome/browser/drag_and_drop",
"//ios/chrome/browser/open_in:features",
"//ios/chrome/browser/policy:feature_flags",
"//ios/chrome/browser/screen_time:feature_flags",
"//ios/chrome/browser/ui:feature_flags",
"//ios/chrome/browser/ui/content_suggestions:feature_flags",
"//ios/chrome/browser/ui/download:features",
"//ios/chrome/browser/ui/fullscreen:feature_flags",
"//ios/chrome/browser/ui/infobars:feature_flags",
"//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/tab_grid:features",
"//ios/chrome/browser/ui/table_view:feature_flags",
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/flags/about_flags.mm
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@
#include "ios/chrome/browser/flags/ios_chrome_flag_descriptions.h"
#import "ios/chrome/browser/open_in/features.h"
#include "ios/chrome/browser/policy/policy_features.h"
#include "ios/chrome/browser/screen_time/features.h"
#include "ios/chrome/browser/system_flags.h"
#import "ios/chrome/browser/ui/content_suggestions/content_suggestions_feature.h"
#import "ios/chrome/browser/ui/download/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/page_info/features.h"
#include "ios/chrome/browser/ui/screen_time/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/table_view/feature_flags.h"
Expand Down
12 changes: 12 additions & 0 deletions ios/chrome/browser/screen_time/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# 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" ]
}
4 changes: 4 additions & 0 deletions ios/chrome/browser/screen_time/OWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
edchin@chromium.org

# TEAM: ios-directory-owners@chromium.org
# OS: iOS
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// 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_
#ifndef IOS_CHROME_BROWSER_SCREEN_TIME_FEATURES_H_
#define IOS_CHROME_BROWSER_SCREEN_TIME_FEATURES_H_

#include "base/feature_list.h"

Expand All @@ -13,4 +13,4 @@ extern const base::Feature kScreenTimeIntegration;
// Returns true if ScreenTime integration is enabled.
bool IsScreenTimeIntegrationEnabled();

#endif // IOS_CHROME_BROWSER_UI_SCREEN_TIME_FEATURES_H_
#endif // IOS_CHROME_BROWSER_SCREEN_TIME_FEATURES_H_
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// 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"
#import "ios/chrome/browser/screen_time/features.h"

#if !defined(__has_feature) || !__has_feature(objc_arc)
#error "This file requires ARC support."
Expand Down
2 changes: 1 addition & 1 deletion ios/chrome/browser/ui/browser_container/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ source_set("browser_container") {
"//ios/chrome/browser/main",
"//ios/chrome/browser/overlays",
"//ios/chrome/browser/overlays/public/web_content_area",
"//ios/chrome/browser/screen_time:feature_flags",
"//ios/chrome/browser/ui/coordinators:chrome_coordinators",
"//ios/chrome/browser/ui/overlays",
"//ios/chrome/browser/ui/screen_time",
"//ios/chrome/browser/ui/screen_time:feature_flags",
"//ios/chrome/browser/web_state_list",
"//ios/web/public",
"//url",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include "base/check.h"
#import "ios/chrome/browser/main/browser.h"
#import "ios/chrome/browser/overlays/public/overlay_presenter.h"
#import "ios/chrome/browser/screen_time/features.h"
#import "ios/chrome/browser/ui/browser_container/browser_container_mediator.h"
#import "ios/chrome/browser/ui/browser_container/browser_container_view_controller.h"
#import "ios/chrome/browser/ui/overlays/overlay_container_coordinator.h"
#import "ios/chrome/browser/ui/screen_time/features.h"
#include "url/gurl.h"

#if defined(__IPHONE_14_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_14_0
Expand Down
10 changes: 0 additions & 10 deletions ios/chrome/browser/ui/screen_time/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ source_set("screen_time") {
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [
":feature_flags",
"//base",
"//ios/chrome/browser/browser_state",
"//ios/chrome/browser/main:public",
Expand All @@ -35,12 +34,3 @@ source_set("screen_time") {
]
}
}

source_set("feature_flags") {
sources = [
"features.h",
"features.mm",
]
configs += [ "//build/config/compiler:enable_arc" ]
deps = [ "//base" ]
}

0 comments on commit 769d8a1

Please sign in to comment.