mirror of https://github.com/electron/electron
31 lines
1.4 KiB
Diff
31 lines
1.4 KiB
Diff
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 8c2a705b69da50604fb4c441ff4e2f5207ef3230..991c622fe8af434fa28405f15eb14c27b1062d22 100644
|
|
--- a/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
|
+++ b/chrome/browser/pdf/chrome_pdf_stream_delegate.cc
|
|
@@ -44,6 +44,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();
|
|
|
|
@@ -51,6 +52,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(
|