Remove Fuchsia support

No longer needed.

Bug: pdfium:1775,pdfium:2019
Change-Id: I942944e54b115eda67158a772bc1dfb8632c9edb
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/116630
Reviewed-by: Thomas Sepez <tsepez@google.com>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/.gitignore b/.gitignore
index 1a5e559..aa02a29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,10 +12,6 @@
 /third_party/depot_tools
 /third_party/fp16/src
 /third_party/freetype/src
-/third_party/fuchsia-gn-sdk
-/third_party/fuchsia-sdk/images
-/third_party/fuchsia-sdk/images-internal
-/third_party/fuchsia-sdk/sdk
 /third_party/googletest/src
 /third_party/icu
 /third_party/instrumented_libraries
diff --git a/DEPS b/DEPS
index efb8201..7bf3bea 100644
--- a/DEPS
+++ b/DEPS
@@ -42,9 +42,6 @@
 
   'checkout_v8': 'checkout_configuration != "minimal"',
 
-  # By default, download the fuchsia sdk from the public sdk directory.
-  'fuchsia_sdk_cipd_prefix': 'fuchsia/sdk/core/',
-
   # Fetch configuration files required for the 'use_remoteexec' gn arg
   'download_remoteexec_cfg': False,
   # RBE instance to use for running remote builds
@@ -110,14 +107,6 @@
   # and whatever else without interference from each other.
   'freetype_revision': '47574f7ea445c8bb751da0fa716424c9c29a6807',
   # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling Fuchsia gn sdk
-  # and whatever else without interference from each other.
-  'fuchsia_gn_sdk_revision': '3f588d789b567e53fa284be308db4dbf3787d8f3',
-  # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling Fuchsia sdk
-  # and whatever else without interference from each other.
-  'fuchsia_version': 'version:16.20231030.2.1',
-  # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling GN CIPD package version
   # and whatever else without interference from each other.
   'gn_version': 'git_revision:a2e2717ea670249a34b0de4b3e54f268d320bdfa',
@@ -341,13 +330,6 @@
     Var('chromium_git') + '/chromium/src/third_party/freetype2.git@' +
         Var('freetype_revision'),
 
-  'third_party/fuchsia-gn-sdk': {
-    'url': Var('chromium_git') +
-        '/chromium/src/third_party/fuchsia-gn-sdk.git@' +
-        Var('fuchsia_gn_sdk_revision'),
-    'condition': 'checkout_fuchsia',
-  },
-
   'third_party/googletest/src':
     Var('chromium_git') + '/external/github.com/google/googletest.git@' +
         Var('gtest_revision'),
@@ -753,17 +735,6 @@
     'action': ['python3', 'build/util/lastchange.py',
                '-o', 'build/util/LASTCHANGE'],
   },
