aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphySingle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphySingle.cpp')
-rw-r--r--embed/mozilla/EphySingle.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/embed/mozilla/EphySingle.cpp b/embed/mozilla/EphySingle.cpp
index 1a3791b43..b667c16d1 100644
--- a/embed/mozilla/EphySingle.cpp
+++ b/embed/mozilla/EphySingle.cpp
@@ -263,26 +263,11 @@ mozilla_cookie_to_ephy_cookie (nsICookie *cookie)
EphyPermissionInfo *
mozilla_permission_to_ephy_permission (nsIPermission *perm)
{
- EphyPermissionType type = (EphyPermissionType) 0;
-
nsresult result;
- nsEmbedCString str;
- result = perm->GetType(str);
+ nsEmbedCString type;
+ result = perm->GetType(type);
NS_ENSURE_SUCCESS (result, NULL);
- if (strcmp (str.get(), "cookie") == 0)
- {
- type = EPT_COOKIE;
- }
- else if (strcmp (str.get(), "image"))
- {
- type = EPT_IMAGE;
- }
- else if (strcmp (str.get(), "popup"))
- {
- type = EPT_POPUP;
- }
-
PRUint32 cap;
perm->GetCapability(&cap);
EphyPermission permission;
@@ -303,5 +288,5 @@ mozilla_permission_to_ephy_permission (nsIPermission *perm)
nsEmbedCString host;
perm->GetHost(host);
- return ephy_permission_info_new (host.get(), type, permission);
+ return ephy_permission_info_new (host.get(), type.get(), permission);
}