Chromium Code Reviews| Index: chrome/common/pepper_plugin_registry.cc |
| =================================================================== |
| --- chrome/common/pepper_plugin_registry.cc (revision 55759) |
| +++ chrome/common/pepper_plugin_registry.cc (working copy) |
| @@ -105,22 +105,21 @@ |
| // available or not; but (on Linux) this function is always called |
| // once before we're sandboxed. So the first time through test if |
| // the file is available and then skip the check on subsequent calls |
| - // if not. |
| - static bool skip_pdf_plugin = false; |
| + // if yes. |
| + static bool skip_pdf_file_check = false; |
| FilePath path; |
| - if (!skip_pdf_plugin && PathService::Get(chrome::FILE_PDF_PLUGIN, &path)) { |
| - if (!file_util::PathExists(path)) { |
| - skip_pdf_plugin = true; |
| - return; |
| - } |
| + if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path)) { |
| + if (skip_pdf_file_check || file_util::PathExists(path)) { |
|
viettrungluu
2010/08/11 19:34:34
This isn't good for Chromium, since it'll result i
Evan Martin
2010/08/11 19:39:51
PathExists doesn't spew.
|
| + PepperPluginInfo pdf; |
| + pdf.path = path; |
| + pdf.name = "Chrome PDF Viewer"; |
| + pdf.mime_types.push_back("application/pdf"); |
| + pdf.file_extensions = "pdf"; |
| + pdf.type_descriptions = "Portable Document Format"; |
| + plugins->push_back(pdf); |
| - PepperPluginInfo pdf; |
| - pdf.path = path; |
| - pdf.name = "Chrome PDF Viewer"; |
| - pdf.mime_types.push_back("application/pdf"); |
| - pdf.file_extensions = "pdf"; |
| - pdf.type_descriptions = "Portable Document Format"; |
| - plugins->push_back(pdf); |
| + skip_pdf_file_check = true; |
| + } |
| } |
| } |