aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-download.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/mozilla-download.cpp')
-rw-r--r--embed/mozilla/mozilla-download.cpp33
1 files changed, 12 insertions, 21 deletions
diff --git a/embed/mozilla/mozilla-download.cpp b/embed/mozilla/mozilla-download.cpp
index 75225c3a6..b2507b407 100644
--- a/embed/mozilla/mozilla-download.cpp
+++ b/embed/mozilla/mozilla-download.cpp
@@ -19,20 +19,21 @@
*/
#include "mozilla-config.h"
-
#include "config.h"
-#include "mozilla-download.h"
-#include "MozDownload.h"
-
-#include "ephy-debug.h"
+#include <nsStringAPI.h>
-#undef MOZILLA_INTERNAL_API
-#include <nsEmbedString.h>
-#define MOZILLA_INTERNAL_API 1
#include <nsILocalFile.h>
+#include <nsIMIMEInfo.h>
+#include <nsIURI.h>
#include <nsMemory.h>
+#include "ephy-debug.h"
+
+#include "MozDownload.h"
+
+#include "mozilla-download.h"
+
static void mozilla_download_class_init (MozillaDownloadClass *klass);
static void mozilla_download_init (MozillaDownload *ges);
static void mozilla_download_finalize (GObject *object);
@@ -90,7 +91,7 @@ impl_get_target (EphyDownload *download)
mozDownload->GetTargetFile (getter_AddRefs (targetFile));
- nsEmbedCString tempPathStr;
+ nsCString tempPathStr;
targetFile->GetNativePath (tempPathStr);
return g_strdup (tempPathStr.get ());
@@ -101,7 +102,7 @@ impl_get_source (EphyDownload *download)
{
nsCOMPtr<nsIURI> uri;
MozDownload *mozDownload;
- nsEmbedCString spec;
+ nsCString spec;
mozDownload = MOZILLA_DOWNLOAD (download)->priv->moz_download;
@@ -181,24 +182,14 @@ impl_get_mime (EphyDownload *download)
{
MozDownload *mozDownload;
nsCOMPtr<nsIMIMEInfo> mime;
- nsEmbedCString mimeType;
+ nsCString mimeType;
mozDownload = MOZILLA_DOWNLOAD (download)->priv->moz_download;
mozDownload->GetMIMEInfo (getter_AddRefs(mime));
if (!mime) return g_strdup ("application/octet-stream");
-#ifdef HAVE_GECKO_1_8
mime->GetMIMEType(mimeType);
-#else
- char *tmp = nsnull;
- mime->GetMIMEType(&tmp);
- mimeType.Assign(tmp);
- if (tmp)
- {
- nsMemory::Free (tmp);
- }
-#endif
return g_strdup (mimeType.get());
}