relanding Bug 441636 after bad backout
author"Brad Lassey" <blassey@mozilla.com>
Sun, 27 Jul 2008 09:44:20 -0400
changeset 16244 de1e95ba71657c8609a9362904d0e333b7301ae2
parent 16243 900d476c2193d260b238a6f324560c175a94a06e
child 16245 cf5f9b3fd1b18ac704f9879aecc0e8978ab48c1c
push id865
push userblassey@mozilla.com
push dateSun, 27 Jul 2008 13:44:38 +0000
treeherdermozilla-central@de1e95ba7165 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs441636
milestone1.9.1a2pre
relanding Bug 441636 after bad backout
config/autoconf.mk.in
configure.in
toolkit/library/Makefile.in
uriloader/exthandler/nsDBusHandlerApp.cpp
uriloader/exthandler/nsDBusHandlerApp.h
uriloader/exthandler/nsHandlerService.js
uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
uriloader/exthandler/unix/nsMIMEInfoUnix.h
xulrunner/installer/Makefile.in
xulrunner/installer/debian/changelog.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -622,21 +622,16 @@ MOZ_SUNBIRD	= @MOZ_SUNBIRD@
 MOZ_SUITE	= @MOZ_SUITE@
 WINCE		= @WINCE@
 
 MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_ID@
 
 NS_HILDON	= @NS_HILDON@
 NS_OSSO 	= @NS_OSSO@
 
-NS_HILDONMIME_CFLAGS	= @NS_HILDONMIME_CFLAGS@
-NS_HILDONMIME_LIBS	= @NS_HILDONMIME_LIBS@
-NS_OSSO_CFLAGS 	= @NS_OSSO_CFLAGS@
-NS_OSSO_LIBS 	= @NS_OSSO_LIBS@
-
 
 MACOS_SDK_DIR	= @MACOS_SDK_DIR@
 NEXT_ROOT	= @NEXT_ROOT@
 GCC_VERSION	= @GCC_VERSION@
 XCODEBUILD_VERSION= @XCODEBUILD_VERSION@
 HAS_XCODE_2_1	= @HAS_XCODE_2_1@
 UNIVERSAL_BINARY= @UNIVERSAL_BINARY@
 HAVE_DTRACE= @HAVE_DTRACE@
--- a/configure.in
+++ b/configure.in
@@ -1577,36 +1577,31 @@ dnl Get version of various core apps fro
 FIREFOX_VERSION=`cat $topsrcdir/browser/config/version.txt`
 THUNDERBIRD_VERSION=`cat $topsrcdir/mail/config/version.txt`
 SUNBIRD_VERSION=`cat $topsrcdir/calendar/sunbird/config/version.txt`
 SEAMONKEY_VERSION=`cat $topsrcdir/suite/config/version.txt`
 
 AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
 AC_DEFINE_UNQUOTED(MOZILLA_VERSION_U,$MOZILLA_VERSION)
 
