description: remove dependencies on third_party catapult
author: Michael Gilbert <mgilbert@debian.org>


See https://bugs.debian.org/922431 for more details, but tl;dr: we should
bring this back and just get rid of the (common) minified stuff in catapult/third_party/.

Stuff like chai, jszip, and node-d3 are packaged for debian already.



--- a/BUILD.gn
+++ b/BUILD.gn
@@ -247,7 +247,6 @@ group("gn_all") {
     if (!is_ios) {
       deps += [
         "//google_apis/gcm:mcs_probe",
-        "//third_party/catapult/telemetry:bitmaptools($host_toolchain)",
       ]
       if (!is_android) {
         if (!is_castos) {
@@ -1164,7 +1163,6 @@ if (!is_ios && !is_cronet_build) {
       "//third_party/blink/public:blink_devtools_inspector_resources",
       "//third_party/blink/public/mojom:mojom_platform_js_data_deps",
       "//third_party/blink/renderer/core:gen_files_for_web_tests",
-      "//third_party/catapult/third_party/typ",
       "//third_party/hyphenation-patterns:test_data",
       "//third_party/mesa_headers",
       "//tools/imagediff",
@@ -1609,10 +1607,6 @@ if (!is_ios && !is_cronet_build) {
       "//third_party/blink/web_tests/VirtualTestSuites",
       "//third_party/blink/web_tests/W3CImportExpectations",
       "//third_party/blink/web_tests/paint/invalidation/repaint-overlay/",
-      "//third_party/catapult/common/py_utils/",
-      "//third_party/catapult/devil/",
-      "//third_party/catapult/dependency_manager/",
-      "//third_party/catapult/third_party/typ/",
       "//third_party/depot_tools/pylint-2.7",
       "//third_party/depot_tools/pylint_main.py",
       "//third_party/depot_tools/pylintrc",
--- a/tools/binary_size/BUILD.gn
+++ b/tools/binary_size/BUILD.gn
@@ -20,7 +20,6 @@ python_library("sizes_py") {
   pydeps_file = "sizes.pydeps"
   data_deps = [
     "//build/util:test_results",
-    "//third_party/catapult/tracing:convert_chart_json",
   ]
 }
 
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -11381,8 +11381,6 @@ if (!is_android && !is_fuchsia) {
       "//chrome/test/data/password/captured_sites/",
       "//chrome/test/data/web_page_replay_go_helper_scripts/automation_helper.js",
       "//components/test/data/autofill/web_page_replay_support_files/",
-      "//third_party/catapult/telemetry/telemetry/bin/",
-      "//third_party/catapult/web_page_replay_go/deterministic.js",
     ]
 
     if (is_linux || is_chromeos || is_win) {
@@ -11469,7 +11467,6 @@ if (!is_android) {
     deps = [ "//tools/perf/chrome_telemetry_build:telemetry_chrome_test" ]
 
     data = [
-      "//third_party/catapult/telemetry/telemetry/internal/bin/",
       "//tools/perf/run_telemetry_tests",
       "//testing/scripts/run_telemetry_as_googletest.py",
     ]
--- a/tools/grit/BUILD.gn
+++ b/tools/grit/BUILD.gn
@@ -33,7 +33,6 @@ group("grit_python_unittests") {
   data = [
     "//testing/scripts/run_isolated_script_test.py",
     "//tools/grit/",
-    "//third_party/catapult/third_party/typ/",
     "//third_party/node/",
   ]
 }
--- a/tools/metrics/BUILD.gn
+++ b/tools/metrics/BUILD.gn
@@ -45,7 +45,6 @@ group("metrics_python_tests") {
     # The run_isolated_script_test.py script and its dependencies.
     "//testing/scripts/run_isolated_script_test.py",
     "//testing/scripts/common.py",
-    "//third_party/catapult/third_party/typ/",
 
     # Scripts we depend on. Their unit tests are also included.
     "//tools/json_comment_eater/json_comment_eater.py",
--- a/tools/perf/chrome_telemetry_build/BUILD.gn
+++ b/tools/perf/chrome_telemetry_build/BUILD.gn
@@ -167,7 +167,6 @@ group("telemetry_chrome_test_without_chr
   ]
   data_deps = [
     "//testing:test_scripts_shared",
-    "//third_party/catapult:telemetry_chrome_test_support",
     "//tools/metrics:metrics_python_tests",
   ]
 
@@ -219,7 +218,5 @@ group("telemetry_chrome_test_without_chr
       "//build/android:devil_chromium_py",
       "//build/android:stack_tools",
     ]
-  } else if (!is_fuchsia) {
-    data_deps += [ "//third_party/catapult/telemetry:bitmaptools" ]
   }
 }
--- a/tools/polymer/BUILD.gn
+++ b/tools/polymer/BUILD.gn
@@ -8,7 +8,6 @@ group("polymer_tools_python_unittests")
   data = [
     "//testing/scripts/run_isolated_script_test.py",
     "//tools/polymer/",
-    "//third_party/catapult/third_party/typ/",
   ]
   data_deps = [ "//testing:test_scripts_shared" ]
 }
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -1003,11 +1003,6 @@
     "includes": [6340],
   },
 
-  # This file is generated during the build.
-  "<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.grd": {
-    "META": {"sizes": {"includes": [20],}},
-    "includes": [6360],
-  },
   # END content/ section.
 
   # START "everything else" section.
--- a/chrome/chrome_paks.gni
+++ b/chrome/chrome_paks.gni
@@ -189,13 +189,11 @@ template("chrome_extra_paks") {
         "$root_gen_dir/chrome/webui_gallery_resources.pak",
         "$root_gen_dir/chrome/whats_new_resources.pak",
         "$root_gen_dir/content/browser/devtools/devtools_resources.pak",
-        "$root_gen_dir/content/browser/tracing/tracing_resources.pak",
       ]
       deps += [
         "//chrome/browser/resources:component_extension_resources",
         "//chrome/browser/resources:dev_ui_paks",
         "//content/browser/devtools:devtools_resources",
-        "//content/browser/tracing:resources",
       ]
       if (is_chrome_branded) {
         sources += [
--- a/content/shell/BUILD.gn
+++ b/content/shell/BUILD.gn
@@ -531,11 +531,6 @@ repack("pak") {
     sources += [ "$root_gen_dir/content/webxr_internals_resources.pak" ]
   }
 
-  if (!is_android) {
-    deps += [ "//content/browser/tracing:resources" ]
-    sources += [ "$root_gen_dir/content/browser/tracing/tracing_resources.pak" ]
-  }
-
   if (is_ios) {
     sources += [
       "$root_gen_dir/device/bluetooth/strings/bluetooth_strings_en-US.pak",
--- a/content/browser/tracing/BUILD.gn
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 2014 The Chromium Authors
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import("//tools/grit/grit_rule.gni")
-import("//ui/webui/resources/tools/generate_grd.gni")
-
-assert(!is_android)
-
-# The script just writes filename with no dirs to the .grd, so we always need
-# this file to be in the same directory as the inputs.
-tracing_grd = "$target_gen_dir/tracing_resources.grd"
-
-generate_grd("build_grd") {
-  grd_prefix = "tracing"
-  out_grd = tracing_grd
-  input_files = [
-    "about_tracing.html",
-    "about_tracing.js",
-  ]
-  input_files_base_dir = rebase_path(target_gen_dir, root_build_dir)
-  deps = [ "//third_party/catapult/tracing:generate_about_tracing" ]
-}
-
-grit("resources") {
-  source = tracing_grd
-
-  # Required because the .grd is generated.
-  enable_input_discovery_for_gn_analyze = false
-
-  outputs = [
-    "grit/tracing_resources.h",
-    "grit/tracing_resources_map.cc",
-    "grit/tracing_resources_map.h",
-    "tracing_resources.pak",
-  ]
-
-  deps = [ ":build_grd" ]
-}
--- a/content/browser/tracing/tracing_ui.cc
+++ b/content/browser/tracing/tracing_ui.cc
@@ -25,7 +25,6 @@
 #include "base/strings/string_util.h"
 #include "base/trace_event/trace_event.h"
 #include "base/values.h"
-#include "content/browser/tracing/grit/tracing_resources.h"
 #include "content/browser/tracing/tracing_controller_impl.h"
 #include "content/public/browser/browser_context.h"
 #include "content/public/browser/browser_thread.h"
@@ -241,8 +240,6 @@ TracingUI::TracingUI(WebUI* web_ui)
       web_ui->GetWebContents()->GetBrowserContext(), kChromeUITracingHost);
   source->DisableTrustedTypesCSP();
   source->UseStringsJs();
-  source->SetDefaultResource(IDR_TRACING_ABOUT_TRACING_HTML);
-  source->AddResourcePath("tracing.js", IDR_TRACING_ABOUT_TRACING_JS);
 
   source->SetRequestFilter(base::BindRepeating(OnShouldHandleRequest),
                            base::BindRepeating(OnTracingRequest));
--- a/testing/BUILD.gn
+++ b/testing/BUILD.gn
@@ -75,7 +75,6 @@ group("run_perf_test") {
 
   data_deps = [
     ":test_scripts_shared",
-    "//third_party/catapult/tracing:convert_chart_json",
   ]
 
   if (is_android) {
--- a/mojo/public/tools/BUILD.gn
+++ b/mojo/public/tools/BUILD.gn
@@ -17,6 +17,5 @@ group("mojo_python_unittests") {
   ]
   data_deps = [
     "//testing:test_scripts_shared",
-    "//third_party/catapult/third_party/typ/",
   ]
 }
--- a/third_party/webrtc/test/BUILD.gn
+++ b/third_party/webrtc/test/BUILD.gn
@@ -395,10 +395,6 @@ rtc_library("perf_test") {
   ]
   if (rtc_enable_protobuf) {
     sources += [ "testsupport/perf_test_histogram_writer.cc" ]
-    deps += [
-      "//third_party/catapult/tracing/tracing:histogram",
-      "//third_party/catapult/tracing/tracing:reserved_infos",
-    ]
   } else {
     sources += [ "testsupport/perf_test_histogram_writer_no_protobuf.cc" ]
   }
@@ -796,7 +792,6 @@ if (rtc_include_tests) {
 
       if (rtc_enable_protobuf) {
         sources += [ "testsupport/perf_test_histogram_writer_unittest.cc" ]
-        deps += [ "//third_party/catapult/tracing/tracing:histogram" ]
       }
 
       data = test_support_unittests_resources
--- a/tools/perf/core/perfetto_binary_roller/BUILD.gn
+++ b/tools/perf/core/perfetto_binary_roller/BUILD.gn
@@ -7,7 +7,6 @@ import("//build/util/generate_wrapper.gn
 generate_wrapper("upload_trace_processor") {
   testonly = true
   data_deps = [
-    "//third_party/catapult:telemetry_chrome_test_support",
     "//third_party/perfetto/src/trace_processor:trace_processor_shell",
   ]
   data = [
--- a/third_party/blink/tools/BUILD.gn
+++ b/third_party/blink/tools/BUILD.gn
@@ -36,7 +36,6 @@ group("wpt_tests_isolate") {
   data_deps = [
     ":wpt_tests_mojo_bindings",
     "//testing:test_scripts_shared",
-    "//third_party/catapult/third_party/typ:typ",
     "//tools/imagediff",
   ]
   if (is_win) {
--- a/content/browser/BUILD.gn
+++ b/content/browser/BUILD.gn
@@ -3283,7 +3283,6 @@ source_set("browser") {
       "//components/speech:speech",
       "//components/vector_icons",
       "//components/webauthn/json",
-      "//content/browser/tracing:resources",
     ]
   }
 
