Export GetFieldTrialParamByFeatureAsTimeDelta function

This CL exports GetFieldTrialParamByFeatureAsTimeDelta function to be
accessible from outside.

Bug: 1475915
Change-Id: I25d3da13dabf6815cf5e1f6dbfa7e86c01b0b540
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4891966
Reviewed-by: Alexei Svitkine <[email protected]>
Commit-Queue: Minoru Chikamune <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1201913}
diff --git a/base/metrics/field_trial_params.h b/base/metrics/field_trial_params.h
index e15465b..6807fc7 100644
--- a/base/metrics/field_trial_params.h
+++ b/base/metrics/field_trial_params.h
@@ -109,6 +109,15 @@
     const std::string& param_name,
     bool default_value);
 
+// Same as GetFieldTrialParamValueByFeature(). On top of that, it converts the
+// string value into a base::TimeDelta and returns it, if successful. Otherwise,
+// it returns `default_value`. If the string value is not empty and the
+// conversion does not succeed, it produces a warning to LOG.
+BASE_EXPORT base::TimeDelta GetFieldTrialParamByFeatureAsTimeDelta(
+    const Feature& feature,
+    const std::string& param_name,
+    base::TimeDelta default_value);
+
 // Shared declaration for various FeatureParam<T> types.
 //
 // This template is defined for the following types T: