From b7c9c895b5a60ddce41b8563703b5d8516c76983 Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 27 Sep 2023 16:09:53 +0200 Subject: [PATCH] build: fix with `enable_pdf_viewer = false` (#39990) build: fix with enable_pdf_viewer = false --- .../api/resources_private/resources_private_api.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shell/browser/extensions/api/resources_private/resources_private_api.cc b/shell/browser/extensions/api/resources_private/resources_private_api.cc index d834dd993160..99f6db952c1c 100644 --- a/shell/browser/extensions/api/resources_private/resources_private_api.cc +++ b/shell/browser/extensions/api/resources_private/resources_private_api.cc @@ -13,15 +13,15 @@ #include "chrome/grit/generated_resources.h" #include "components/strings/grit/components_strings.h" #include "components/zoom/page_zoom_constants.h" -#include "pdf/buildflags.h" +#include "electron/buildflags/buildflags.h" #include "printing/buildflags/buildflags.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/web_ui_util.h" -#if BUILDFLAG(ENABLE_PDF) +#if BUILDFLAG(ENABLE_PDF_VIEWER) #include "chrome/browser/pdf/pdf_extension_util.h" #include "pdf/pdf_features.h" -#endif // BUILDFLAG(ENABLE_PDF) +#endif // BUILDFLAG(ENABLE_PDF_VIEWER) // To add a new component to this API, simply: // 1. Add your component to the Component enum in @@ -48,7 +48,7 @@ ExtensionFunction::ResponseAction ResourcesPrivateGetStringsFunction::Run() { switch (component) { case api::resources_private::COMPONENT_PDF: -#if BUILDFLAG(ENABLE_PDF) +#if BUILDFLAG(ENABLE_PDF_VIEWER) pdf_extension_util::AddStrings( pdf_extension_util::PdfViewerContext::kPdfViewer, &dict); pdf_extension_util::AddAdditionalData(true, false, &dict);