[meego-commits] 8620: Changes to MeeGo:1.1:Core/chromium

Peter Zhu no_reply at build.meego.com
Tue Oct 19 07:25:48 UTC 2010


Hi,
I have made the following changes to chromium in project MeeGo:1.1:Core. Please review and accept ASAP.

Thank You,
Peter Zhu

[This message was auto-generated]

---

Request #8620:

  submit:   MeeGo:1.1:Core:Testing/chromium(r2) -> MeeGo:1.1:Core/chromium


Message:
    * Mon Oct 18 2010 Wei James <james.wei at intel.com> - 6.0.486.0
- Fix BMC#7051 Missing PDF plugin

State:   new          2010-10-19T00:25:48 peter
Comment: None



changes files:
--------------
--- chromium.changes
+++ chromium.changes
@@ -0,0 +1,3 @@
+* Mon Oct 18 2010 Wei James <james.wei at intel.com> - 6.0.486.0
+- Fix BMC#7051 Missing PDF plugin
+

new:
----
  disable_internal_pdf.patch

spec files:
-----------
--- chromium.spec
+++ chromium.spec
@@ -141,6 +141,9 @@
 
 # Fix chromium importer crash bug BMC#6750
 Patch209:        chromium-importer-crash-fix.patch
+
+# Disable Internal PDF plugin
+Patch210:		disable_internal_pdf.patch
 ################ patches for MeeGo integration ends
 
 
@@ -315,6 +318,7 @@
 %patch206 -p1
 %patch208 -p1 -d third_party/WebKit
 %patch209 -p1
+%patch210 -p1
 
 # Scrape out incorrect optflags and hack in the correct ones
 PARSED_OPT_FLAGS=`echo \'$RPM_OPT_FLAGS -DUSE_SYSTEM_LIBEVENT -fPIC -fno-strict-aliasing -fno-ipa-cp \' | sed "s/ /',/g" | sed "s/',/', '/g"`

other changes:
--------------

++++++ disable_internal_pdf.patch (new)
--- disable_internal_pdf.patch
+++ disable_internal_pdf.patch
+diff --git a/chrome/common/pepper_plugin_registry.cc b/chrome/common/pepper_plugin_registry.cc
+index 0a39bc2..1422982 100644
+--- a/chrome/common/pepper_plugin_registry.cc
++++ b/chrome/common/pepper_plugin_registry.cc
+@@ -93,18 +93,25 @@ void PepperPluginRegistry::GetPluginInfoFromSwitch(
+ // static
+ void PepperPluginRegistry::GetExtraPlugins(
+     std::vector<PepperPluginInfo>* plugins) {
++  // Once we're sandboxed, we can't know if the PDF plugin is
++  // 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 yes.
++  static bool skip_pdf_file_check = false;
+   FilePath path;
+-  // We can't check for path existance here, since we are in the sandbox.
+-  // If plugin is missing, it will later fail to
+-  // load the library and the missing plugin message will be displayed.
+   if (PathService::Get(chrome::FILE_PDF_PLUGIN, &path)) {
+-    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);
++    if (skip_pdf_file_check || file_util::PathExists(path)) {
++      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;
++    }
+   }
+ }
+ 




More information about the MeeGo-commits mailing list