aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphySingle.cpp
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-24 04:07:43 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-24 04:07:43 +0800
commitbf9a14796c23d31c781a6e09b92f523531285932 (patch)
tree2b176ececf168f5d06293a7397e5a8f16441b933 /embed/mozilla/EphySingle.cpp
parent38b74d1e516fd674940903dbf49a48894c0bbab7 (diff)
downloadgsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar
gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.gz
gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.bz2
gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.lz
gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.xz
gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.tar.zst
gsoc2013-epiphany-bf9a14796c23d31c781a6e09b92f523531285932.zip
Make the permission type a string instead of an enum, that way we can
2004-06-23 Christian Persch <chpe@cvs.gnome.org> * doc/reference/tmpl/ephy-permission-manager.sgml: * embed/ephy-permission-manager.c: (ephy_permission_info_new), (ephy_permission_info_copy), (ephy_permission_manager_add), (ephy_permission_manager_remove), (ephy_permission_manager_test), (ephy_permission_manager_list): * embed/ephy-permission-manager.h: * embed/mozilla/EphySingle.cpp: * embed/mozilla/mozilla-embed-single.cpp: Make the permission type a string instead of an enum, that way we can support more than just the hardcoded 3 types.
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);
}