-PKG_CHECK_MODULES(NS_HILDONMIME,libhildonmime,
+PKG_CHECK_MODULES(LIBHILONMIME,libhildonmime,
                   NS_HILDON=1,
                   NS_HILDON=)
 if test $NS_HILDON; then
    AC_DEFINE(NS_HILDON)
 fi
-AC_SUBST(NS_HILDONMIME_CFLAGS)
-AC_SUBST(NS_HILDONMIME_LIBS)
-
-PKG_CHECK_MODULES(NS_OSSO,libosso,
+
+PKG_CHECK_MODULES(LIBOSSO,libosso,
                   NS_OSSO=1,
                   NS_OSSO=)
 
 if test $NS_OSSO; then
    AC_DEFINE(NS_OSSO)     
 fi
 
-AC_SUBST(NS_OSSO_CFLAGS)
-AC_SUBST(NS_OSSO_LIBS)
-
 dnl ========================================================
 dnl System overrides of the defaults for target
 dnl ========================================================
 
 case "$target" in
 *-aix*)
     AC_DEFINE(AIX)
     if test ! "$GNU_CC"; then
--- a/toolkit/library/Makefile.in
+++ b/toolkit/library/Makefile.in
@@ -202,24 +202,16 @@ EXTRA_DSO_LDOPTS += \
 	-framework SystemConfiguration \
 	-framework QuickTime \
 	-framework IOKit \
 	-lcrypto \
 	$(TK_LIBS) \
 	$(NULL)
 endif
 
-ifdef NS_HILDON
-EXTRA_DSO_LDOPTS += $(NS_HILDONMIME_LIBS)
-endif 
-
-ifdef NS_OSSO
-EXTRA_DSO_LDOPTS += $(NS_OSSO_LIBS)
-endif
-
 ifdef MOZ_ENABLE_DBUS
 EXTRA_DSO_LDOPTS += $(MOZ_DBUS_GLIB_LIBS)
 endif
 
 ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
 EXTRA_DSO_LDOPTS += $(XLDFLAGS) $(XLIBS) $(MOZ_XFT_LIBS) $(MOZ_GTK2_LIBS) $(XT_LIBS) -lgthread-2.0
 EXTRA_DSO_LDOPTS += $(FT2_LIBS)
 endif
new file mode 100644
--- /dev/null
+++ b/uriloader/exthandler/nsDBusHandlerApp.cpp
@@ -0,0 +1,230 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim:expandtab:shiftwidth=2:tabstop=2:cin:
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Mozilla browser.
+ *
+ * The Initial Developer of the Original Code is 
+ * the Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Brad Lassey <blassey@mozila.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include  <dbus/dbus.h>
+#include "nsDBusHandlerApp.h"
+#include "nsIURI.h"
+#include "nsIGenericFactory.h"
+#include "nsIClassInfoImpl.h"
+#include "nsCOMPtr.h"
+
+#ifdef NS_OSSO
+#include <libosso.h>
+
+#define APP_LAUNCH_BANNER_SERVICE           "com.nokia.hildon-desktop"
+#define APP_LAUNCH_BANNER_METHOD_INTERFACE  "com.nokia.hildon.hdwm.startupnotification"
+#define APP_LAUNCH_BANNER_METHOD_PATH       "/com/nokia/hildon/hdwm"
+#define APP_LAUNCH_BANNER_METHOD            "starting"
+#endif
+
+
+// XXX why does nsMIMEInfoImpl have a threadsafe nsISupports?  do we need one 
+// here too?
+NS_IMPL_ISUPPORTS2_CI(nsDBusHandlerApp, nsIDBusHandlerApp, nsIHandlerApp)
+
+////////////////////////////////////////////////////////////////////////////////
+//// nsIHandlerApp
+
+NS_IMETHODIMP nsDBusHandlerApp::GetName(nsAString& aName)
+{
+  aName.Assign(mName);
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsDBusHandlerApp::SetName(const nsAString & aName)
+{
+  mName.Assign(aName);
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsDBusHandlerApp::Equals(nsIHandlerApp *aHandlerApp, PRBool *_retval)
+{
+  NS_ENSURE_ARG_POINTER(aHandlerApp);
+  
+  // If the handler app isn't a dbus handler app, then it's not the same app.
+  nsCOMPtr<nsIDBusHandlerApp> dbusHandlerApp = do_QueryInterface(aHandlerApp);
+  if (!dbusHandlerApp) {
+    *_retval = PR_FALSE;
+    return NS_OK;
+  }
+  nsCAutoString service;
+  nsCAutoString method;
+  
+  nsresult rv = dbusHandlerApp->GetService(service);
+  if (NS_FAILED(rv)) {
+    *_retval = PR_FALSE;
+    return NS_OK;
+  }
+  rv = dbusHandlerApp->GetMethod(method);
+  if (NS_FAILED(rv)) {
+    *_retval = PR_FALSE;
+    return NS_OK;
+  }
+  
+  *_retval = service.Equals(mService) && method.Equals(mMethod);
+  return NS_OK;
+}
+
+NS_IMETHODIMP
+nsDBusHandlerApp::LaunchWithURI(nsIURI *aURI,
+                                nsIInterfaceRequestor *aWindowContext)
+{
+  nsCAutoString spec;
+  nsresult rv = aURI->GetAsciiSpec(spec);
+  NS_ENSURE_SUCCESS(rv,rv);
+  const char* uri = spec.get(); 
+  
+  DBusError err;
+  dbus_error_init(&err);
+  
+  DBusConnection  *connection;
+  connection = dbus_bus_get(DBUS_BUS_SESSION, &err);
+  if (dbus_error_is_set(&err)) { 
+    dbus_error_free(&err); 
+    return NS_ERROR_FAILURE;
+  }
+  if (nsnull == connection) { 
+    return NS_ERROR_FAILURE; 
+  }
+  dbus_connection_set_exit_on_disconnect(connection,false);
+  
+  DBusMessage* msg;
+  msg = dbus_message_new_method_call(mService.get(), 
+                                     mObjpath.get(), 
+                                     mInterface.get(), 
+                                     mMethod.get());
+  
+  if (!msg) {
+    return NS_ERROR_FAILURE;
+  }
+  dbus_message_set_no_reply(msg, PR_TRUE);
+  
+  DBusMessageIter iter;
+  dbus_message_iter_init_append(msg, &iter);
+  dbus_message_iter_append_basic(&iter, DBUS_TYPE_STRING, &uri);
+  
+  if (dbus_connection_send(connection, msg, NULL)) {
+    dbus_connection_flush(connection);
+    dbus_message_unref(msg);
+#ifdef NS_OSSO
+    msg = dbus_message_new_method_call (APP_LAUNCH_BANNER_SERVICE,
+                                        APP_LAUNCH_BANNER_METHOD_PATH,
+                                        APP_LAUNCH_BANNER_METHOD_INTERFACE,
+                                        APP_LAUNCH_BANNER_METHOD);
+    
+    if (msg) {
+      const char* service = mService.get();
+      if (dbus_message_append_args(msg,
+                                   DBUS_TYPE_STRING, 
+                                   &service,
+                                   DBUS_TYPE_INVALID)) {
+        if (dbus_connection_send(connection, msg, NULL)) {
+          dbus_connection_flush(connection);
+        }
+        dbus_message_unref(msg);
+      }
+    }
+#endif
+  } else {
+    dbus_message_unref(msg);
+    return NS_ERROR_FAILURE;		    
+  }
+  return NS_OK;
+  
+}
+
+////////////////////////////////////////////////////////////////////////////////
+//// nsIDBusHandlerApp
+
+/* attribute AUTF8String service; */
+NS_IMETHODIMP nsDBusHandlerApp::GetService(nsACString & aService)
+{
+  aService.Assign(mService);
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsDBusHandlerApp::SetService(const nsACString & aService)
+{
+  mService.Assign(aService);
+  return NS_OK;
+}
+
+/* attribute AUTF8String method; */
+NS_IMETHODIMP nsDBusHandlerApp::GetMethod(nsACString & aMethod)
+{
+  aMethod.Assign(mMethod);
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsDBusHandlerApp::SetMethod(const nsACString & aMethod)
+{
+  mMethod.Assign(aMethod);
+  return NS_OK;
+}
+
+/* attribute AUTF8String interface; */
+NS_IMETHODIMP nsDBusHandlerApp::GetDBusInterface(nsACString & aInterface)
+{
+  aInterface.Assign(mInterface);
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsDBusHandlerApp::SetDBusInterface(const nsACString & aInterface)
+{
+  mInterface.Assign(aInterface);
+  return NS_OK;
+}
+
+/* attribute AUTF8String objpath; */
+NS_IMETHODIMP nsDBusHandlerApp::GetObjectPath(nsACString & aObjpath)
+{
+  aObjpath.Assign(mObjpath);
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsDBusHandlerApp::SetObjectPath(const nsACString & aObjpath)
+{
+  mObjpath.Assign(aObjpath);
+  return NS_OK;
+}
+
+NS_DECL_CLASSINFO(nsDBusHandlerApp)
+
+
new file mode 100644
--- /dev/null
+++ b/uriloader/exthandler/nsDBusHandlerApp.h
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim:expandtab:shiftwidth=2:tabstop=2:cin:
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Mozilla browser.
+ *
+ * The Initial Developer of the Original Code is 
+ * the Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2008
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Brad Lassey <blassey@mozilla.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef __nsDBusHandlerAppImpl_h__
+#define __nsDBusHandlerAppImpl_h__
+
+#include "nsString.h"
+#include "nsIMIMEInfo.h"
+
+class nsDBusHandlerApp : public nsIDBusHandlerApp
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_NSIHANDLERAPP
+  NS_DECL_NSIDBUSHANDLERAPP
+
+  nsDBusHandlerApp() { }
+
+  virtual ~nsDBusHandlerApp() { }
+
+protected:
+  nsString mName;
+  nsCString mService;
+  nsCString mMethod;
+  nsCString mInterface;
+  nsCString mObjpath;
+
+};
+#endif
--- a/uriloader/exthandler/nsHandlerService.js
+++ b/uriloader/exthandler/nsHandlerService.js
@@ -91,27 +91,16 @@ const NC_POSSIBLE_APP       = NC_NS + "p
 const NC_PRETTY_NAME        = NC_NS + "prettyName";
 
 // nsILocalHandlerApp::executable
 const NC_PATH               = NC_NS + "path";
 
 // nsIWebHandlerApp::uriTemplate
 const NC_URI_TEMPLATE       = NC_NS + "uriTemplate";
 
-// nsIDBusHandlerApp::service
-const NC_SERVICE            = NC_NS + "service";
-
-// nsIDBusHandlerApp::method
-const NC_METHOD             = NC_NS + "method";
-
-// nsIDBusHandlerApp::objectPath
-const NC_OBJPATH            = NC_NS + "objectPath";
-
-// nsIDBusHandlerApp::dbusInterface
-const NC_INTERFACE            = NC_NS + "dBusInterface";
 
 Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 
 function HandlerService() {
   this._init();
 }
 
@@ -572,41 +561,16 @@ HandlerService.prototype = {
       let uriTemplate = this._getValue(aHandlerAppID, NC_URI_TEMPLATE);
       if (!uriTemplate)
         return null;
 
       handlerApp = Cc["@mozilla.org/uriloader/web-handler-app;1"].
                    createInstance(Ci.nsIWebHandlerApp);
       handlerApp.uriTemplate = uriTemplate;
     }
-    else if (this._hasValue(aHandlerAppID, NC_SERVICE)) {
-      let service = this._getValue(aHandlerAppID, NC_SERVICE);
-      if (!service)
-        return null;
-      
-      let method = this._getValue(aHandlerAppID, NC_METHOD);
-      if (!method)
-        return null;
-      
-      let objpath = this._getValue(aHandlerAppID, NC_OBJPATH);
-      if (!objpath)
-        return null;
-      
-      let interface = this._getValue(aHandlerAppID, NC_INTERFACE);
-      if (!interface)
-        return null;
-      
-      handlerApp = Cc["@mozilla.org/uriloader/dbus-handler-app;1"].
-                   createInstance(Ci.nsIDBusHandlerApp);
-      handlerApp.service   = service;
-      handlerApp.method    = method;
-      handlerApp.objectPath   = objpath;
-      handlerApp.dBusInterface = interface;
-      
-    }
     else
       return null;
 
     handlerApp.name = this._getValue(aHandlerAppID, NC_PRETTY_NAME);
 
     return handlerApp;
   },
 
@@ -802,38 +766,25 @@ HandlerService.prototype = {
     // used to refer to a different kind of handler in the past (i.e. either
     // a local hander or a web handler), so if the new handler is a local
     // handler, then we remove any web handler properties and vice versa.
     // This is unnecessary but harmless for possible handlers.
 
     if (aHandlerApp instanceof Ci.nsILocalHandlerApp) {
       this._setLiteral(aHandlerAppID, NC_PATH, aHandlerApp.executable.path);
       this._removeTarget(aHandlerAppID, NC_URI_TEMPLATE);
-      this._removeTarget(aHandlerAppID, NC_METHOD);
-      this._removeTarget(aHandlerAppID, NC_SERVICE);
-      this._removeTarget(aHandlerAppID, NC_OBJPATH);
-      this._removeTarget(aHandlerAppID, NC_INTERFACE);
     }
     else if(aHandlerApp instanceof Ci.nsIWebHandlerApp){
       aHandlerApp.QueryInterface(Ci.nsIWebHandlerApp);
       this._setLiteral(aHandlerAppID, NC_URI_TEMPLATE, aHandlerApp.uriTemplate);
       this._removeTarget(aHandlerAppID, NC_PATH);
-      this._removeTarget(aHandlerAppID, NC_METHOD);
-      this._removeTarget(aHandlerAppID, NC_SERVICE);
-      this._removeTarget(aHandlerAppID, NC_OBJPATH);
-      this._removeTarget(aHandlerAppID, NC_INTERFACE);
     }
     else if(aHandlerApp instanceof Ci.nsIDBusHandlerApp){
       aHandlerApp.QueryInterface(Ci.nsIDBusHandlerApp);
-      this._setLiteral(aHandlerAppID, NC_SERVICE, aHandlerApp.service);
-      this._setLiteral(aHandlerAppID, NC_METHOD, aHandlerApp.method);
-      this._setLiteral(aHandlerAppID, NC_OBJPATH, aHandlerApp.objectPath);
-      this._setLiteral(aHandlerAppID, NC_INTERFACE, aHandlerApp.dBusInterface);
-      this._removeTarget(aHandlerAppID, NC_PATH);
-      this._removeTarget(aHandlerAppID, NC_URI_TEMPLATE);
+      
     }
     else {
 	throw "unknown handler type";
     }
 	
   },
 
   _storeAlwaysAsk: function HS__storeAlwaysAsk(aHandlerInfo) {
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
+++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
@@ -32,73 +32,40 @@
  * use your version of this file under the terms of the MPL, indicate your
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
-#ifdef NS_HILDON
-#include <glib.h>
-#include <hildon-uri.h>
-#endif
-
-
 #include "nsMIMEInfoUnix.h"
 #include "nsGNOMERegistry.h"
 #include "nsIGnomeVFSService.h"
-#include "nsPrintfCString.h"
-#ifdef MOZ_ENABLE_DBUS
-#include "nsDBusHandlerApp.h"
-#endif
-
 
 nsresult
 nsMIMEInfoUnix::LoadUriInternal(nsIURI * aURI)
-{ 
-  nsresult rv = nsGNOMERegistry::LoadURL(aURI);
-#ifdef NS_HILDON
-  if (NS_FAILED(rv)){
-    HildonURIAction *action = hildon_uri_get_default_action(mType.get(), nsnull);
-    if (action) {
-      nsCAutoString spec;
-      aURI->GetAsciiSpec(spec);
-      if (hildon_uri_open(spec.get(), action, nsnull))
-        rv = NS_OK;
-      hildon_uri_action_unref(action);
-    }
-  }
-#endif
-  return rv;
+{
+  return nsGNOMERegistry::LoadURL(aURI);
 }
 
 NS_IMETHODIMP
 nsMIMEInfoUnix::GetHasDefaultHandler(PRBool *_retval)
 {
   *_retval = PR_FALSE;
   nsCOMPtr<nsIGnomeVFSService> vfs = do_GetService(NS_GNOMEVFSSERVICE_CONTRACTID);
   if (vfs) {
     nsCOMPtr<nsIGnomeVFSMimeApp> app;
     if (NS_SUCCEEDED(vfs->GetAppForMimeType(mType, getter_AddRefs(app))) && app)
       *_retval = PR_TRUE;
   }
 
   if (*_retval)
     return NS_OK;
 
-#ifdef NS_HILDON
-  HildonURIAction *action = hildon_uri_get_default_action(mType.get(), nsnull);
-  if (action) {
-    *_retval = PR_TRUE;
-    hildon_uri_action_unref(action);
-    return NS_OK;
-  }
-#endif
-  
   // If we didn't find a VFS handler, fallback.
   return nsMIMEInfoImpl::GetHasDefaultHandler(_retval);
 }
 
 nsresult
 nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile *aFile)
 {
   nsCAutoString nativePath;
@@ -112,63 +79,8 @@ nsMIMEInfoUnix::LaunchDefaultWithFile(ns
       return app->Launch(nativePath);
   }
 
   if (!mDefaultApplication)
     return NS_ERROR_FILE_NOT_FOUND;
 
   return LaunchWithIProcess(mDefaultApplication, nativePath);
 }
-
-#ifdef NS_HILDON
-
-NS_IMETHODIMP
-nsMIMEInfoUnix::GetPossibleApplicationHandlers(nsIMutableArray ** aPossibleAppHandlers)
-{
-  if (!mPossibleApplications) {
-    mPossibleApplications = do_CreateInstance(NS_ARRAY_CONTRACTID);
-    
-    if (!mPossibleApplications)
-      return NS_ERROR_OUT_OF_MEMORY;
-
-    GSList *actions = hildon_uri_get_actions(mType.get(), nsnull);
-    GSList *actionsPtr = actions;
-    while (actionsPtr) {
-      HildonURIAction *action = (HildonURIAction*)actionsPtr->data;
-      actionsPtr = actionsPtr->next;
-      nsDBusHandlerApp* app = new nsDBusHandlerApp();
-      if (!app){
-        hildon_uri_free_actions(actions);
-        return NS_ERROR_OUT_OF_MEMORY;
-      }
-      nsDependentCString method(hildon_uri_action_get_method(action));
-      nsDependentCString key(hildon_uri_action_get_service(action));
-      nsCString service, objpath, interface;
-      app->SetMethod(method);
-      app->SetName(NS_ConvertUTF8toUTF16(key));
-
-      if (key.FindChar('.', 0) > 0) {
-        service.Assign(key);
-        int len = key.Length() + 1;
-        objpath.Assign(NS_LITERAL_CSTRING("/") + key);
-        objpath.ReplaceChar('.', '/');
-        interface.Assign(key);
-      } else {
-        int len = key.Length() + 11;
-        service.Assign(NS_LITERAL_CSTRING("com.nokia.") + key);
-        objpath.Assign(NS_LITERAL_CSTRING("/com/nokia/") + key);
-        interface.Assign(NS_LITERAL_CSTRING("com.nokia.") + key);  
-      }
-      
-      app->SetService(service);
-      app->SetObjectPath(objpath);
-      app->SetDBusInterface(interface);
-      
-      mPossibleApplications->AppendElement(app, PR_FALSE);    
-    }
-    hildon_uri_free_actions(actions);
-  }
-
-  *aPossibleAppHandlers = mPossibleApplications;
-  NS_ADDREF(*aPossibleAppHandlers);
-  return NS_OK;
-}
-#endif
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.h
+++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.h
@@ -51,14 +51,11 @@ public:
     nsMIMEInfoImpl(aType, aClass) {}
 
 protected:
   NS_IMETHOD GetHasDefaultHandler(PRBool *_retval);
 
   virtual NS_HIDDEN_(nsresult) LoadUriInternal(nsIURI *aURI);
 
   virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile *aFile);
-#ifdef NS_HILDON
-  NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleAppHandlers);
-#endif
 };
 
 #endif // nsMIMEInfoUnix_h_
--- a/xulrunner/installer/Makefile.in
+++ b/xulrunner/installer/Makefile.in
@@ -125,34 +125,22 @@ endif
 	chmod 644 $@
 
 install:: $(pkg_config_files)
 	@echo pkg_config_file: $(pkg_config_files)
 	$(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(libdir)/pkgconfig
 
 GARBAGE += $(MOZILLA_VERSION).system.conf $(pkg_config_files)
 
-GARBAGE += debian/changelog
 
 DEBDESTDIR=debian/$(MOZ_BUILD_APP)
 
-GRE_MILESTONE = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build Milestone)
-GRE_BUILDID = $(shell $(PYTHON) $(topsrcdir)/config/printconfigsetting.py $(LIBXUL_DIST)/bin/platform.ini Build BuildID)
-MOZ_DEB_TIMESTAMP = "$(shell date  +"%a, %d  %b %Y %T %z" )"
-
-DEFINES += -DGRE_MILESTONE=$(GRE_MILESTONE) -DGRE_BUILDID=$(GRE_BUILDID) -DMOZ_DEB_TIMESTAMP=$(MOZ_DEB_TIMESTAMP)
-
 
 ifeq ($(OS_TARGET),Linux)
-debian/changelog: $(srcdir)/debian/changelog.in $(LIBXUL_DIST)/bin/platform.ini
-	mkdir -p debian
-	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
-        $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $< > $@
-
-deb: debian/changelog
+deb: 
 	$(NSINSTALL)  $(topsrcdir)/$(MOZ_BUILD_APP)/installer/debian .
 	rm -rf $(DEBDESTDIR)/usr/local/*
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/local
 	cd $(DEBDESTDIR)/usr/local; cat ../../../../$(DEPTH)/dist/$(PKG_BASENAME)$(PKG_SUFFIX) | $(UNMAKE_PACKAGE)
 	$(NSINSTALL) -D $(DEBDESTDIR)/usr/share/dbus-1/services/
 	cp debian/$(MOZ_BUILD_APP).service $(DEBDESTDIR)/usr/share/dbus-1/services/org.mozilla.$(MOZ_BUILD_APP).service
 	$(NSINSTALL) debian/postinst $(DEBDESTDIR)/DEBIAN
 	$(NSINSTALL) debian/prerm $(DEBDESTDIR)/DEBIAN
--- a/xulrunner/installer/debian/changelog.in
+++ b/xulrunner/installer/debian/changelog.in
@@ -1,6 +1,5 @@
-#filter substitution
-xulrunner (@GRE_MILESTONE@-@GRE_BUILDID@)  unstable; urgency=low
+xulrunner (@MOZ_APP_VERSION@)  unstable; urgency=low
 
   * Mozilla Nightly (Closes: #nnnn)  <nnnn is the bug number of your ITP>
 
  -- Mozilla xulrunner  <blassey@mozilla.com>  @MOZ_DEB_TIMESTAMP@