[epiphany] uri-tester: Get rid of AdUriCheckType
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] uri-tester: Get rid of AdUriCheckType
- Date: Sun, 8 Nov 2015 00:10:48 +0000 (UTC)
commit e0e936f3bcbe59aca8939a7a5145b5ee152cff7d
Author: Michael Catanzaro <mcatanzaro igalia com>
Date: Thu Sep 10 17:58:02 2015 -0500
uri-tester: Get rid of AdUriCheckType
It's unused
embed/web-extension/ephy-web-extension.c | 2 +-
embed/web-extension/uri-tester.c | 7 +-----
embed/web-extension/uri-tester.h | 32 +-----------------------------
3 files changed, 3 insertions(+), 38 deletions(-)
---
diff --git a/embed/web-extension/ephy-web-extension.c b/embed/web-extension/ephy-web-extension.c
index 87650e1..fc1c3f3 100644
--- a/embed/web-extension/ephy-web-extension.c
+++ b/embed/web-extension/ephy-web-extension.c
@@ -152,7 +152,7 @@ web_page_send_request (WebKitWebPage *web_page,
if (g_str_has_prefix (request_uri, SOUP_URI_SCHEME_DATA))
return FALSE;
- ret = uri_tester_test_uri (extension->uri_tester, request_uri, page_uri, AD_URI_CHECK_TYPE_OTHER);
+ ret = uri_tester_test_uri (extension->uri_tester, request_uri, page_uri);
if (ret)
g_debug ("Request '%s' blocked (page: '%s')", request_uri, page_uri);
diff --git a/embed/web-extension/uri-tester.c b/embed/web-extension/uri-tester.c
index f2d96b7..ab3e572 100644
--- a/embed/web-extension/uri-tester.c
+++ b/embed/web-extension/uri-tester.c
@@ -917,13 +917,8 @@ uri_tester_new (const char *base_data_dir)
gboolean
uri_tester_test_uri (UriTester *tester,
const char *req_uri,
- const char *page_uri,
- AdUriCheckType type)
+ const char *page_uri)
{
- /* Don't block top level documents. */
- if (type == AD_URI_CHECK_TYPE_DOCUMENT)
- return FALSE;
-
return uri_tester_is_matched (tester, NULL, req_uri, page_uri);
}
diff --git a/embed/web-extension/uri-tester.h b/embed/web-extension/uri-tester.h
index ebbd964..adcac8a 100644
--- a/embed/web-extension/uri-tester.h
+++ b/embed/web-extension/uri-tester.h
@@ -31,35 +31,6 @@ G_BEGIN_DECLS
#define IS_URI_TESTER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_URI_TESTER))
#define URI_TESTER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_URI_TESTER, UriTesterClass))
-typedef enum
-{
- AD_URI_CHECK_TYPE_OTHER = 1U,
- AD_URI_CHECK_TYPE_SCRIPT = 2U, /* Indicates an executable script
- (such as JavaScript) */
- AD_URI_CHECK_TYPE_IMAGE = 3U, /* Indicates an image (e.g., IMG
- elements) */
- AD_URI_CHECK_TYPE_STYLESHEET = 4U, /* Indicates a stylesheet (e.g.,
- STYLE elements) */
- AD_URI_CHECK_TYPE_OBJECT = 5U, /* Indicates a generic object
- (plugin-handled content
- typically falls under this
- category) */
- AD_URI_CHECK_TYPE_DOCUMENT = 6U, /* Indicates a document at the
- top-level (i.e., in a
- browser) */
- AD_URI_CHECK_TYPE_SUBDOCUMENT = 7U, /* Indicates a document contained
- within another document (e.g.,
- IFRAMEs, FRAMES, and OBJECTs) */
- AD_URI_CHECK_TYPE_REFRESH = 8U, /* Indicates a timed refresh */
- AD_URI_CHECK_TYPE_XBEL = 9U, /* Indicates an XBL binding request,
- triggered either by -moz-binding CSS
- property or Document.addBinding method */
- AD_URI_CHECK_TYPE_PING = 10U, /* Indicates a ping triggered by a click on
- <A PING="..."> element */
- AD_URI_CHECK_TYPE_XMLHTTPREQUEST = 11U, /* Indicates a XMLHttpRequest */
- AD_URI_CHECK_TYPE_OBJECT_SUBREQUEST = 12U /* Indicates a request by a plugin */
-} AdUriCheckType;
-
typedef struct _UriTester UriTester;
typedef struct _UriTesterClass UriTesterClass;
typedef struct _UriTesterPrivate UriTesterPrivate;
@@ -85,8 +56,7 @@ UriTester *uri_tester_new (const char *base_data_dir);
gboolean uri_tester_test_uri (UriTester *tester,
const char *req_uri,
- const char *page_uri,
- AdUriCheckType type);
+ const char *page_uri);
void uri_tester_set_filters (UriTester *tester, GSList *filters);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]