aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/mozilla-embed-single.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/mozilla-embed-single.cpp')
-rw-r--r--embed/mozilla/mozilla-embed-single.cpp42
1 files changed, 4 insertions, 38 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp
index 055f5ff80..221523df8 100644
--- a/embed/mozilla/mozilla-embed-single.cpp
+++ b/embed/mozilla/mozilla-embed-single.cpp
@@ -58,16 +58,8 @@
#include <nsIPassword.h>
#include <nsIPasswordManager.h>
#include <nsIPassword.h>
-#if MOZILLA_SNAPSHOT > 9
#include <nsICookie2.h>
-#else
-#include <nsICookie.h>
-#endif
-#if MOZILLA_SNAPSHOT > 12
#include <nsICookieManager.h>
-#else
-#include <nsCCookieManager.h>
-#endif
#include <nsCPasswordManager.h>
#include <nsIPermission.h>
#include <nsIPermissionManager.h>
@@ -385,13 +377,7 @@ getUILang (nsAString& aUILang)
return NS_ERROR_FAILURE;
}
-#if MOZILLA_SNAPSHOT >= 12
result = localeService->GetLocaleComponentForUserAgent (aUILang);
-#else
- nsXPIDLString uiLang;
- result = localeService->GetLocaleComponentForUserAgent (getter_Copies(uiLang));
- aUILang.Assign (uiLang);
-#endif
if (NS_FAILED (result))
{
@@ -422,7 +408,7 @@ mozilla_init_chrome (void)
result = getUILang(uiLang);
NS_ENSURE_SUCCESS (result, NS_ERROR_FAILURE);
- return chromeRegistry->SelectLocale (NS_ConvertUCS2toUTF8(uiLang), PR_FALSE);
+ return chromeRegistry->SelectLocale (NS_ConvertUTF16toUTF8(uiLang), PR_FALSE);
}
static void
@@ -592,7 +578,7 @@ impl_get_font_list (EphyEmbedSingle *shell,
{
char *gFontString;
- gFontString = g_strdup (NS_ConvertUCS2toUTF8 (fontArray[i]).get());
+ gFontString = g_strdup (NS_ConvertUTF16toUTF8 (fontArray[i]).get());
l = g_list_prepend (l, gFontString);
nsMemory::Free (fontArray[i]);
}
@@ -691,7 +677,7 @@ impl_list_passwords (EphyPasswordManager *manager)
EphyPasswordInfo *p = g_new0 (EphyPasswordInfo, 1);
p->host = g_strdup (transfer.get());
- p->username = g_strdup(NS_ConvertUCS2toUTF8(unicodeName).get());
+ p->username = g_strdup(NS_ConvertUTF16toUTF8(unicodeName).get());
p->password = NULL;
passwords = g_list_prepend (passwords, p);
@@ -709,7 +695,7 @@ impl_remove_password (EphyPasswordManager *manager,
if (!pm) return;
pm->RemoveUser (nsDependentCString(info->host),
- NS_ConvertUTF8toUCS2(nsDependentCString(info->username)));
+ NS_ConvertUTF8toUTF16(nsDependentCString(info->username)));
}
static const char *permission_type_string [] =
@@ -739,11 +725,7 @@ impl_permission_manager_add (EphyPermissionManager *manager,
gboolean allow = (permission == EPHY_PERMISSION_ALLOWED);
pm->Add (uri,
-#if MOZILLA_SNAPSHOT >= 10
permission_type_string [type],
-#else
- type,
-#endif
allow ? (PRUint32) nsIPermissionManager::ALLOW_ACTION :
(PRUint32) nsIPermissionManager::DENY_ACTION);
}
@@ -757,11 +739,7 @@ impl_permission_manager_remove (EphyPermissionManager *manager,
(do_GetService (NS_PERMISSIONMANAGER_CONTRACTID));
if (!pm) return;
-#if MOZILLA_SNAPSHOT >= 10
pm->Remove (nsDependentCString (host), permission_type_string [type]);
-#else
- pm->Remove (nsDependentCString (host), type);
-#endif
}
void
@@ -789,11 +767,7 @@ impl_permission_manager_test (EphyPermissionManager *manager,
nsresult rv;
PRUint32 action;
-#if MOZILLA_SNAPSHOT >= 10
rv = pm->TestPermission (uri, permission_type_string [type], &action);
-#else
- rv = pm->TestPermission (uri, type, &action);
-#endif
NS_ENSURE_SUCCESS (rv, EPHY_PERMISSION_DEFAULT);
EphyPermission permission;
@@ -837,19 +811,11 @@ impl_permission_manager_list (EphyPermissionManager *manager,
if (!perm) continue;
nsresult rv;
-#if MOZILLA_SNAPSHOT >= 10
nsCAutoString str;
rv = perm->GetType(str);
if (NS_FAILED (rv)) continue;
if (str.Equals(permission_type_string[type]))
-#else
- PRUint32 num;
- rv = perm->GetType(&num);
- if (NS_FAILED (rv)) continue;
-
- if ((PRUint32) num == (PRUint32) type)
-#endif
{
EphyPermissionInfo *info =
mozilla_permission_to_ephy_permission (perm);