Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6746)

Unified Diff: chrome/common/pepper_plugin_registry.cc

Issue 3181003: Fix "missing plugin" error in linux chrome.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
+ }
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698