Index: chrome/renderer/chrome_render_process_observer.cc |
diff --git a/chrome/renderer/chrome_render_process_observer.cc b/chrome/renderer/chrome_render_process_observer.cc |
index 2e8d4ee943222e3cdde1413f7337a536e2eb30a5..ec35ee083fa809c575e07f751ff16396db74ac48 100644 |
--- a/chrome/renderer/chrome_render_process_observer.cc |
+++ b/chrome/renderer/chrome_render_process_observer.cc |
@@ -281,14 +281,18 @@ ChromeRenderProcessObserver::ChromeRenderProcessObserver( |
net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
#if defined(OS_WIN) |
- // Need to patch a few functions for font loading to work correctly. |
- base::FilePath pdf; |
- if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
- base::PathExists(pdf)) { |
- g_iat_patch_createdca.Patch( |
- pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); |
- g_iat_patch_get_font_data.Patch( |
- pdf.value().c_str(), "gdi32.dll", "GetFontData", GetFontDataPatch); |
+ // TODO(scottmg): http://crbug.com/448473. This code should be removed once |
+ // PDF is always OOP and/or PDF is made to use Skia instead of GDI directly. |
+ if (!command_line.HasSwitch(switches::kEnableOutOfProcessPdf)) { |
+ // Need to patch a few functions for font loading to work correctly. |
+ base::FilePath pdf; |
+ if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
+ base::PathExists(pdf)) { |
+ g_iat_patch_createdca.Patch(pdf.value().c_str(), "gdi32.dll", "CreateDCA", |
+ CreateDCAPatch); |
+ g_iat_patch_get_font_data.Patch(pdf.value().c_str(), "gdi32.dll", |
+ "GetFontData", GetFontDataPatch); |
+ } |
} |
#endif |