-  {
-    'name': 'Download Fuchsia SDK from GCS',
-    'pattern': '.',
-    'condition': 'checkout_fuchsia',
-    'action': [
-      'python3',
-      'build/fuchsia/update_sdk.py',
-      '--cipd-prefix={fuchsia_sdk_cipd_prefix}',
-      '--version={fuchsia_version}',
-    ],
-  },
   # Download remote exec cfg files
   {
     'name': 'fetch_reclient_cfgs',
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
index d6d510e..3ed38af 100644
--- a/build_overrides/partition_alloc.gni
+++ b/build_overrides/partition_alloc.gni
@@ -16,7 +16,6 @@
     (!is_linux && is_component_build) || (is_win && is_debug)
 
 # Under Windows debug build, the allocator shim is not compatible with CRT.
-# Under Fuchsia, the allocator shim is only required for PA-E.
 # For all other platforms & configurations, the shim is required, to replace
 #     the default system allocators, e.g. with Partition Alloc.
 
@@ -25,7 +24,6 @@
 # - The allocator shim isn't working standalone on Windows at the moment.
 #   See crbug.com/pdfium/2068.
 if ((is_linux || is_chromeos || is_android || is_apple ||
-     (is_fuchsia && !_disable_partition_alloc_everywhere) ||
      (is_win && !is_component_build && !is_debug)) && !_is_using_sanitizers &&
     (!is_mac || use_custom_libcxx) && !is_win) {
   _use_shim = true
diff --git a/core/fxcrt/BUILD.gn b/core/fxcrt/BUILD.gn
index 31d3fd6..4e4cc23 100644
--- a/core/fxcrt/BUILD.gn
+++ b/core/fxcrt/BUILD.gn
@@ -134,7 +134,7 @@
   } else {
     sources += [ "fx_memory_malloc.cpp" ]
   }
-  if (is_posix || is_fuchsia) {
+  if (is_posix) {
     sources += [
       "cfx_fileaccess_posix.cpp",
       "cfx_fileaccess_posix.h",
diff --git a/core/fxcrt/cfx_fileaccess_posix.h b/core/fxcrt/cfx_fileaccess_posix.h
index 3e25f28..fe02d99 100644
--- a/core/fxcrt/cfx_fileaccess_posix.h
+++ b/core/fxcrt/cfx_fileaccess_posix.h
@@ -14,7 +14,7 @@
 #include "core/fxcrt/fileaccess_iface.h"
 #include "core/fxcrt/fx_types.h"
 
-#if !BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_FUCHSIA)
+#if !BUILDFLAG(IS_POSIX)
 #error "Included on the wrong platform"
 #endif
 
diff --git a/core/fxge/BUILD.gn b/core/fxge/BUILD.gn
index 7034cd1..215a63b 100644
--- a/core/fxge/BUILD.gn
+++ b/core/fxge/BUILD.gn
@@ -160,7 +160,7 @@
     ]
   }
 
-  if (is_linux || is_chromeos || is_fuchsia) {
+  if (is_linux || is_chromeos) {
     sources += [ "linux/fx_linux_impl.cpp" ]
   }
 
diff --git a/core/fxge/linux/fx_linux_impl.cpp b/core/fxge/linux/fx_linux_impl.cpp
index c24043c..0888a88 100644
--- a/core/fxge/linux/fx_linux_impl.cpp
+++ b/core/fxge/linux/fx_linux_impl.cpp
@@ -17,8 +17,7 @@
 #include "core/fxge/systemfontinfo_iface.h"
 #include "third_party/base/check.h"
 
-#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !defined(OS_FUCHSIA) && \
-    !defined(OS_ASMJS)
+#if !BUILDFLAG(IS_LINUX) && !BUILDFLAG(IS_CHROMEOS) && !defined(OS_ASMJS)
 #error "Included on the wrong platform"
 #endif
 
diff --git a/fpdfsdk/fpdf_transformpage_embeddertest.cpp b/fpdfsdk/fpdf_transformpage_embeddertest.cpp
index e66b033..9089841 100644
--- a/fpdfsdk/fpdf_transformpage_embeddertest.cpp
+++ b/fpdfsdk/fpdf_transformpage_embeddertest.cpp
@@ -9,7 +9,7 @@
 #include "testing/embedder_test.h"
 #include "testing/embedder_test_constants.h"
 
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
 #include "third_party/base/test/scoped_locale.h"
 #endif
 
@@ -483,7 +483,7 @@
   }
 }
 
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_FUCHSIA)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
 TEST_F(FPDFTransformEmbedderTest, TransFormWithClipAndSaveWithLocale) {
   pdfium::base::ScopedLocale scoped_locale("da_DK.UTF-8");
 
@@ -542,5 +542,4 @@
     CloseSavedDocument();
   }
 }
-#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
-        // BUILDFLAG(IS_FUCHSIA)
+#endif  // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
diff --git a/skia/BUILD.gn b/skia/BUILD.gn
index d0d8ef2..e6afbe6 100644
--- a/skia/BUILD.gn
+++ b/skia/BUILD.gn
@@ -302,23 +302,6 @@
     ]
   }
 
