Add Feature Flag for On-The-Fly MHTML Hashing

Added new feature flag which all future work for On-The-Fly MHTML
hashing will be hidden behind.

Bug: 915966
Change-Id: I63e4453aef70d9cfb07066c2073ff640609328f0
Reviewed-on: https://chromium-review.googlesource.com/c/1372414
Reviewed-by: Elly Fong-Jones <[email protected]>
Reviewed-by: Carlos Knippschild <[email protected]>
Reviewed-by: Dan H <[email protected]>
Commit-Queue: Mark Lieu <[email protected]>
Cr-Commit-Position: refs/heads/master@{#620837}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 928b867..1551da7 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -2331,6 +2331,10 @@
      flag_descriptions::kOfflineIndicatorAlwaysHttpProbeDescription, kOsAndroid,
      FEATURE_VALUE_TYPE(
          offline_pages::kOfflineIndicatorAlwaysHttpProbeFeature)},
+    {"on-the-fly-mhtml-hash-computation",
+     flag_descriptions::kOnTheFlyMhtmlHashComputationName,
+     flag_descriptions::kOnTheFlyMhtmlHashComputationDescription, kOsAndroid,
+     FEATURE_VALUE_TYPE(offline_pages::kOnTheFlyMhtmlHashComputationFeature)},
 #endif  // OS_ANDROID
     {"disallow-doc-written-script-loads",
      flag_descriptions::kDisallowDocWrittenScriptsUiName,
diff --git a/chrome/browser/flag-metadata.json b/chrome/browser/flag-metadata.json
index 7c06775d..e21da34 100644
--- a/chrome/browser/flag-metadata.json
+++ b/chrome/browser/flag-metadata.json
@@ -2716,6 +2716,11 @@
     "expiry_milestone": 76
   },
   {
+    "name": "on-the-fly-mhtml-hash-computation",
+    "owners": [ "mtlieuu", "[email protected]" ],
+    "expiry_milestone": 76
+  },
+  {
     "name": "openvr",
     // "owners": [ "your-team" ],
     "expiry_milestone": 76
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
index 5d372ec..3f12a997 100644
--- a/chrome/browser/flag_descriptions.cc
+++ b/chrome/browser/flag_descriptions.cc
@@ -1397,6 +1397,12 @@
 const char kOnlyNewPasswordFormParsingDescription[] =
     "The old password form parsing is disabled";
 
+const char kOnTheFlyMhtmlHashComputationName[] =
+    "On-The-Fly MHTML Hash Computation";
+const char kOnTheFlyMhtmlHashComputationDescription[] =
+    "Save MHTML files to the target location and calculate their content "
+    "digests in one step.";
+
 const char kOopRasterizationName[] = "Out of process rasterization";
 const char kOopRasterizationDescription[] =
     "Perform Ganesh raster in the GPU Process instead of the renderer.  "
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
index 1c03096..b05b9cf 100644
--- a/chrome/browser/flag_descriptions.h
+++ b/chrome/browser/flag_descriptions.h
@@ -848,6 +848,9 @@
 extern const char kOmniboxVoiceSearchAlwaysVisibleName[];
 extern const char kOmniboxVoiceSearchAlwaysVisibleDescription[];
 
+extern const char kOnTheFlyMhtmlHashComputationName[];
+extern const char kOnTheFlyMhtmlHashComputationDescription[];
+
 extern const char kOopRasterizationName[];
 extern const char kOopRasterizationDescription[];