Replace android_ndk with android_toolchain

Follows Chromium in replacing //third_party/android_ndk with the new
CIPD-based //third_party/android_toolchain. Changes are based on
https://crrev.com/1154515.

Change-Id: Ia96ba7d57e82d6ca448624acaa83b05373353acc
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/109293
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: K. Moon <kmoon@chromium.org>
diff --git a/.gitignore b/.gitignore
index 7260681..420c7b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,7 +5,7 @@
 /out
 /testing/corpus
 /third_party/abseil-cpp
-/third_party/android_ndk
+/third_party/android_toolchain
 /third_party/catapult
 /third_party/cpu_features/src
 /third_party/depot_tools
diff --git a/DEPS b/DEPS
index 4a8e282..742da0d 100644
--- a/DEPS
+++ b/DEPS
@@ -36,9 +36,9 @@
   # and whatever else without interference from each other.
   'abseil_revision': '6b7d3f3b0917593809b40c76cca3946473c82a5b',
   # Three lines of non-changing comments so that
-  # the commit queue can handle CLs rolling android_ndk
+  # the commit queue can handle CLs rolling android_toolchain
   # and whatever else without interference from each other.
-  'android_ndk_revision': '310956bd122ec2b96049f8d7398de6b717f3452e',
+  'android_toolchain_version': 'R_8suM8m0oHbZ1awdxGXvKEFpAOETscbfZxkkMthyk8C',
   # Three lines of non-changing comments so that
   # the commit queue can handle CLs rolling build
   # and whatever else without interference from each other.
@@ -267,10 +267,15 @@
     Var('chromium_git') + '/chromium/src/third_party/abseil-cpp.git@' +
         Var('abseil_revision'),
 
-  'third_party/android_ndk': {
-    'url': Var('chromium_git') + '/android_ndk.git@' +
-        Var('android_ndk_revision'),
-    'condition': 'checkout_android',
+  'third_party/android_toolchain': {
+    'packages': [
+      {
+        'package': 'chromium/third_party/android_toolchain/android_toolchain',
+        'version': Var('android_toolchain_version'),
+      },
+    ],
+    'condition': 'checkout_android_native_support',
+    'dep_type': 'cipd',
   },
 
   'third_party/catapult': {
diff --git a/build_overrides/build.gni b/build_overrides/build.gni
index 446fa89..b10e681 100644
--- a/build_overrides/build.gni
+++ b/build_overrides/build.gni
@@ -6,11 +6,6 @@
 # Chromium specific targets in a client project's GN file etc.
 build_with_chromium = false
 
-# Support different NDK locations in non-Chromium builds.
-default_android_ndk_root = "//third_party/android_ndk"
-default_android_ndk_version = "r16"
-default_android_ndk_major_version = 16
-
 # PDFium builds don't support building java targets.
 enable_java_templates = false