[iOS Blink] Support DataDecoderBrowserTest.LaunchIsolated

Since https://crrev.com/c/6518241 switched from using a JSON parser to
ImageDecoder, the iOS Blink port needs to follow the same approach. This
CL enables the use of ImageDecoder in the iOS Blink port by applying the
USE_BLINK build flag.

TEST: DataDecoderBrowserTest.LaunchIsolated Bug: None

Change-Id: Ie9bc02f5a9251d257dc8bbe55f40faf40fada74d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6529504
Reviewed-by: Elly FJ <ellyjones@chromium.org>
Commit-Queue: Gyuyoung Kim <gyuyoung@igalia.com>
Reviewed-by: Dave Tapuska <dtapuska@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1459819}
diff --git a/services/data_decoder/BUILD.gn b/services/data_decoder/BUILD.gn
index cfb9adda..28cee86 100644
--- a/services/data_decoder/BUILD.gn
+++ b/services/data_decoder/BUILD.gn
@@ -40,6 +40,7 @@
 
   deps = [
     "//base",
+    "//build:blink_buildflags",
     "//components/cbor",
     "//components/facilitated_payments/core/mojom:pix_code_validator_mojom",
     "//components/facilitated_payments/core/validation",
diff --git a/services/data_decoder/data_decoder_service.cc b/services/data_decoder/data_decoder_service.cc
index 8e03776c..4a688648 100644
--- a/services/data_decoder/data_decoder_service.cc
+++ b/services/data_decoder/data_decoder_service.cc
@@ -8,6 +8,7 @@
 
 #include "base/functional/bind.h"
 #include "base/time/time.h"
+#include "build/blink_buildflags.h"
 #include "build/build_config.h"
 #include "components/facilitated_payments/core/validation/pix_code_validator.h"
 #include "components/web_package/web_bundle_parser_factory.h"
@@ -23,7 +24,7 @@
 #include "services/data_decoder/ble_scan_parser_impl.h"
 #endif  // BUILDFLAG(IS_CHROMEOS)
 
-#if !BUILDFLAG(IS_IOS)
+#if BUILDFLAG(USE_BLINK)
 #include "services/data_decoder/image_decoder_impl.h"
 #endif
 
@@ -45,8 +46,8 @@
 
 void DataDecoderService::BindImageDecoder(
     mojo::PendingReceiver<mojom::ImageDecoder> receiver) {
-#if BUILDFLAG(IS_IOS)
-  LOG(FATAL) << "ImageDecoder not supported on iOS.";
+#if !BUILDFLAG(USE_BLINK)
+  LOG(FATAL) << "ImageDecoder not supported on non-Blink platforms.";
 #else
   mojo::MakeSelfOwnedReceiver(std::make_unique<ImageDecoderImpl>(),
                               std::move(receiver));