Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/notification.js

Issue 29321478: Issue 2738 - Make RegExpFilter.matches() take a bit mask instead of content type string (Closed)
Patch Set: Changed API as discussed and addressed feedback Created July 12, 2015, 1:55 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/matcher.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/notification.js
diff --git a/lib/notification.js b/lib/notification.js
index 0c80f785c2e0734212cbef1538d5a95b3aeb557d..bcae0755d69b1b97ab88afb2232c603647f48b3a 100644
--- a/lib/notification.js
+++ b/lib/notification.js
@@ -25,7 +25,7 @@ let {Prefs} = require("prefs");
let {Downloader, Downloadable, MILLIS_IN_MINUTE, MILLIS_IN_HOUR, MILLIS_IN_DAY} = require("downloader");
let {Utils} = require("utils");
let {Matcher} = require("matcher");
-let {Filter} = require("filterClasses");
+let {Filter, RegExpFilter} = require("filterClasses");
let INITIAL_DELAY = 1 * MILLIS_IN_MINUTE;
let CHECK_INTERVAL = 1 * MILLIS_IN_HOUR;
@@ -222,7 +222,7 @@ let Notification = exports.Notification =
let matcher = new Matcher();
for (let urlFilter of notification.urlFilters)
matcher.add(Filter.fromText(urlFilter));
- if (!matcher.matchesAny(url, "DOCUMENT", url))
+ if (!matcher.matchesAny(url, RegExpFilter.typeMap.DOCUMENT, url))
continue;
}
else
« no previous file with comments | « lib/matcher.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld