Proper fix to the summary options problem.

It's better to set this to the right value in the C++ API rather
than the hack in catapult_uploader.py.

Bug: chromium:1029452
Change-Id: Ia942ff22f8422874cd226e6a7fdce20333ac4a50
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/170632
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30817}
diff --git a/test/testsupport/perf_test_histogram_writer.cc b/test/testsupport/perf_test_histogram_writer.cc
index 523834b..ad70d68 100644
--- a/test/testsupport/perf_test_histogram_writer.cc
+++ b/test/testsupport/perf_test_histogram_writer.cc
@@ -113,6 +113,10 @@
       proto::UnitAndDirection unit = ParseUnit(units, improve_direction);
       std::unique_ptr<catapult::HistogramBuilder> builder =
           std::make_unique<catapult::HistogramBuilder>(graph_name, unit);
+
+      // Set all summary options as false - we don't want to generate
+      // metric_std, metric_count, and so on for all metrics.
+      builder->SetSummaryOptions(proto::SummaryOptions());
       histograms_[measurement_and_story] = std::move(builder);
 
       proto::Diagnostic stories;
diff --git a/tools_webrtc/perf/catapult_uploader.py b/tools_webrtc/perf/catapult_uploader.py
index 96d1080..f3ec2ce 100644
--- a/tools_webrtc/perf/catapult_uploader.py
+++ b/tools_webrtc/perf/catapult_uploader.py
@@ -102,25 +102,9 @@
     json.dump(_ApplyHacks(histograms.AsDicts()), output_file, indent=4)
 
 
-# TODO(https://crbug.com/1029452): Remove this once
-# https://chromium-review.googlesource.com/c/catapult/+/2094312 lands.
-def _HackSummaryOptions(histograms):
-  for h in histograms:
-    h.CustomizeSummaryOptions({
-      'avg': False,
-      'std': False,
-      'count': False,
-      'sum': False,
-      'min': False,
-      'max': False,
-      'nans': False,
-    })
-
-
 def UploadToDashboard(options):
   histograms = _LoadHistogramSetFromProto(options)
   _AddBuildInfo(histograms, options)
-  _HackSummaryOptions(histograms)
 
   if options.output_json_file:
     _DumpOutput(histograms, options.output_json_file)