Expose warn-only and enforce mode to chrome://flags

The feature CheckOfflineCapability feature has 3 states: disabled,
enabled with warn-only, and enabled with enforce.
This CL exposes all states of the feature to chrome://flags.

Bug: 965802
Change-Id: I657ffd8032016dead0115a59fcf6f2ca14a8d301
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517278
Commit-Queue: Asami Doi <[email protected]>
Reviewed-by: Makoto Shimazu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#825242}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 6a06859..55904cd 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2377,6 +2377,18 @@
 };
 #endif  // !defined(OS_ANDROID)
 
+const FeatureEntry::FeatureParam kCheckOfflineCapabilityWarnOnly[] = {
+    {"check_mode", "warn_only"}};
+const FeatureEntry::FeatureParam kCheckOfflineCapabilityEnforce[] = {
+    {"check_mode", "enforce"}};
+
+const FeatureEntry::FeatureVariation kCheckOfflineCapabilityVariations[] = {
+    {"Warn-only", kCheckOfflineCapabilityWarnOnly,
+     base::size(kCheckOfflineCapabilityWarnOnly), nullptr},
+    {"Enforce", kCheckOfflineCapabilityEnforce,
+     base::size(kCheckOfflineCapabilityEnforce), nullptr},
+};
+
 // RECORDING USER METRICS FOR FLAGS:
 // -----------------------------------------------------------------------------
 // The first line of the entry is the internal name.
@@ -6658,7 +6670,9 @@
 
     {"check-offline-capability", flag_descriptions::kCheckOfflineCapabilityName,
      flag_descriptions::kCheckOfflineCapabilityDescription, kOsAll,
-     FEATURE_VALUE_TYPE(blink::features::kCheckOfflineCapability)},
+     FEATURE_WITH_PARAMS_VALUE_TYPE(blink::features::kCheckOfflineCapability,
+                                    kCheckOfflineCapabilityVariations,
+                                    "CheckOfflineCapability")},
 
     // NOTE: Adding a new flag requires adding a corresponding entry to enum
     // "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag