[or-cvs] [torbutton/maint-1.2] Also hook the mime service for the external app blocking too.

mikeperry at seul.org mikeperry at seul.org
Thu Dec 17 05:32:41 UTC 2009


Author: Mike Perry <mikeperry-git at fscked.org>
Date: Sat, 12 Dec 2009 16:59:37 -0800
Subject: Also hook the mime service for the external app blocking too.
Commit: ef331e18323c2dbf32d1511bbc91ae42f863d5a1

Precautionary measure. May result in double-warnings, needs testing.
---
 src/components/external-app-blocker.js |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/components/external-app-blocker.js b/src/components/external-app-blocker.js
index f2b44e3..fc8993b 100644
--- a/src/components/external-app-blocker.js
+++ b/src/components/external-app-blocker.js
@@ -7,10 +7,9 @@
 // Module specific constants
 const kMODULE_NAME = "Torbutton External App Handler";
 
-// XXX: Also psm-external-content-listener?
-// XXX: Also @mozilla.org/mime;1?
 const kMODULE_CONTRACTID_APP = "@mozilla.org/uriloader/external-helper-app-service;1";
 const kMODULE_CONTRACTID_PROTO = "@mozilla.org/uriloader/external-protocol-service;1";
+const kMODULE_CONTRACTID_MIME = "@mozilla.org/mime;1";
 
 const kMODULE_CID = Components.ID("3da0269f-fc29-4e9e-a678-c3b1cafcf13f");
 
@@ -223,15 +222,22 @@ function (compMgr, fileSpec, location, type) {
   compMgr.registerFactoryLocation(kMODULE_CID,
                                   kMODULE_NAME,
                                   kMODULE_CONTRACTID_APP,
-                                  fileSpec, 
-                                  location, 
+                                  fileSpec,
+                                  location,
                                   type);
 
   compMgr.registerFactoryLocation(kMODULE_CID,
                                   kMODULE_NAME,
                                   kMODULE_CONTRACTID_PROTO,
-                                  fileSpec, 
-                                  location, 
+                                  fileSpec,
+                                  location,
+                                  type);
+
+  compMgr.registerFactoryLocation(kMODULE_CID,
+                                  kMODULE_NAME,
+                                  kMODULE_CONTRACTID_MIME,
+                                  fileSpec,
+                                  location,
                                   type);
 };
 
-- 
1.5.6.5




More information about the tor-commits mailing list