From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Charles Kerr <charles@charleskerr.com>
Date: Wed, 17 May 2023 14:42:09 -0500
Subject: chore: patch out Profile methods in chrome_browser_pdf

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4482679

Electron does not support Profiles, so this Profile::FromBrowserContext()
call is not needed and will not link. This change patches it out.

diff --git a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
index fd14a56bd5c09a76d5158a88a6b8bd3a1dd2fd8a..35ed7b0d20334856b1a76daafdf48e038eac5470 100644
--- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
+++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
@@ -45,6 +45,7 @@ namespace {
 // hierarchy is: enterprise policy > user choice > finch experiment.
 bool ShouldEnableSkiaRenderer(content::WebContents* contents) {
   CHECK(contents);
+#if 0
   const PrefService* prefs =
       Profile::FromBrowserContext(contents->GetBrowserContext())->GetPrefs();
 
@@ -52,6 +53,7 @@ bool ShouldEnableSkiaRenderer(content::WebContents* contents) {
   if (prefs->IsManagedPreference(prefs::kPdfUseSkiaRendererEnabled)) {
     return prefs->GetBoolean(prefs::kPdfUseSkiaRendererEnabled);
   }
+#endif
 
   //  When the enterprise policy is not set, use finch/feature flag choice.
   return base::FeatureList::IsEnabled(
