Chromium Code Reviews| Index: chrome/browser/printing/print_preview_tab_controller.cc | 
| diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc | 
| index 63da491503603cb5e5ad6220d93b9dc090ad4588..b7fcbc0388e5f1d5f17bed8d6541ee86bfef976b 100644 | 
| --- a/chrome/browser/printing/print_preview_tab_controller.cc | 
| +++ b/chrome/browser/printing/print_preview_tab_controller.cc | 
| @@ -37,6 +37,7 @@ | 
| #include "content/public/browser/navigation_entry.h" | 
| #include "content/public/browser/notification_details.h" | 
| #include "content/public/browser/notification_source.h" | 
| +#include "content/public/browser/plugin_service.h" | 
| #include "content/public/browser/render_process_host.h" | 
| #include "content/public/browser/render_view_host.h" | 
| #include "content/public/browser/web_contents.h" | 
| @@ -56,13 +57,20 @@ namespace { | 
| void EnableInternalPDFPluginForTab(TabContents* preview_tab) { | 
| // Always enable the internal PDF plugin for the print preview page. | 
| + FilePath pdf_plugin_path; | 
| + if (!PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_plugin_path)) | 
| + return; | 
| + | 
| webkit::WebPluginInfo pdf_plugin; | 
| - PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_plugin.path); | 
| + if (!content::PluginService::GetInstance()->GetPluginInfoByPath( | 
| + pdf_plugin_path, &pdf_plugin)) { | 
| 
 
Peter Kasting
2012/11/15 18:53:50
Nit: Indent 4, not 8.
{} is optional.
 
Bernhard Bauer
2012/11/18 19:15:26
Done.
 
 | 
| + return; | 
| + } | 
| ChromePluginServiceFilter::GetInstance()->OverridePluginForTab( | 
| - preview_tab->web_contents()->GetRenderProcessHost()->GetID(), | 
| - preview_tab->web_contents()->GetRenderViewHost()->GetRoutingID(), | 
| - GURL(), pdf_plugin); | 
| + preview_tab->web_contents()->GetRenderProcessHost()->GetID(), | 
| + preview_tab->web_contents()->GetRenderViewHost()->GetRoutingID(), | 
| + GURL(), pdf_plugin); | 
| } | 
| // WebDialogDelegate that specifies what the print preview dialog |