-  if (is_fuchsia) {
-    sources += [
-      # TODO(crbug.com/pdfium/2019): Consider using SkFontMgr_fuchsia.cpp
-      # instead of SkFontMgr_custom_empty.cpp.
-      "//third_party/skia/src/ports/SkFontMgr_custom.cpp",
-      "//third_party/skia/src/ports/SkFontMgr_custom_empty.cpp",
-    ]
-    deps += [
-      "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.fonts:fuchsia.fonts_hlcpp",
-      "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.io:fuchsia.io_hlcpp",
-      "//third_party/fuchsia-sdk/sdk/fidl/fuchsia.sys:fuchsia.sys_hlcpp",
-      "//third_party/fuchsia-sdk/sdk/pkg/sys_cpp",
-      "//third_party/fuchsia-sdk/sdk/pkg/zx",
-      "//third_party/icu:icuuc",
-    ]
-  }
-
   if (is_win || (is_apple && use_blink)) {
     sources += [
       # Add the FreeType custom font manager as a fallback backend for variable fonts.
diff --git a/testing/fuzzers/pdf_fuzzer_init_public.cc b/testing/fuzzers/pdf_fuzzer_init_public.cc
index 993c8a7..fda1cba 100644
--- a/testing/fuzzers/pdf_fuzzer_init_public.cc
+++ b/testing/fuzzers/pdf_fuzzer_init_public.cc
@@ -25,9 +25,6 @@
 #include <windows.h>
 #elif defined(__APPLE__)
 #include <mach-o/dyld.h>
-#elif defined(__Fuchsia__)
-#include <limits.h>
-#include <unistd.h>
 #else  // Linux
 #include <linux/limits.h>
 #include <unistd.h>
diff --git a/testing/utils/path_service.cpp b/testing/utils/path_service.cpp
index b57f70c..108e8c0 100644
--- a/testing/utils/path_service.cpp
+++ b/testing/utils/path_service.cpp
@@ -11,9 +11,6 @@
 #elif defined(__APPLE__)
 #include <mach-o/dyld.h>
 #include <sys/stat.h>
-#elif defined(__Fuchsia__)
-#include <sys/stat.h>
-#include <unistd.h>
 #else  // Linux
 #include <linux/limits.h>
 #include <sys/stat.h>
@@ -27,8 +24,7 @@
 
 namespace {
 
-#if defined(__APPLE__) || defined(__Fuchsia__) || \
-    (defined(ANDROID) && __ANDROID_API__ < 21)
+#if defined(__APPLE__) || (defined(ANDROID) && __ANDROID_API__ < 21)
 using stat_wrapper_t = struct stat;
 
 int CallStat(const char* path, stat_wrapper_t* sb) {
diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn
index ce7e915..9aaa440 100644
--- a/third_party/BUILD.gn
+++ b/third_party/BUILD.gn
@@ -600,7 +600,7 @@
     "../:pdfium_noshorten_config",
   ]
   deps = []
-  if (is_posix || is_fuchsia) {
+  if (is_posix) {
     sources += [
       "base/test/scoped_locale.cc",
       "base/test/scoped_locale.h",
diff --git a/third_party/fuchsia-sdk/DIR_METADATA b/third_party/fuchsia-sdk/DIR_METADATA
deleted file mode 100644
index 937c0c9..0000000
--- a/third_party/fuchsia-sdk/DIR_METADATA
+++ /dev/null
@@ -1,2 +0,0 @@
-team_email: "fuchsia-dev@chromium.org"
-os: FUCHSIA
diff --git a/third_party/fuchsia-sdk/OWNERS b/third_party/fuchsia-sdk/OWNERS
deleted file mode 100644
index eb93679..0000000
--- a/third_party/fuchsia-sdk/OWNERS
+++ /dev/null
@@ -1,9 +0,0 @@
-# Cannot use file://build/fuchsia/OWNERS here, as it is in a different git repo.
-# Manually keep in sync on a best-effort basis.
-
-ddorwin@chromium.org
-fdegans@chromium.org
-kmarshall@chromium.org
-qsr@chromium.org
-sergeyu@chromium.org
-wez@chromium.org
diff --git a/third_party/fuchsia-sdk/README.chromium b/third_party/fuchsia-sdk/README.chromium
deleted file mode 100644
index 4bdbe99..0000000
--- a/third_party/fuchsia-sdk/README.chromium
+++ /dev/null
@@ -1,12 +0,0 @@
-Name: Fuchsia SDK
-URL: https://fuchsia.dev/fuchsia-src/development/sdk/download
-Version: 0
-Security Critical: yes
-Shipped: yes
-License: BSD 3-Clause, Apache 2.0, MIT
-License File: sdk/LICENSE
-
-Description:
-This directory contains the current Fuchsia SDK. The SDK contains headers,
-libraries and tools that are needed to build Chromium for Fuchsia. It also
-contains boot images that are used to run tests on Fuchsia in emulation.
diff --git a/third_party/googletest/BUILD.gn b/third_party/googletest/BUILD.gn
index 88ccd74..c6c638f 100644
--- a/third_party/googletest/BUILD.gn
+++ b/third_party/googletest/BUILD.gn
@@ -127,13 +127,6 @@
   ]
 
   deps = [ "//third_party/abseil-cpp:absl" ]
-
-  if (is_fuchsia) {
-    deps += [
-      "//third_party/fuchsia-sdk/sdk/pkg/fdio",
-      "//third_party/fuchsia-sdk/sdk/pkg/zx",
-    ]
-  }
 }
 
 # Do NOT depend on this directly. Use //testing/gtest:gtest_main instead.
diff --git a/xfa/fgas/font/fgas_fontutils.cpp b/xfa/fgas/font/fgas_fontutils.cpp
index 9cc421c..bc34ddb 100644
--- a/xfa/fgas/font/fgas_fontutils.cpp
+++ b/xfa/fgas/font/fgas_fontutils.cpp
@@ -1748,7 +1748,7 @@
     {0xfef135f8, "AdobeHeitiStd-Regular", "Droid Sans Fallback", 0,
      FX_CodePage::kChineseSimplified},
 };
-#elif BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
+#elif BUILDFLAG(IS_POSIX)
 const FGAS_FontInfo kXFAFontsMap[] = {
     {0x01d5d33e, "SimSun",
      "WenQuanYi Zen Hei Mono,AR PL UMing CN,AR PL UMing HK,AR PL UMing TW,AR "