[iOS][cr/b] Move about_flags.* to flags/

Bug: 973040.
Change-Id: If94a974ab68c947144cd0df04f3a843fadd391d2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1678477
Commit-Queue: Nazerke Kalidolda <[email protected]>
Commit-Queue: Gauthier Ambard <[email protected]>
Reviewed-by: Gauthier Ambard <[email protected]>
Reviewed-by: Mark Cogan <[email protected]>
Auto-Submit: Nazerke Kalidolda <[email protected]>
Cr-Commit-Position: refs/heads/master@{#672522}
diff --git a/ios/chrome/browser/BUILD.gn b/ios/chrome/browser/BUILD.gn
index d606b43..0b786f6 100644
--- a/ios/chrome/browser/BUILD.gn
+++ b/ios/chrome/browser/BUILD.gn
@@ -25,8 +25,6 @@
 source_set("browser") {
   configs += [ "//build/config/compiler:enable_arc" ]
   sources = [
-    "about_flags.h",
-    "about_flags.mm",
     "app_startup_parameters.h",
     "app_startup_parameters.mm",
     "application_context.cc",
@@ -205,6 +203,7 @@
     "//ios/chrome/browser/browser_state:browser_state_impl",
     "//ios/chrome/browser/component_updater",
     "//ios/chrome/browser/first_run",
+    "//ios/chrome/browser/flags",
     "//ios/chrome/browser/gcm",
     "//ios/chrome/browser/history",
     "//ios/chrome/browser/metrics",
diff --git a/ios/chrome/browser/flags/BUILD.gn b/ios/chrome/browser/flags/BUILD.gn
new file mode 100644
index 0000000..576cbab
--- /dev/null
+++ b/ios/chrome/browser/flags/BUILD.gn
@@ -0,0 +1,59 @@
+# Copyright 2019 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("flags") {
+  configs += [ "//build/config/compiler:enable_arc" ]
+  sources = [
+    "about_flags.h",
+    "about_flags.mm",
+  ]
+
+  deps = [
+    "//base",
+    "//components/autofill/core/common",
+    "//components/autofill/ios/browser",
+    "//components/dom_distiller/core",
+    "//components/feature_engagement/public",
+    "//components/flags_ui",
+    "//components/flags_ui:switches",
+    "//components/invalidation/impl:feature_list",
+    "//components/ntp_tiles",
+    "//components/omnibox/browser",
+    "//components/omnibox/common",
+    "//components/password_manager/core/common",
+    "//components/payments/core",
+    "//components/search_provider_logos",
+    "//components/security_state/core",
+    "//components/send_tab_to_self",
+    "//components/signin/core/browser",
+    "//components/signin/core/browser:shared",
+    "//components/strings:components_strings",
+    "//components/sync/driver",
+    "//components/translate/core/browser",
+    "//components/ukm/ios:features",
+    "//components/unified_consent",
+    "//components/variations",
+    "//ios/chrome/app/strings:ios_strings",
+    "//ios/chrome/browser",
+    "//ios/chrome/browser/app_launcher:feature_flags",
+    "//ios/chrome/browser/browsing_data:feature_flags",
+    "//ios/chrome/browser/crash_report:flags",
+    "//ios/chrome/browser/drag_and_drop",
+    "//ios/chrome/browser/find_in_page:feature_flags",
+    "//ios/chrome/browser/passwords:feature_flags",
+    "//ios/chrome/browser/reading_list:features",
+    "//ios/chrome/browser/signin:feature_flags",
+    "//ios/chrome/browser/ui:feature_flags",
+    "//ios/chrome/browser/ui/dialogs:feature_flags",
+    "//ios/chrome/browser/ui/fullscreen:feature_flags",
+    "//ios/chrome/browser/ui/infobars:feature_flags",
+    "//ios/chrome/browser/ui/toolbar/public:feature_flags",
+    "//ios/chrome/browser/ui/toolbar_container:feature_flags",
+    "//ios/chrome/browser/web:feature_flags",
+    "//ios/public/provider/chrome/browser",
+    "//ios/web/common",
+    "//ios/web/public",
+    "//ios/web/public:user_agent",
+  ]
+}
diff --git a/ios/chrome/browser/about_flags.h b/ios/chrome/browser/flags/about_flags.h
similarity index 92%
rename from ios/chrome/browser/about_flags.h
rename to ios/chrome/browser/flags/about_flags.h
index a9b894b..65021447 100644
--- a/ios/chrome/browser/about_flags.h
+++ b/ios/chrome/browser/flags/about_flags.h
@@ -5,8 +5,8 @@
 // Implementation of about_flags for iOS that sets flags based on experimental
 // settings.
 
-#ifndef IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
-#define IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
+#ifndef IOS_CHROME_BROWSER_FLAGS_ABOUT_FLAGS_H_
+#define IOS_CHROME_BROWSER_FLAGS_ABOUT_FLAGS_H_
 
 #include <stddef.h>
 #include <string>
@@ -17,7 +17,7 @@
 namespace base {
 class CommandLine;
 class ListValue;
-}
+}  // namespace base
 
 namespace flags_ui {
 class FlagsStorage;
@@ -62,4 +62,4 @@
 
 }  // namespace testing
 
-#endif  // IOS_CHROME_BROWSER_ABOUT_FLAGS_H_
+#endif  // IOS_CHROME_BROWSER_FLAGS_ABOUT_FLAGS_H_
diff --git a/ios/chrome/browser/about_flags.mm b/ios/chrome/browser/flags/about_flags.mm
similarity index 99%
rename from ios/chrome/browser/about_flags.mm
rename to ios/chrome/browser/flags/about_flags.mm
index 99b5095..4b035a7 100644
--- a/ios/chrome/browser/about_flags.mm
+++ b/ios/chrome/browser/flags/about_flags.mm
@@ -5,11 +5,11 @@
 // Implementation of about_flags for iOS that sets flags based on experimental
 // settings.
 
-#include "ios/chrome/browser/about_flags.h"
+#include "ios/chrome/browser/flags/about_flags.h"
 
+#import <UIKit/UIKit.h>
 #include <stddef.h>
 #include <stdint.h>
-#import <UIKit/UIKit.h>
 
 #include "base/base_switches.h"
 #include "base/bind.h"
diff --git a/ios/chrome/browser/ios_chrome_main_parts.mm b/ios/chrome/browser/ios_chrome_main_parts.mm
index d41dcda7..96c5e58 100644
--- a/ios/chrome/browser/ios_chrome_main_parts.mm
+++ b/ios/chrome/browser/ios_chrome_main_parts.mm
@@ -33,13 +33,13 @@
 #include "components/variations/synthetic_trials_active_group_id_provider.h"
 #include "components/variations/variations_crash_keys.h"
 #include "components/variations/variations_http_header_provider.h"
-#include "ios/chrome/browser/about_flags.h"
 #include "ios/chrome/browser/application_context_impl.h"
 #include "ios/chrome/browser/browser_state/browser_state_keyed_service_factories.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state_manager.h"
 #include "ios/chrome/browser/chrome_paths.h"
 #import "ios/chrome/browser/first_run/first_run.h"
+#include "ios/chrome/browser/flags/about_flags.h"
 #include "ios/chrome/browser/install_time_util.h"
 #include "ios/chrome/browser/metrics/ios_expired_histograms_array.h"
 #include "ios/chrome/browser/open_from_clipboard/create_clipboard_recent_content.h"
diff --git a/ios/chrome/browser/ui/webui/BUILD.gn b/ios/chrome/browser/ui/webui/BUILD.gn
index 634b672c..5e0e3a3 100644
--- a/ios/chrome/browser/ui/webui/BUILD.gn
+++ b/ios/chrome/browser/ui/webui/BUILD.gn
@@ -58,6 +58,7 @@
     "//ios/chrome/browser/browser_state",
     "//ios/chrome/browser/crash_report",
     "//ios/chrome/browser/favicon:favicon",
+    "//ios/chrome/browser/flags",
     "//ios/chrome/browser/metrics",
     "//ios/chrome/browser/ntp_tiles",
     "//ios/chrome/browser/passwords",
diff --git a/ios/chrome/browser/ui/webui/flags_ui.cc b/ios/chrome/browser/ui/webui/flags_ui.cc
index a03ee05..f852803 100644
--- a/ios/chrome/browser/ui/webui/flags_ui.cc
+++ b/ios/chrome/browser/ui/webui/flags_ui.cc
@@ -23,10 +23,10 @@
 #include "components/strings/grit/components_chromium_strings.h"
 #include "components/strings/grit/components_strings.h"
 #include "components/version_info/version_info.h"
-#include "ios/chrome/browser/about_flags.h"
 #include "ios/chrome/browser/application_context.h"
 #include "ios/chrome/browser/browser_state/chrome_browser_state.h"
 #include "ios/chrome/browser/chrome_url_constants.h"
+#include "ios/chrome/browser/flags/about_flags.h"
 #include "ios/web/public/webui/web_ui_ios.h"
 #include "ios/web/public/webui/web_ui_ios_data_source.h"
 #include "ios/web/public/webui/web_ui_ios_message_handler.h"